From 68576561aa3cd2c5df0a55f70a53c1344c933bdb Mon Sep 17 00:00:00 2001 From: Mark Date: Sat, 3 Feb 2024 17:16:27 -0500 Subject: [PATCH 1/2] test(cypress): add room.feature --- cypress/e2e/room/room.feature | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 cypress/e2e/room/room.feature diff --git a/cypress/e2e/room/room.feature b/cypress/e2e/room/room.feature new file mode 100644 index 00000000..af00f3f2 --- /dev/null +++ b/cypress/e2e/room/room.feature @@ -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..." From a41b9fd82169b5892dabdd1f0fed95358e78a6ea Mon Sep 17 00:00:00 2001 From: Mark Date: Sat, 3 Feb 2024 17:27:50 -0500 Subject: [PATCH 2/2] chore(cypress): enable video recording --- cypress.config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/cypress.config.ts b/cypress.config.ts index bbb1af61..7e32ad9e 100644 --- a/cypress.config.ts +++ b/cypress.config.ts @@ -21,4 +21,5 @@ export default defineConfig({ return config; }, }, + video: true, });