Skip to content

Commit

Permalink
PLATUI-3359 refactor method to drop one second
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyFothergill committed Dec 11, 2024
1 parent 4c9e5b5 commit 0dab610
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/timeout-dialog/timeout-dialog.browser.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ describe('/components/timeout-dialog', () => {
expect(page.url()).toMatch('/timeout-reached');
});

function twentyTimes(value) { return Array.from({ length: 19 }, () => value); }
function nineteenTimes(value) { return Array.from({ length: 19 }, () => value); }

it('should update the audible time remaining every 20 seconds', async () => {
await renderTimeoutDialog(page, `
Expand All @@ -282,15 +282,15 @@ describe('/components/timeout-dialog', () => {
.toBe('For your security, we will sign you out in 2 minutes.');

expect(allAudibleMessagesDuringLastMinute.slice(0, 19)).toStrictEqual(
twentyTimes('For your security, we will sign you out in 1 minute.'),
nineteenTimes('For your security, we will sign you out in 1 minute.'),
);

expect(allAudibleMessagesDuringLastMinute.slice(20, 39)).toStrictEqual(
twentyTimes('For your security, we will sign you out in 40 seconds.'),
nineteenTimes('For your security, we will sign you out in 40 seconds.'),
);

expect(allAudibleMessagesDuringLastMinute.slice(40, 59)).toStrictEqual(
twentyTimes('For your security, we will sign you out in 20 seconds.'),
nineteenTimes('For your security, we will sign you out in 20 seconds.'),
);

await clockTickSeconds(page, 1);
Expand Down

0 comments on commit 0dab610

Please sign in to comment.