From b089182d60b689c3c2b8b3122f3b25dc55ec253d Mon Sep 17 00:00:00 2001
From: Justas Bartka <>
Date: Wed, 3 May 2023 23:51:47 -0400
Subject: [PATCH 01/13] added end game avatars
---
.../components/gameFooter/ChessBoardPiece.jsx | 82 +++++++++++++++----
.../gameFooter/chess-board-pieces.css | 11 +++
2 files changed, 75 insertions(+), 18 deletions(-)
diff --git a/services/app/src/components/gameFooter/ChessBoardPiece.jsx b/services/app/src/components/gameFooter/ChessBoardPiece.jsx
index 4ee0cc3c..46934d07 100644
--- a/services/app/src/components/gameFooter/ChessBoardPiece.jsx
+++ b/services/app/src/components/gameFooter/ChessBoardPiece.jsx
@@ -5,44 +5,90 @@ import './chess-board-pieces.css';
import { useChessBoardContext } from '../../contexts/ChessBoardContext';
import PlanningChessTooltip from '../planningChessTooltip/PlanningChessTooltip';
import { PieceName } from '../../constants/board';
-
+import { GameState } from '../../constants/gameConstants';
+import { Avatar, Tooltip } from 'antd';
+import UserAvatar from '../avatar/UserAvatar';
const ChessBoardPiece = ({ selectFigure, figureName, figureImg, figureStrength, disabled }) => {
- const { selectedItem } = useChessBoardContext();
+ const { selectedItem, turns, gameState } = useChessBoardContext();
const skipTooltipTxt = "Mark my move as complete, without any story points";
+ console.log(turns)
+ const avatarSize = turns.length > 1
+ ? 'xs'
+ : 's';
+
const onSelect = () => {
if (!disabled) {
selectFigure(figureName)
}
}
+ const tooltipContent = `
+
From 66ccee9cc9d414f647f7d093756983b580304e3a Mon Sep 17 00:00:00 2001
From: Justas Bartka <>
Date: Sat, 6 May 2023 15:56:01 -0400
Subject: [PATCH 09/13] bug fixes
---
services/app/src/components/gameFooter/ChessBoardPiece.jsx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/services/app/src/components/gameFooter/ChessBoardPiece.jsx b/services/app/src/components/gameFooter/ChessBoardPiece.jsx
index 3a16c2ba..e3e1c633 100644
--- a/services/app/src/components/gameFooter/ChessBoardPiece.jsx
+++ b/services/app/src/components/gameFooter/ChessBoardPiece.jsx
@@ -8,6 +8,7 @@ import PlanningChessTooltip from '../planningChessTooltip/PlanningChessTooltip';
import { PieceName } from '../../constants/board';
import { GameState } from '../../constants/gameConstants';
import UserAvatar from '../avatar/UserAvatar';
+
const ChessBoardPiece = ({ selectFigure, figureName, figureImg, figureStrength, disabled }) => {
const { selectedItem, turns, gameState } = useChessBoardContext();
@@ -53,7 +54,7 @@ const ChessBoardPiece = ({ selectFigure, figureName, figureImg, figureStrength,
{
@@ -69,6 +70,7 @@ const ChessBoardPiece = ({ selectFigure, figureName, figureImg, figureStrength,
.join(', ')}
+ )
}
placement="top"
>
From 95d989d62be9c357da2ce67e5a7e9cb7603df1d2 Mon Sep 17 00:00:00 2001
From: Justas Bartka <>
Date: Sat, 6 May 2023 15:59:10 -0400
Subject: [PATCH 10/13] bug fixes#2
---
services/app/src/components/gameFooter/ChessBoardPiece.jsx | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/services/app/src/components/gameFooter/ChessBoardPiece.jsx b/services/app/src/components/gameFooter/ChessBoardPiece.jsx
index e3e1c633..5e09c993 100644
--- a/services/app/src/components/gameFooter/ChessBoardPiece.jsx
+++ b/services/app/src/components/gameFooter/ChessBoardPiece.jsx
@@ -70,8 +70,7 @@ const ChessBoardPiece = ({ selectFigure, figureName, figureImg, figureStrength,
.join(', ')}
- )
- }
+ )}
placement="top"
>
From f5025a6952c16e5f5677ee7e821d7e1d01b43df7 Mon Sep 17 00:00:00 2001
From: Justas Bartka <>
Date: Fri, 12 May 2023 03:47:09 -0400
Subject: [PATCH 11/13] stylistical changes + removed unnecessary lines
---
.../app/src/components/gameFooter/ChessBoardPiece.jsx | 9 ++-------
.../app/src/components/gameFooter/chess-board-pieces.css | 3 +--
2 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/services/app/src/components/gameFooter/ChessBoardPiece.jsx b/services/app/src/components/gameFooter/ChessBoardPiece.jsx
index 5e09c993..95d1667b 100644
--- a/services/app/src/components/gameFooter/ChessBoardPiece.jsx
+++ b/services/app/src/components/gameFooter/ChessBoardPiece.jsx
@@ -14,10 +14,6 @@ const ChessBoardPiece = ({ selectFigure, figureName, figureImg, figureStrength,
const skipTooltipTxt = "Mark my move as complete, without any story points";
- const avatarSize = turns.length > 1
- ? 'xs'
- : 's';
-
const onSelect = () => {
if (!disabled) {
selectFigure(figureName)
@@ -37,8 +33,7 @@ const ChessBoardPiece = ({ selectFigure, figureName, figureImg, figureStrength,
'piece-field padding-y-s padding-x-sm f-center rubik-font',
{
'piece-field-selected':
- selectedItem === figureName &&
- gameState !== GameState.GAME_FINISHED,
+ selectedItem === figureName,
// disabling with class, because antd appends unnecessary spam around the button when its disabled
'disabled': disabled,
},
@@ -90,7 +85,7 @@ const ChessBoardPiece = ({ selectFigure, figureName, figureImg, figureStrength,
.filter((element) => element.figure === figureName)
.map((item, index) => (
Date: Wed, 10 May 2023 10:13:58 +0300
Subject: [PATCH 12/13] fixed failing tests (#255)
---
E2E/pageObjects/game.page.ts | 23 +++---
E2E/tests/avatarUpload.test.ts | 6 +-
E2E/tests/gameComplete.test.ts | 4 +-
E2E/tests/reenterGame.test.ts | 10 +--
E2E/tests/restartGame.test.ts | 8 +-
E2E/tests/skipMove.test.ts | 32 ++++----
E2E/tests/spectatorView.test.ts | 8 +-
E2E/tests/teamList.test.ts | 2 +-
E2E/tests/voting.test.ts | 126 +++++++++++++++++---------------
9 files changed, 115 insertions(+), 104 deletions(-)
diff --git a/E2E/pageObjects/game.page.ts b/E2E/pageObjects/game.page.ts
index 76c4f519..5fe7643b 100644
--- a/E2E/pageObjects/game.page.ts
+++ b/E2E/pageObjects/game.page.ts
@@ -56,9 +56,9 @@ const locator = {
chessPieceOnBoard: (tile: string, chessPiece: string) =>
`//*[@data-testid='chess-tile-${tile}']//img[@alt='${chessPiece} icon']`,
avatarOnBoard: (tile: string) =>
- `//*[@data-testid='chess-tile-${tile}']//span[@class='ant-avatar-string']`,
+ `//*[@data-testid='chess-tile-${tile}']//*[contains(@data-testid, 'default-avatar-square')]`,
avatarPictureOnBoard: (tile: string) =>
- `//*[@data-testid='chess-tile-${tile}']//div[@class='bubble-container']//img[@alt='profile pic']`,
+ `//*[@data-testid='chess-tile-${tile}']//*[contains(@data-testid,'custom-avatar-square-')]`,
openedPopUp: '//*[contains(@class, "pop-over-opened")]',
pointsOnBoard: (tile: string, value: number) =>
`//*[@data-testid='chess-tile-${tile}']//*[contains(text(), '${value}SP')]`,
@@ -109,13 +109,15 @@ const locator = {
newRoom: "#dropdown-create-new-room",
},
chessBoardPopUp: {
- square: '//*[@class="pop-over-title" and contains(text(), "Square ")]',
+ square:
+ '//*[contains(@class,"pop-over-title") and contains(text(), "Square ")]',
chessPiece: '//*[@class="pop-up-figure-icon margin-r-xs"]',
avatar:
'//*[contains(@class, "pop-over")]//*[contains(@class, "ant-avatar-circle")]',
player: (username: string) =>
`//*[contains(@class, "pop-over")]//*[contains(text(), "${username}")]`,
- score: '//*[contains(@class, "pop-over")]//*[@class = "score"]//span',
+ score:
+ '//*[contains(@class, "pop-over")]//*[contains(@class, "score")]//span',
},
};
@@ -153,10 +155,10 @@ export = {
I.click(locator.chessBoard.chessTile(tile));
},
- voteIsVisible: (chessPiece: ChessPiece, tile: string) => {
+ voteIsVisible: async (chessPiece: ChessPiece, tile: string) => {
I.seeElement(locator.chessBoard.avatarOnBoard(tile));
- assertions.chessPieceOnBoard(chessPiece, tile);
- assertions.SPOnBoard(chessPiece, tile);
+ await assertions.chessPieceOnBoard(chessPiece, tile);
+ await assertions.SPOnBoard(chessPiece, tile);
},
voteIsNotVisible: (chessPiece: ChessPiece, tile: string) => {
@@ -203,9 +205,12 @@ export = {
I.seeElement(locator.buttons.skipButtonHighlighted);
},
- voteAndCheckThatVoteIsVisible: (chessPiece: ChessPiece, tile: string) => {
+ voteAndCheckThatVoteIsVisible: async (
+ chessPiece: ChessPiece,
+ tile: string
+ ) => {
game.vote(chessPiece, tile);
- game.voteIsVisible(chessPiece, tile);
+ await game.voteIsVisible(chessPiece, tile);
},
openPopUp(chessTile: string) {
diff --git a/E2E/tests/avatarUpload.test.ts b/E2E/tests/avatarUpload.test.ts
index ea752cdf..f361676c 100644
--- a/E2E/tests/avatarUpload.test.ts
+++ b/E2E/tests/avatarUpload.test.ts
@@ -85,7 +85,7 @@ Scenario(
session(username.user2, () => {
login.voterLoginIntoCreatedGameRoom(url, username.user2);
});
- game.voteAndCheckThatVoteIsVisible(ChessPieces.rook, ChessTile.a1);
+ await game.voteAndCheckThatVoteIsVisible(ChessPieces.rook, ChessTile.a1);
game.uploadAvatarPhoto(imageLink.dogImageLink);
await game.confirmAvatarPhotoWhenImageLinkIsValid(imageLink.dogImageLink);
session(username.user2, async () => {
@@ -95,8 +95,8 @@ Scenario(
);
I.assertEqual(imageLink.dogImageLink, firstPlayersImageOnThePlayersList);
game.voteIsNotVisible(ChessPieces.rook, ChessTile.a1);
- game.voteAndCheckThatVoteIsVisible(ChessPieces.pawn, ChessTile.b3);
- I.waitForText("Game complete");
+ await game.voteAndCheckThatVoteIsVisible(ChessPieces.pawn, ChessTile.b3);
+ I.seeElement(game.locator.playersList.totalSP);
game.avatarPictureIsVisibleOnTheBoard(ChessPieces.rook, ChessTile.a1);
});
}
diff --git a/E2E/tests/gameComplete.test.ts b/E2E/tests/gameComplete.test.ts
index a3959920..43ead834 100644
--- a/E2E/tests/gameComplete.test.ts
+++ b/E2E/tests/gameComplete.test.ts
@@ -15,9 +15,9 @@ Scenario("Game completes automatically after last voter votes", async () => {
I.click(game.locator.chessPieces.chessPiece(ChessPieces.rook.name));
});
game.vote(ChessPieces.pawn, ChessTile.c4);
- I.waitForText("Game complete");
+ I.seeElement(game.locator.playersList.totalSP);
session(username.user2, () => {
- I.waitForText("Game complete");
+ I.seeElement(game.locator.playersList.totalSP);
game.voteIsVisible(ChessPieces.pawn, ChessTile.c4);
game.voteIsVisible(ChessPieces.knight, ChessTile.e4);
I.seeElement(
diff --git a/E2E/tests/reenterGame.test.ts b/E2E/tests/reenterGame.test.ts
index d52c7d47..80e086e0 100644
--- a/E2E/tests/reenterGame.test.ts
+++ b/E2E/tests/reenterGame.test.ts
@@ -20,7 +20,7 @@ Scenario(
I.seeElement(game.locator.buttons.skipButtonHighlighted);
});
game.vote(ChessPieces.knight, ChessTile.e4);
- I.waitForText("Game complete");
+ I.seeElement(game.locator.playersList.totalSP);
}
);
@@ -54,7 +54,7 @@ Scenario(
game.skipMove();
I.refreshPage();
I.seeElement(game.locator.buttons.skipButtonHighlighted);
- I.waitForText("Game complete");
+ I.seeElement(game.locator.playersList.totalSP);
});
}
);
@@ -69,12 +69,12 @@ Scenario(
game.voteAndCheckThatVoteIsVisible(ChessPieces.pawn, ChessTile.a1);
});
game.voteAndCheckThatVoteIsVisible(ChessPieces.knight, ChessTile.e4);
- I.waitForText("Game complete");
+ I.seeElement(game.locator.playersList.totalSP);
const actualFinalScoreBeforeNavigating = await I.grabNumberFrom(
game.locator.playersList.totalSP
);
game.navigateBackAndForward();
- I.waitForText("Game complete");
+ I.seeElement(game.locator.playersList.totalSP);
game.voteIsVisible(ChessPieces.pawn, ChessTile.a1);
game.voteIsVisible(ChessPieces.knight, ChessTile.e4);
const actualFinalScoreAfterNavigating = await I.grabNumberFrom(
@@ -99,7 +99,7 @@ Scenario("Player refreshes browser when he already finished move", async () => {
});
game.voteIsNotVisible(ChessPieces.pawn, ChessTile.a1);
game.voteAndCheckThatVoteIsVisible(ChessPieces.knight, ChessTile.e4);
- I.waitForText("Game complete");
+ I.seeElement(game.locator.playersList.totalSP);
game.voteIsVisible(ChessPieces.pawn, ChessTile.a1);
game.voteIsVisible(ChessPieces.knight, ChessTile.e4);
});
diff --git a/E2E/tests/restartGame.test.ts b/E2E/tests/restartGame.test.ts
index bc81df10..a34b69ba 100644
--- a/E2E/tests/restartGame.test.ts
+++ b/E2E/tests/restartGame.test.ts
@@ -9,12 +9,12 @@ const { I, login, game } = inject();
Scenario("Board is cleared after clicking restart game button", async () => {
login.firstVoterLogin(username.user1);
const url = await I.grabCurrentUrl();
- session(username.user2, () => {
+ session(username.user2, async () => {
login.voterLoginIntoCreatedGameRoom(url, username.user2);
- game.voteAndCheckThatVoteIsVisible(ChessPieces.bishop, ChessTile.a1);
+ await game.voteAndCheckThatVoteIsVisible(ChessPieces.bishop, ChessTile.a1);
});
- game.voteAndCheckThatVoteIsVisible(ChessPieces.bishop, ChessTile.c4);
- I.waitForText("Game complete");
+ await game.voteAndCheckThatVoteIsVisible(ChessPieces.bishop, ChessTile.c4);
+ I.seeElement(game.locator.playersList.totalSP);
I.click(game.locator.buttons.restartGame);
game.voteIsNotVisible(ChessPieces.bishop, ChessTile.c4);
game.voteIsNotVisible(ChessPieces.bishop, ChessTile.a1);
diff --git a/E2E/tests/skipMove.test.ts b/E2E/tests/skipMove.test.ts
index d30e1c27..c584977e 100644
--- a/E2E/tests/skipMove.test.ts
+++ b/E2E/tests/skipMove.test.ts
@@ -12,9 +12,9 @@ Scenario(
async () => {
login.firstVoterLogin(username.user1);
const url = await I.grabCurrentUrl();
- session(username.user2, () => {
+ session(username.user2, async () => {
login.voterLoginIntoCreatedGameRoom(url, username.user2);
- game.voteAndCheckThatVoteIsVisible(ChessPieces.pawn, ChessTile.a1);
+ await game.voteAndCheckThatVoteIsVisible(ChessPieces.pawn, ChessTile.a1);
I.waitForElement(game.locator.playersList.voterScoreIcon(username.user2));
game.skipMove();
game.voteIsNotVisible(ChessPieces.pawn, ChessTile.a1);
@@ -32,18 +32,18 @@ Scenario("Player who makes the move last skips", async () => {
session(username.user2, () => {
login.voterLoginIntoCreatedGameRoom(url, username.user2);
});
- session(username.user3, () => {
+ session(username.user3, async () => {
login.voterLoginIntoCreatedGameRoom(url, username.user3);
- game.voteAndCheckThatVoteIsVisible(ChessPieces.pawn, ChessTile.a1);
+ await game.voteAndCheckThatVoteIsVisible(ChessPieces.pawn, ChessTile.a1);
});
- session(username.user2, () => {
+ session(username.user2, async () => {
I.waitForElement(game.locator.playersList.playerDoneIcon(username.user3));
- game.voteAndCheckThatVoteIsVisible(ChessPieces.rook, ChessTile.b3);
+ await game.voteAndCheckThatVoteIsVisible(ChessPieces.rook, ChessTile.b3);
});
I.waitForElement(game.locator.playersList.playerDoneIcon(username.user2));
I.waitForElement(game.locator.playersList.playerDoneIcon(username.user3));
game.skipMove();
- I.waitForText("Game complete");
+ I.seeElement(game.locator.playersList.totalSP);
});
Scenario("Player who makes the move first skips", async () => {
@@ -56,19 +56,19 @@ Scenario("Player who makes the move first skips", async () => {
login.voterLoginIntoCreatedGameRoom(url, username.user3);
});
game.skipMove();
- session(username.user2, () => {
+ session(username.user2, async () => {
I.waitForElement(
game.locator.playersList.playerSkippedIcon(username.user1)
);
- game.voteAndCheckThatVoteIsVisible(ChessPieces.rook, ChessTile.b3);
+ await game.voteAndCheckThatVoteIsVisible(ChessPieces.rook, ChessTile.b3);
});
- session(username.user3, () => {
+ session(username.user3, async () => {
I.waitForElement(
game.locator.playersList.playerSkippedIcon(username.user1)
);
I.waitForElement(game.locator.playersList.playerDoneIcon(username.user2));
- game.voteAndCheckThatVoteIsVisible(ChessPieces.pawn, ChessTile.a1);
- I.waitForText("Game complete");
+ await game.voteAndCheckThatVoteIsVisible(ChessPieces.pawn, ChessTile.a1);
+ I.seeElement(game.locator.playersList.totalSP);
});
});
@@ -83,18 +83,18 @@ Scenario(
session(username.user3, () => {
login.voterLoginIntoCreatedGameRoom(url, username.user3);
});
- game.voteAndCheckThatVoteIsVisible(ChessPieces.rook, ChessTile.b3);
+ await game.voteAndCheckThatVoteIsVisible(ChessPieces.rook, ChessTile.b3);
session(username.user2, () => {
I.waitForElement(game.locator.playersList.playerDoneIcon(username.user1));
game.skipMove();
});
- session(username.user3, () => {
+ session(username.user3, async () => {
I.waitForElement(game.locator.playersList.playerDoneIcon(username.user1));
I.waitForElement(
game.locator.playersList.playerSkippedIcon(username.user2)
);
- game.voteAndCheckThatVoteIsVisible(ChessPieces.pawn, ChessTile.a1);
- I.waitForText("Game complete");
+ await game.voteAndCheckThatVoteIsVisible(ChessPieces.pawn, ChessTile.a1);
+ I.seeElement(game.locator.playersList.totalSP);
});
}
);
diff --git a/E2E/tests/spectatorView.test.ts b/E2E/tests/spectatorView.test.ts
index ad5db024..a72fcc9c 100644
--- a/E2E/tests/spectatorView.test.ts
+++ b/E2E/tests/spectatorView.test.ts
@@ -67,7 +67,7 @@ Scenario("Spectator doesn’t have to vote for game to be finished", async () =>
game.voteAndCheckThatVoteIsVisible(ChessPieces.pawn, ChessTile.a1);
});
game.skipMove();
- I.waitForText("Game complete");
+ I.seeElement(game.locator.playersList.totalSP);
game.voteIsVisible(ChessPieces.pawn, ChessTile.a1);
session(username.user3, () => {
game.voteIsVisible(ChessPieces.pawn, ChessTile.a1);
@@ -88,14 +88,14 @@ Scenario("Spectator restarts previously finished game", async () => {
});
game.skipMove();
session(username.user3, () => {
- I.waitForText("Game complete");
+ I.seeElement(game.locator.playersList.totalSP);
I.click(game.locator.buttons.restartGame);
game.voteIsNotVisible(ChessPieces.pawn, ChessTile.a1);
});
game.voteAndCheckThatVoteIsVisible(ChessPieces.knight, ChessTile.e2);
session(username.user2, () => {
game.voteAndCheckThatVoteIsVisible(ChessPieces.king, ChessTile.d3);
- I.waitForText("Game complete");
+ I.seeElement(game.locator.playersList.totalSP);
game.voteIsVisible(ChessPieces.king, ChessTile.d3);
game.voteIsVisible(ChessPieces.knight, ChessTile.e2);
game.voteIsNotVisible(ChessPieces.pawn, ChessTile.a1);
@@ -133,7 +133,7 @@ Scenario("Spectators are displayed at the bottom of players list", async () => {
game.vote(ChessPieces.king, ChessTile.c3);
session(username.user3, () => {
game.vote(ChessPieces.king, ChessTile.c3);
- I.waitForText("Game complete");
+ I.seeElement(game.locator.playersList.totalSP);
I.seeTextEquals(
`${username.user2}`,
game.locator.playersList.playerUsernameByIndex(3)
diff --git a/E2E/tests/teamList.test.ts b/E2E/tests/teamList.test.ts
index b23e8dd4..ecab18d3 100644
--- a/E2E/tests/teamList.test.ts
+++ b/E2E/tests/teamList.test.ts
@@ -26,7 +26,7 @@ Scenario(
session(username.user3, () => {
I.click(game.locator.buttons.skip);
I.click(game.locator.buttons.skipOtherPlayer(username.user1));
- I.waitForText("Game complete");
+ I.seeElement(game.locator.playersList.totalSP);
const expectedUserOrder = [
username.user4,
username.user2,
diff --git a/E2E/tests/voting.test.ts b/E2E/tests/voting.test.ts
index a6675c4e..1132e89f 100644
--- a/E2E/tests/voting.test.ts
+++ b/E2E/tests/voting.test.ts
@@ -10,11 +10,11 @@ import assertions = require("../assertions/assertions");
Scenario("Voter can change vote while game is not completed", async () => {
login.firstVoterLogin(username.user1);
const url = await I.grabCurrentUrl();
- session(username.user2, () => {
+ session(username.user2, async () => {
login.voterLoginIntoCreatedGameRoom(url, username.user2);
- game.voteAndCheckThatVoteIsVisible(ChessPieces.pawn, ChessTile.a1);
+ await game.voteAndCheckThatVoteIsVisible(ChessPieces.pawn, ChessTile.a1);
I.waitForElement(game.locator.playersList.voterScoreIcon(username.user2));
- game.voteAndCheckThatVoteIsVisible(ChessPieces.knight, ChessTile.e2);
+ await game.voteAndCheckThatVoteIsVisible(ChessPieces.knight, ChessTile.e2);
game.voteIsNotVisible(ChessPieces.pawn, ChessTile.a1);
});
});
@@ -24,9 +24,12 @@ Scenario(
async () => {
login.firstVoterLogin(username.user1);
const url = await I.grabCurrentUrl();
- session(username.user2, () => {
+ session(username.user2, async () => {
login.voterLoginIntoCreatedGameRoom(url, username.user2);
- game.voteAndCheckThatVoteIsVisible(ChessPieces.knight, ChessTile.e4);
+ await game.voteAndCheckThatVoteIsVisible(
+ ChessPieces.knight,
+ ChessTile.e4
+ );
});
I.waitForElement(game.locator.playersList.playerDoneIcon(username.user2));
game.voteIsNotVisible(ChessPieces.knight, ChessTile.e4);
@@ -36,21 +39,21 @@ Scenario(
Scenario("Two users with same name vote as separate players", async () => {
login.firstVoterLogin(username.user1);
const url = await I.grabCurrentUrl();
- session(username.user2, () => {
+ session(username.user2, async () => {
login.voterLoginIntoCreatedGameRoom(url, username.user1);
- game.voteAndCheckThatVoteIsVisible(ChessPieces.knight, ChessTile.e4);
+ await game.voteAndCheckThatVoteIsVisible(ChessPieces.knight, ChessTile.e4);
});
I.waitForElement(game.locator.playersList.playerDoneIcon(username.user1));
game.voteIsNotVisible(ChessPieces.knight, ChessTile.e4);
game.vote(ChessPieces.queen, ChessTile.f5);
I.waitForText("Game complete");
- game.voteIsVisible(ChessPieces.queen, ChessTile.f5);
- game.voteIsVisible(ChessPieces.knight, ChessTile.e4);
+ await game.voteIsVisible(ChessPieces.queen, ChessTile.f5);
+ await game.voteIsVisible(ChessPieces.knight, ChessTile.e4);
I.see(username.user1, game.locator.playersList.firstUserInList);
I.see(username.user1, game.locator.playersList.secondUserInList);
- session(username.user2, () => {
- game.voteIsVisible(ChessPieces.queen, ChessTile.f5);
- game.voteIsVisible(ChessPieces.knight, ChessTile.e4);
+ session(username.user2, async () => {
+ await game.voteIsVisible(ChessPieces.queen, ChessTile.f5);
+ await game.voteIsVisible(ChessPieces.knight, ChessTile.e4);
I.see(username.user1, game.locator.playersList.firstUserInList);
I.see(username.user1, game.locator.playersList.secondUserInList);
});
@@ -67,30 +70,33 @@ Scenario(
session(username.user3, () => {
login.voterLoginIntoCreatedGameRoom(url, username.user3);
});
- game.voteAndCheckThatVoteIsVisible(ChessPieces.king, ChessTile.a1);
- session(username.user2, () => {
+ await game.voteAndCheckThatVoteIsVisible(ChessPieces.king, ChessTile.a1);
+ session(username.user2, async () => {
game.voteIsNotVisible(ChessPieces.king, ChessTile.a1);
- game.voteAndCheckThatVoteIsVisible(ChessPieces.bishop, ChessTile.b3);
+ await game.voteAndCheckThatVoteIsVisible(
+ ChessPieces.bishop,
+ ChessTile.b3
+ );
});
- session(username.user3, () => {
+ session(username.user3, async () => {
game.voteIsNotVisible(ChessPieces.king, ChessTile.a1);
game.voteIsNotVisible(ChessPieces.bishop, ChessTile.b3);
game.vote(ChessPieces.knight, ChessTile.c3);
- I.waitForText("Game complete");
- game.voteIsVisible(ChessPieces.knight, ChessTile.c3);
- game.voteIsVisible(ChessPieces.bishop, ChessTile.b3);
- game.voteIsVisible(ChessPieces.king, ChessTile.a1);
- });
- session(username.user2, () => {
- I.waitForText("Game complete");
- game.voteIsVisible(ChessPieces.knight, ChessTile.c3);
- game.voteIsVisible(ChessPieces.bishop, ChessTile.b3);
- game.voteIsVisible(ChessPieces.king, ChessTile.a1);
- });
- I.waitForText("Game complete");
- game.voteIsVisible(ChessPieces.knight, ChessTile.c3);
- game.voteIsVisible(ChessPieces.bishop, ChessTile.b3);
- game.voteIsVisible(ChessPieces.king, ChessTile.a1);
+ I.seeElement(game.locator.playersList.totalSP);
+ await game.voteIsVisible(ChessPieces.knight, ChessTile.c3);
+ await game.voteIsVisible(ChessPieces.bishop, ChessTile.b3);
+ await game.voteIsVisible(ChessPieces.king, ChessTile.a1);
+ });
+ session(username.user2, async () => {
+ I.seeElement(game.locator.playersList.totalSP);
+ await game.voteIsVisible(ChessPieces.knight, ChessTile.c3);
+ await game.voteIsVisible(ChessPieces.bishop, ChessTile.b3);
+ await game.voteIsVisible(ChessPieces.king, ChessTile.a1);
+ });
+ I.seeElement(game.locator.playersList.totalSP);
+ await game.voteIsVisible(ChessPieces.knight, ChessTile.c3);
+ await game.voteIsVisible(ChessPieces.bishop, ChessTile.b3);
+ await game.voteIsVisible(ChessPieces.king, ChessTile.a1);
}
);
@@ -106,29 +112,29 @@ Scenario(
login.voterLoginIntoCreatedGameRoom(url, username.user3);
});
game.voteAndCheckThatVoteIsVisible(ChessPieces.pawn, ChessTile.a1);
- session(username.user2, () => {
+ session(username.user2, async () => {
game.voteIsNotVisible(ChessPieces.pawn, ChessTile.a1);
- game.voteAndCheckThatVoteIsVisible(ChessPieces.pawn, ChessTile.b3);
+ await game.voteAndCheckThatVoteIsVisible(ChessPieces.pawn, ChessTile.b3);
});
- session(username.user3, () => {
+ session(username.user3, async () => {
game.voteIsNotVisible(ChessPieces.pawn, ChessTile.a1);
game.voteIsNotVisible(ChessPieces.pawn, ChessTile.b3);
game.vote(ChessPieces.pawn, ChessTile.c3);
- I.waitForText("Game complete");
- game.voteIsVisible(ChessPieces.pawn, ChessTile.a1);
- game.voteIsVisible(ChessPieces.pawn, ChessTile.b3);
- game.voteIsVisible(ChessPieces.pawn, ChessTile.c3);
- });
- session(username.user2, () => {
- I.waitForText("Game complete");
- game.voteIsVisible(ChessPieces.pawn, ChessTile.a1);
- game.voteIsVisible(ChessPieces.pawn, ChessTile.b3);
- game.voteIsVisible(ChessPieces.pawn, ChessTile.c3);
- });
- I.waitForText("Game complete");
- game.voteIsVisible(ChessPieces.pawn, ChessTile.a1);
- game.voteIsVisible(ChessPieces.pawn, ChessTile.b3);
- game.voteIsVisible(ChessPieces.pawn, ChessTile.c3);
+ I.seeElement(game.locator.playersList.totalSP);
+ await game.voteIsVisible(ChessPieces.pawn, ChessTile.a1);
+ await game.voteIsVisible(ChessPieces.pawn, ChessTile.b3);
+ await game.voteIsVisible(ChessPieces.pawn, ChessTile.c3);
+ });
+ session(username.user2, async () => {
+ I.seeElement(game.locator.playersList.totalSP);
+ await game.voteIsVisible(ChessPieces.pawn, ChessTile.a1);
+ await game.voteIsVisible(ChessPieces.pawn, ChessTile.b3);
+ await game.voteIsVisible(ChessPieces.pawn, ChessTile.c3);
+ });
+ I.seeElement(game.locator.playersList.totalSP);
+ await game.voteIsVisible(ChessPieces.pawn, ChessTile.a1);
+ await game.voteIsVisible(ChessPieces.pawn, ChessTile.b3);
+ await game.voteIsVisible(ChessPieces.pawn, ChessTile.c3);
}
);
@@ -144,31 +150,31 @@ Scenario(
login.voterLoginIntoCreatedGameRoom(url, username.user3);
});
game.voteAndCheckThatVoteIsVisible(ChessPieces.pawn, ChessTile.a1);
- session(username.user2, () => {
+ session(username.user2, async () => {
game.voteIsNotVisible(ChessPieces.pawn, ChessTile.a1);
- game.voteAndCheckThatVoteIsVisible(ChessPieces.rook, ChessTile.a1);
+ await game.voteAndCheckThatVoteIsVisible(ChessPieces.rook, ChessTile.a1);
});
- session(username.user3, () => {
+ session(username.user3, async () => {
game.voteIsNotVisible(ChessPieces.pawn, ChessTile.a1);
game.voteIsNotVisible(ChessPieces.rook, ChessTile.a1);
game.vote(ChessPieces.king, ChessTile.a1);
- I.waitForText("Game complete");
- game.voteIsVisible(ChessPieces.king, ChessTile.a1);
+ I.seeElement(game.locator.playersList.totalSP);
+ await game.voteIsVisible(ChessPieces.king, ChessTile.a1);
I.seeNumberOfElements(
game.locator.chessBoard.avatarOnBoard(ChessTile.a1),
3
);
});
- session(username.user2, () => {
- I.waitForText("Game complete");
- game.voteIsVisible(ChessPieces.rook, ChessTile.a1);
+ session(username.user2, async () => {
+ I.seeElement(game.locator.playersList.totalSP);
+ await game.voteIsVisible(ChessPieces.rook, ChessTile.a1);
I.seeNumberOfElements(
game.locator.chessBoard.avatarOnBoard(ChessTile.a1),
3
);
});
- I.waitForText("Game complete");
- game.voteIsVisible(ChessPieces.pawn, ChessTile.a1);
+ I.seeElement(game.locator.playersList.totalSP);
+ await game.voteIsVisible(ChessPieces.pawn, ChessTile.a1);
I.seeNumberOfElements(
game.locator.chessBoard.avatarOnBoard(ChessTile.a1),
3
@@ -196,7 +202,7 @@ Scenario(
session(username.user2, () => {
game.vote(ChessPieces.rook, ChessTile.b3);
});
- I.waitForText("Game complete");
+ I.seeElement(game.locator.playersList.totalSP);
await assertions.checkIndividualVoteColors(
username.user1,
color.green,
From 8a2c48e498d69fee9c5e2177fd96f61e824ba2d1 Mon Sep 17 00:00:00 2001
From: Justas Bartka <>
Date: Wed, 17 May 2023 23:22:45 -0400
Subject: [PATCH 13/13] removed curly braces (build fail)
---
services/app/src/components/gameFooter/ChessBoardPiece.jsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/services/app/src/components/gameFooter/ChessBoardPiece.jsx b/services/app/src/components/gameFooter/ChessBoardPiece.jsx
index 95d1667b..4b7b1910 100644
--- a/services/app/src/components/gameFooter/ChessBoardPiece.jsx
+++ b/services/app/src/components/gameFooter/ChessBoardPiece.jsx
@@ -85,7 +85,7 @@ const ChessBoardPiece = ({ selectFigure, figureName, figureImg, figureStrength,
.filter((element) => element.figure === figureName)
.map((item, index) => (