Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
2be3d91
test(modal): migrate a11y
liamdebeasi Apr 28, 2023
63f2309
test(modal): migrate basic
liamdebeasi Apr 28, 2023
9a29e51
test(modal): migrate can-dismiss
liamdebeasi Apr 28, 2023
40d67b1
test(modal): migrate card
liamdebeasi Apr 28, 2023
a35ba02
test(modal): migrate card-nav
liamdebeasi Apr 28, 2023
b43b7d2
test(modal): migrate card-refresher
liamdebeasi Apr 28, 2023
475d84b
test(modal): migrate card-scroll-target
liamdebeasi Apr 28, 2023
448f94a
test(modal): migrate custom
liamdebeasi Apr 28, 2023
09566f7
test(modal): migrate custom-dialog
liamdebeasi Apr 28, 2023
74f52fd
test(modal): migrate dark-mode
liamdebeasi Apr 28, 2023
e3e83ef
test(modal): migrate inline
liamdebeasi Apr 28, 2023
733551e
test(modal): migrate is-open
liamdebeasi Apr 28, 2023
05fd5be
test(modal): migrate trigger
liamdebeasi Apr 28, 2023
cabaf9e
cleanup
liamdebeasi Apr 28, 2023
f378f3a
test(modal): migrate standalone
liamdebeasi Apr 28, 2023
7fcdb50
test(modal): migrate sheet
liamdebeasi Apr 28, 2023
a075ff4
add missing config
liamdebeasi Apr 28, 2023
7f6219f
add missing screenshot fn
liamdebeasi Apr 28, 2023
9706ee7
Merge remote-tracking branch 'origin/main' into modal-generator
liamdebeasi Apr 28, 2023
942acc2
add missing screenshot fn
liamdebeasi Apr 28, 2023
e02ff69
fix image name
liamdebeasi Apr 28, 2023
6b1d1c0
typo
liamdebeasi Apr 28, 2023
8251207
another typo
liamdebeasi Apr 28, 2023
267e8a6
Merge remote-tracking branch 'origin/main' into modal-generator
liamdebeasi Apr 28, 2023
3c86b20
Merge remote-tracking branch 'origin/main' into modal-generator
liamdebeasi May 4, 2023
3a420f4
chore(): consolidate blocks
liamdebeasi May 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 0 additions & 39 deletions core/src/components/modal/test/a11y/modal.e2e-legacy.ts

This file was deleted.

39 changes: 39 additions & 0 deletions core/src/components/modal/test/a11y/modal.e2e.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import AxeBuilder from '@axe-core/playwright';
import { expect } from '@playwright/test';
import { configs, test } from '@utils/test/playwright';

configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => {
test.describe(title('modal: a11y'), () => {
test('should not have accessibility violations', async ({ page }) => {
await page.goto(`/src/components/modal/test/a11y`, config);

const ionModalDidPresent = await page.spyOnEvent('ionModalDidPresent');
const button = page.locator('#open-modal');
const modal = page.locator('ion-modal .modal-wrapper');

await expect(modal).toHaveAttribute('role', 'dialog');

await button.click();
await ionModalDidPresent.next();

const results = await new AxeBuilder({ page }).analyze();
expect(results.violations).toEqual([]);
});

test('should allow for custom role', async ({ page }) => {
/**
* Note: This example should not be used in production.
* This only serves to check that `role` can be customized.
*/
await page.setContent(
`
<ion-modal role="alertdialog"></ion-modal>
`,
config
);
const modal = page.locator('ion-modal .modal-wrapper');

await expect(modal).toHaveAttribute('role', 'alertdialog');
});
});
});
184 changes: 0 additions & 184 deletions core/src/components/modal/test/basic/modal.e2e-legacy.ts

This file was deleted.

Loading