Skip to content

Commit

Permalink
Merge pull request #29 from BalamiRR/flights_hotels_FK
Browse files Browse the repository at this point in the history
DONE : Scenario: Adding a child and selecting a random child age
  • Loading branch information
BalamiRR authored Feb 19, 2025
2 parents 3063099 + 01b50a5 commit 5c25709
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion features-frontend/flights_hotels.feature.robot
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Scenario: Adding a child and selecting a random child age
... random age can be selected from the available options up to 12 years.
[Tags] Low
Given I click on the "Add a child" option
Then I will see the ages til 12 years
Then I will see the list of ages til 12 years

Scenario: Adding a new room
[Documentation] This scenario verifies that a new room can be added successfully and appears next to the first room.
Expand Down
17 changes: 12 additions & 5 deletions step-definition/frontend/flights_hotels.steps.robot
Original file line number Diff line number Diff line change
Expand Up @@ -147,18 +147,25 @@ I will see adults "-" and "+" buttons are enabled

I will see the any class option is selected as default
Element Should Be Enabled ${ANY_FLIGHT}

I click on the "Add a child" option
Click Element ${ADD_CHILD_BTN}

I will see the ages til 12 years
Wait Until Element Is Visible ${AGE_LIST}
${age_items} Get WebElements ${AGE_LIST}
${l}= Get Length ${age_items}
Set Global Variable @{age_items}
Set Global Variable ${l}
RETURN ${age_items} ${l}

I click on the "Add a Room" button
Log message

I should see the newly added room displayed next to the first one
Log message

I click on the "Add a child" option
Log message

I will see the ages til 12 years
Log message

*** Comments ***
I see related cities or airports as suggestions
Expand Down
4 changes: 3 additions & 1 deletion step-definition/frontend/webelements.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,6 @@
TRAVELLERS_ROOM_NUMBER="//span[@class='d-en79w0']"
ANY_FLIGHT="//button[@aria-selected='true'][contains(.,'Any class')]"
FH_MINUS_BTN="(//div[@class='d-1ea2lc2'])[1]//button[1]"
FH_PLUS_BTN="(//div[@class='d-1ea2lc2'])[1]//button[2]"
FH_PLUS_BTN="(//div[@class='d-1ea2lc2'])[1]//button[2]"
ADD_CHILD_BTN="//button[@class='d-i62g11']"
AGE_LIST="//ul[@class='d-5wyavi']/li"

0 comments on commit 5c25709

Please sign in to comment.