Skip to content

Commit

Permalink
fix flaky formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
cameroncaci committed Sep 3, 2024
1 parent c6684a4 commit 6c02dd5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@ test.describe('Services counselor user', () => {
// Fill out the HHG and NTS accounting codes
await page.getByTestId('hhgTacInput').fill(tac.tac);
const today = new Date();
const formattedDate = new Intl.DateTimeFormat('en-GB', {
day: '2-digit',
month: 'short',
year: 'numeric',
}).format(today);
const day = new Intl.DateTimeFormat('en', { day: '2-digit' }).format(today);
const month = new Intl.DateTimeFormat('en', { month: 'short' }).format(today);
const year = new Intl.DateTimeFormat('en', { year: 'numeric' }).format(today);
const formattedDate = `${day} ${month} ${year}`;

await page.locator('input[name="issueDate"]').fill(formattedDate);

await page.getByTestId('hhgSacInput').fill('4K988AS098F');
Expand Down
10 changes: 5 additions & 5 deletions playwright/tests/office/txo/tooFlowsNTS.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,11 @@ test.describe('TOO user', () => {
// Fill out the HHG and NTS accounting codes
await page.getByTestId('hhgTacInput').fill(tac.tac);
const today = new Date();
const formattedDate = new Intl.DateTimeFormat('en-GB', {
day: '2-digit',
month: 'short',
year: 'numeric',
}).format(today);
const day = new Intl.DateTimeFormat('en', { day: '2-digit' }).format(today);
const month = new Intl.DateTimeFormat('en', { month: 'short' }).format(today);
const year = new Intl.DateTimeFormat('en', { year: 'numeric' }).format(today);
const formattedDate = `${day} ${month} ${year}`;

await page.locator('input[name="issueDate"]').fill(formattedDate);

await page.getByTestId('hhgSacInput').fill('4K988AS098F');
Expand Down

0 comments on commit 6c02dd5

Please sign in to comment.