@@ -12,9 +12,9 @@ Scenario(
1212 async ( ) => {
1313 login . firstVoterLogin ( username . user1 ) ;
1414 const url = await I . grabCurrentUrl ( ) ;
15- session ( username . user2 , ( ) => {
15+ session ( username . user2 , async ( ) => {
1616 login . voterLoginIntoCreatedGameRoom ( url , username . user2 ) ;
17- game . voteAndCheckThatVoteIsVisible ( ChessPieces . pawn , ChessTile . a1 ) ;
17+ await game . voteAndCheckThatVoteIsVisible ( ChessPieces . pawn , ChessTile . a1 ) ;
1818 I . waitForElement ( game . locator . playersList . voterScoreIcon ( username . user2 ) ) ;
1919 game . skipMove ( ) ;
2020 game . voteIsNotVisible ( ChessPieces . pawn , ChessTile . a1 ) ;
@@ -32,18 +32,18 @@ Scenario("Player who makes the move last skips", async () => {
3232 session ( username . user2 , ( ) => {
3333 login . voterLoginIntoCreatedGameRoom ( url , username . user2 ) ;
3434 } ) ;
35- session ( username . user3 , ( ) => {
35+ session ( username . user3 , async ( ) => {
3636 login . voterLoginIntoCreatedGameRoom ( url , username . user3 ) ;
37- game . voteAndCheckThatVoteIsVisible ( ChessPieces . pawn , ChessTile . a1 ) ;
37+ await game . voteAndCheckThatVoteIsVisible ( ChessPieces . pawn , ChessTile . a1 ) ;
3838 } ) ;
39- session ( username . user2 , ( ) => {
39+ session ( username . user2 , async ( ) => {
4040 I . waitForElement ( game . locator . playersList . playerDoneIcon ( username . user3 ) ) ;
41- game . voteAndCheckThatVoteIsVisible ( ChessPieces . rook , ChessTile . b3 ) ;
41+ await game . voteAndCheckThatVoteIsVisible ( ChessPieces . rook , ChessTile . b3 ) ;
4242 } ) ;
4343 I . waitForElement ( game . locator . playersList . playerDoneIcon ( username . user2 ) ) ;
4444 I . waitForElement ( game . locator . playersList . playerDoneIcon ( username . user3 ) ) ;
4545 game . skipMove ( ) ;
46- I . waitForText ( "Game complete" ) ;
46+ I . seeElement ( game . locator . playersList . totalSP ) ;
4747} ) ;
4848
4949Scenario ( "Player who makes the move first skips" , async ( ) => {
@@ -56,19 +56,19 @@ Scenario("Player who makes the move first skips", async () => {
5656 login . voterLoginIntoCreatedGameRoom ( url , username . user3 ) ;
5757 } ) ;
5858 game . skipMove ( ) ;
59- session ( username . user2 , ( ) => {
59+ session ( username . user2 , async ( ) => {
6060 I . waitForElement (
6161 game . locator . playersList . playerSkippedIcon ( username . user1 )
6262 ) ;
63- game . voteAndCheckThatVoteIsVisible ( ChessPieces . rook , ChessTile . b3 ) ;
63+ await game . voteAndCheckThatVoteIsVisible ( ChessPieces . rook , ChessTile . b3 ) ;
6464 } ) ;
65- session ( username . user3 , ( ) => {
65+ session ( username . user3 , async ( ) => {
6666 I . waitForElement (
6767 game . locator . playersList . playerSkippedIcon ( username . user1 )
6868 ) ;
6969 I . waitForElement ( game . locator . playersList . playerDoneIcon ( username . user2 ) ) ;
70- game . voteAndCheckThatVoteIsVisible ( ChessPieces . pawn , ChessTile . a1 ) ;
71- I . waitForText ( "Game complete" ) ;
70+ await game . voteAndCheckThatVoteIsVisible ( ChessPieces . pawn , ChessTile . a1 ) ;
71+ I . seeElement ( game . locator . playersList . totalSP ) ;
7272 } ) ;
7373} ) ;
7474
@@ -83,18 +83,18 @@ Scenario(
8383 session ( username . user3 , ( ) => {
8484 login . voterLoginIntoCreatedGameRoom ( url , username . user3 ) ;
8585 } ) ;
86- game . voteAndCheckThatVoteIsVisible ( ChessPieces . rook , ChessTile . b3 ) ;
86+ await game . voteAndCheckThatVoteIsVisible ( ChessPieces . rook , ChessTile . b3 ) ;
8787 session ( username . user2 , ( ) => {
8888 I . waitForElement ( game . locator . playersList . playerDoneIcon ( username . user1 ) ) ;
8989 game . skipMove ( ) ;
9090 } ) ;
91- session ( username . user3 , ( ) => {
91+ session ( username . user3 , async ( ) => {
9292 I . waitForElement ( game . locator . playersList . playerDoneIcon ( username . user1 ) ) ;
9393 I . waitForElement (
9494 game . locator . playersList . playerSkippedIcon ( username . user2 )
9595 ) ;
96- game . voteAndCheckThatVoteIsVisible ( ChessPieces . pawn , ChessTile . a1 ) ;
97- I . waitForText ( "Game complete" ) ;
96+ await game . voteAndCheckThatVoteIsVisible ( ChessPieces . pawn , ChessTile . a1 ) ;
97+ I . seeElement ( game . locator . playersList . totalSP ) ;
9898 } ) ;
9999 }
100100) ;
0 commit comments