Skip to content

Commit

Permalink
Make language switching test less flaky by not depending on any windows
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer committed Jun 17, 2020
1 parent fd1de68 commit 7efb464
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions __tests__/integration/mirador/language_switching.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
describe('Language Switching', () => {
describe('Application Language', () => {
it('allows the user to switch the application language', async () => {
await page.goto('http://127.0.0.1:4488/__tests__/integration/mirador/');
await page.goto('http://127.0.0.1:4488/__tests__/integration/mirador/blank.html');

await expect(page).toClick('#menuBtn');
await expect(page).toMatchElement('ul[role="menu"]');
Expand All @@ -13,12 +13,12 @@ describe('Language Switching', () => {
await expect(page).toMatchElement('li', { text: 'Deutsch' });
await expect(page).toMatchElement('li', { text: 'English' });

await expect(page).toMatchElement('[aria-label="Toggle sidebar"]');
await expect(page).not.toMatchElement('[aria-label="Seitenleiste umschalten"]');
await expect(page).toMatchElement('[aria-label="Start Here"]');
await expect(page).not.toMatchElement('[aria-label="Fang hier an"]');
await expect(page).toClick('li', { text: 'Deutsch' });
await page.waitFor(1000);
await expect(page).not.toMatchElement('[aria-label="Toggle sidebar"]');
await expect(page).toMatchElement('[aria-label="Seitenleiste umschalten"]');
await expect(page).not.toMatchElement('[aria-label="Start Here"]');
await expect(page).toMatchElement('[aria-label="Fang hier an"]');
});
});
});

0 comments on commit 7efb464

Please sign in to comment.