Feature: First test
File name: first-test.feature
Relative path: e2e/first-test.feature
Given
I visit path "https://e2e-test-quest.github.io/weather-app/?isStarted=true"
And
within a list named "Available Towns"
When
I click on element with role "listitem" and name "Douala"
Then
within the element with aria-label "Weather of Douala"
And
I should see a title named "Douala"
And
I should see an element with content "min: 10.8 °c"
Given
I visit path "https://e2e-test-quest.github.io/weather-app/?isStarted=true"
And
I type the sentence "i" in the text box named "Search for a town"
When
I click on button named "Filter"
And
I wait 500 ms
Then
I should see a list named "Available Towns" and containing
| Tunis |
|---|
| Limoges |
Given
I visit path "https://e2e-test-quest.github.io/weather-app/"
When
I start a keyboard navigation from the top of the page
Then
the next keyboard element focused should be a link named "Weather App's Logo"
And
the next keyboard element focused should be a link named "Home"
And
the next keyboard element focused should be a button named "Get started"
Given
I visit path "https://e2e-test-quest.github.io/weather-app/?isStarted=true"
And
I mock a request GET on url "https://e2e-test-quest.github.io/weather-app/data/mock.json" named "mock-new-town" with fixture mock-new-town.json
And
I mock a request POST on url "https://e2e-test-quest.github.io/weather-app/api" named "mock-post-new-town" with content "Success"
And
I click on button named "Add new town"
And
I type the sentence "Paris" in the text box named "Town name"
And
I type the sentence "10" in the spin button named "Latitude"
And
I type the sentence "123" in the spin button named "Longitude"
And
I type the sentence "Simple Description" in the text box named "Description"
When
I click on button named "Submit new town form"
Then
I should see a list named "Available Towns" and containing
| Douala |
|---|
| Tunis |
| Limoges |
| Paris |
Given
I visit path "https://e2e-test-quest.github.io/weather-app/?isStarted=true"
And
I mock a request GET on url "https://e2e-test-quest.github.io/weather-app/data/mock.json" named "mock-new-town" with fixture mock-new-town.json
And
I mock a request POST on url "https://e2e-test-quest.github.io/weather-app/api" named "mock-post-new-town" with content "Success"
When
I click on button named "Add new town"
And
I start a keyboard navigation from the top of the page
And
the next keyboard element focused should be a link named "Weather App's Logo"
And
the next keyboard element focused should be a link named "Home"
And
the next keyboard element focused should be a text box named "Town name"
And
I type the sentence "Paris"
And
the next keyboard element focused should be a spin button named "Latitude"
+ Show Error
+ Screenshot
expected '(input#new-town-latitude.form-control.ng-untouched.ng-pristine.ng-invalid)' to equal (select _ngcontent-ng-c3657990688="" name="town-type" id="town-type" class="form-select")(option _ngcontent-ng-c3657990688="" value="")Make your choice(/option)(option _ngcontent-ng-c3657990688="" value="1")Real(/option)(option _ngcontent-ng-c3657990688="" value="2")Unreal(/option)(/select)
And
I type the sentence "10"
And
the next keyboard element focused should be a spin button named "Longitude"
And
I type the sentence "123"
And
the next keyboard element focused should be a text box named "Description"
And
I type the sentence "Simple Description"
And
the next keyboard element focused should be a radio named "Small (under 150000)"
And
the next keyboard element focused should be a checkbox named "Allow automatic update"
And
the next keyboard element focused should be a button named "Back to town list"
And
the next keyboard element focused should be a button named "Submit new town form"
And
I click
Then
I should see a list named "Available Towns" and containing
| Douala |
|---|
| Tunis |
| Limoges |
| Paris |