Skip to content

Commit

Permalink
Simplify test
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy committed Nov 2, 2023
1 parent 6a219cf commit 9547f6e
Showing 1 changed file with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,20 +97,9 @@ describe('Analytics', () => {

it('should not allow an invalid analytics id to be saved', async () => {
await page.click(INPUT_SELECTOR);
const inputLength = await page.$eval(INPUT_SELECTOR, (el) => {
return el.value.length;
});

for (let iter = 0; iter < inputLength; iter++) {
// disable eslint to prevent overlapping .act calls
// eslint-disable-next-line no-await-in-loop
await page.keyboard.press('Backspace');
}
await page.keyboard.type('INVALID');
await expect(page).toClick('button', { text: 'Save' });

await page.waitForTimeout(400);
await expect(page).not.toMatchTextContent('Setting saved.');
await expect(page).toMatchTextContent('Invalid ID format');
});

Expand Down

0 comments on commit 9547f6e

Please sign in to comment.