Skip to content

Commit

Permalink
optimize waits for playwright tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaosEngine committed Mar 16, 2024
1 parent f27b437 commit ac1bf7e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion DotnetPlayground.Web/e2e/TwoUsers.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ test('P1 create game, P2 joins, P2 wins', async () => {
await joinCreatedGame(p2, p1.userName);

const randX = getRandomInt(0, 8), randY = getRandomInt(0, 19);
await delay(4 * 1000);//wait for signalR to settle in (?)
await delay(3 * 1000);//wait for signalR to settle in (?)

//put 5x p1 points and 5x p2 point interchangeably and verify existence
await putPointForPlayer(p1, randX + 11, randY + 3, p2);
Expand Down Expand Up @@ -208,6 +208,9 @@ test('P1 create game, P2 joins, P2 wins', async () => {
await putPointForPlayer(p2, randX + 6, randY + 5);
await putPointForPlayer(p2, randX + 5, randY + 4);
await putPointForPlayer(p2, randX + 6, randY + 3);

await delay(4 * 1000);//wait for signalR to settle in (?)

await verifyWin(p1, 'And the winner is... blue.');
await verifyWin(p2, 'And the winner is... blue.');

Expand Down

0 comments on commit ac1bf7e

Please sign in to comment.