Logo: Relish

  1. Sign in

Project: Hotel

Admin reorders featured items

  • @javascript
Background
Given
I am signed in as an admin
Scenarios
Given
I follow "Featured Items"
And
I follow "edit featured items"
Then
I am taken to the edit featured page
Reordering Hotels
Given
hotels ordered by the following names:
A Standard
Ze Standard
And
I am on the edit featured page
When
I move "Ze Standard" hotel to the top
Then
I see hotels ordered by the following names:
Ze Standard
A Standard
And
I click "save changes"
Then
the hotels are persisted with proper ordering
Adding hotel
Given
2 hotel with addresses
And
I am on the edit featured page
When
I follow "add new hotel"
Then
I see that featured hotel
When
I click "save changes"
Then
only one featured hotel should be present
Reordering Destinations
Given
destinations ordered by the following names:
A Destination
Ze Destination
And
I am on the edit featured page
When
I move "Ze Destination" destination to the top
Then
I see destinations ordered by the following names:
Ze Destination
A Destination
And
I click "save changes"
Then
the destinations are persisted with proper ordering
Adding destination
Given
2 destinations
And
I am on the edit featured page
When
I follow "add new destination"
Then
I see that featured destination
When
I click "save changes"
Then
only one featured destination should be present
Reordering Experiences
Given
experiences ordered by the following titles:
A Exp
Ze Exp
And
I am on the edit featured page
When
I move "Ze Exp" experience to the top
Then
I see experiences ordered by the following names:
Ze Exp
A Exp
And
I click "save changes"
Then
the experiences are persisted with proper ordering
Adding experience
Given
2 experiences
And
I am on the edit featured page
When
I follow "add new experience"
Then
I see that featured experience
When
I click "save changes"
Then
only one featured experience should be present
Removing hotel
Given
2 featured hotels
And
I am on the edit featured page
When
I remove one featured hotel
Then
I see one featured hotel
When
I click "save changes"
Then
only one featured hotel should be present
Removing destination
Given
2 featured destinations
And
I am on the edit featured page
When
I remove one featured destination
Then
I see one featured destination
When
I click "save changes"
Then
only one featured destination should be present
Removing experience
Given
2 featured experiences
And
I am on the edit featured page
When
I remove one featured experience
Then
I see one featured experience
When
I click "save changes"
Then
only one featured experience should be present

Last published over 5 years ago by Faraaz Khan.