Skip to content

Commit

Permalink
test(cypress): add room.feature
Browse files Browse the repository at this point in the history
  • Loading branch information
remarkablemark committed Feb 3, 2024
1 parent 0a55274 commit 6857656
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions cypress/e2e/room/room.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
Feature: Room
Scenario: As a host, I can play 1 round
Given I visit "/"
When I click on link "Create Room"
Then I see heading "Room"
And I see search contains "?_driftdb_room="
And I see heading "Choose a nickname"
When I find input by placeholder text "Nickname"
And I type "Mark"
And I click on button "Save"
Then I see text "Mark"
And I see button "Invite Your Friends!"
And I see text "QR Code"
When I click on label "Rounds"
And I type "{enter}"
And I click on text "1"
And I click on button "Start"
Then I see heading "Create a Joke:"
And I see text "Preview: "
When I find input by display value ""
And I type "test joke"
Then I see text "test joke"
When I click on button "Create Joke"
Then I see button "test joke"
When I click on button "test joke"
Then I see text "1"
When I click on button "Next Round"
Then I see heading "Room"

Scenario: As a player, I can visit the room
Given I visit "/room"
Then I see heading "Room"
And I see search contains "?_driftdb_room="
And I see heading "Choose a nickname"
When I get focused element
And I type "Mark{enter}"
Then I see text "Mark"
And I see button "Invite Your Friends!"
And I see text "QR Code"
And I see text "Waiting for the host to start the game..."

0 comments on commit 6857656

Please sign in to comment.