From ac1bf7e17ec0f47780edb4462f790e6b7afb4dc8 Mon Sep 17 00:00:00 2001 From: ChaosEngine Date: Sat, 16 Mar 2024 13:36:00 +0100 Subject: [PATCH] optimize waits for playwright tests --- DotnetPlayground.Web/e2e/TwoUsers.spec.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/DotnetPlayground.Web/e2e/TwoUsers.spec.js b/DotnetPlayground.Web/e2e/TwoUsers.spec.js index cdafb6b4..5a560f4f 100644 --- a/DotnetPlayground.Web/e2e/TwoUsers.spec.js +++ b/DotnetPlayground.Web/e2e/TwoUsers.spec.js @@ -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); @@ -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.');