Skip to content

Commit

Permalink
remove test workarounds
Browse files Browse the repository at this point in the history
  • Loading branch information
Pedro Ladaria committed Oct 3, 2024
1 parent 64b7fe9 commit 7d81f3b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
6 changes: 0 additions & 6 deletions src/__acceptance_tests__/input-fields-acceptance-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,6 @@ test.each(STORY_TYPES)('PhoneNumberField (%s)', async (storyType) => {

const field = await screen.findByLabelText('Label');

// TODO: https://jira.tid.es/browse/WEB-2047
// libphonenumber is loaded lazily, and if we start typing before the lib is fully loaded,
// the test becomes unstable and the final value in the field may be wrong. As a workaround
// we wait some time before typing anything into the field
await new Promise((r) => setTimeout(r, 400));

await clearAndType(page, field, '654834455');
expect(await getValue(field)).toBe('654 83 44 55');

Expand Down
6 changes: 0 additions & 6 deletions src/__screenshot_tests__/input-fields-screenshot-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -497,12 +497,6 @@ test.each`
const fieldWrapper = await screen.findByTestId('phone-number-field');
const field = await screen.findByLabelText('Label');

// TODO: https://jira.tid.es/browse/WEB-2047
// libphonenumber is loaded lazily, and if we start typing before the lib is fully loaded,
// the test becomes unstable and the final value in the field may be wrong. As a workaround
// we wait some time before typing anything into the field
await new Promise((r) => setTimeout(r, 400));

await field.click({clickCount: 3});
await field.type(number);

Expand Down

0 comments on commit 7d81f3b

Please sign in to comment.