Skip to content

test(picker-internal): screenshot and a11y (axe) #25150

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 35 commits into from
Apr 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
ea4074b
test(picker-internal): screenshot and a11y
sean-perkins Apr 19, 2022
a5d2143
chore(): add updated snapshots
Ionitron Apr 19, 2022
b71885c
chore(): remove reuse existing server
sean-perkins Apr 19, 2022
884e6b3
chore(): lint / prettier
sean-perkins Apr 19, 2022
1de3bee
Merge branch 'main' into FW-1228
sean-perkins Apr 19, 2022
4339c12
fix(): screenshot naming for modal examples
sean-perkins Apr 19, 2022
5e0939d
chore(): remove reference screenshots
sean-perkins Apr 19, 2022
c9afc97
Merge remote-tracking branch 'origin/FW-1228' into FW-1228
sean-perkins Apr 19, 2022
5edced0
chore(): add updated snapshots
Ionitron Apr 19, 2022
ca8d8c8
chore(): try using spies instead of waitFor states
sean-perkins Apr 19, 2022
cfc3876
chore(): remove reference screenshots
sean-perkins Apr 19, 2022
9f55d70
fix(): timeout for popover delay on certain browsers
sean-perkins Apr 19, 2022
2e6697b
chore(): add updated snapshots
Ionitron Apr 19, 2022
6f24fcf
Merge branch 'main' into FW-1228
sean-perkins Apr 20, 2022
30a4099
chore(): remove reference screenshots
sean-perkins Apr 20, 2022
4408116
chore(): add updated snapshots
Ionitron Apr 20, 2022
e45d6f5
chore(): skip overlay screenshots on mobile safari linux
sean-perkins Apr 21, 2022
f354e9e
chore(): delete reference screenshots
sean-perkins Apr 21, 2022
7a09bb9
chore(): alt approach to skip mobile safari linux
sean-perkins Apr 21, 2022
738e320
chore(): add updated snapshots
Ionitron Apr 21, 2022
7a7c261
chore(): skip based on user agent
sean-perkins Apr 22, 2022
d16aa65
Merge remote-tracking branch 'origin/FW-1228' into FW-1228
sean-perkins Apr 22, 2022
90cf1aa
chore(): delete reference screenshots
sean-perkins Apr 22, 2022
91faf43
chore(): add updated snapshots
Ionitron Apr 22, 2022
999e0c3
Merge branch 'main' into FW-1228
sean-perkins Apr 22, 2022
4dddfd1
chore(): wait for changes
sean-perkins Apr 22, 2022
60730ea
chore(): add updated snapshots
Ionitron Apr 22, 2022
6609d7b
Merge branch 'main' into FW-1228
sean-perkins Apr 26, 2022
fb8b341
chore(): add tech debt task
sean-perkins Apr 26, 2022
df64a33
Merge branch 'main' into FW-1228
sean-perkins Apr 26, 2022
af6806e
chore(): lint & prettier
sean-perkins Apr 26, 2022
892c504
Merge remote-tracking branch 'origin/FW-1228' into FW-1228
sean-perkins Apr 26, 2022
eeb79f2
Merge branch 'main' into FW-1228
sean-perkins Apr 27, 2022
962fdca
Merge branch 'main' into FW-1228
sean-perkins Apr 27, 2022
edabcf1
Merge branch 'main' into FW-1228
liamdebeasi Apr 27, 2022
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
399 changes: 267 additions & 132 deletions core/package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"loader/"
],
"dependencies": {
"@axe-core/playwright": "^4.4.2",
"@stencil/core": "^2.14.2",
"ionicons": "^6.0.0",
"tslib": "^2.1.0"
Expand Down
11 changes: 0 additions & 11 deletions core/src/components/picker-internal/test/a11y/e2e.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import AxeBuilder from '@axe-core/playwright';
import { expect } from '@playwright/test';
import { test } from '@utils/test/playwright';

test.describe('picker-internal: a11y', () => {
test('should not have accessibility violations', async ({ page }) => {
await page.goto(`/src/components/picker-internal/test/a11y`);

const results = await new AxeBuilder({ page }).analyze();

expect(results.violations).toEqual([]);
});
});
62 changes: 0 additions & 62 deletions core/src/components/picker-internal/test/basic/e2e.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import { expect } from '@playwright/test';
import { test } from '@utils/test/playwright';

const isMobileSafariLinux = (userAgent?: string) => {
return userAgent?.includes('Linux') === true && userAgent?.includes('Mobile Safari') === true;
};

test.describe('picker-internal', () => {
test('inline pickers should not have visual regression', async ({ page }) => {
await page.goto(`/src/components/picker-internal/test/basic`);

await page.setIonViewport();

expect(await page.screenshot({ fullPage: true })).toMatchSnapshot(
`picker-internal-inline-diff-${page.getSnapshotSettings()}.png`
);
});

test.describe('within overlay:', () => {
// TODO (FW-1397): Remove this test.skip when the issue is fixed.
test.skip(
({ userAgent }) => isMobileSafariLinux(userAgent),
'Mobile Safari on Linux renders the selected option incorrectly'
);

test('popover: should not have visual regression', async ({ page }) => {
await page.goto(`/src/components/picker-internal/test/basic`);

await page.setIonViewport();

await page.click('#popover');

await page.spyOnEvent('ionPopoverDidPresent');
await page.waitForChanges();

expect(await page.screenshot({ fullPage: true })).toMatchSnapshot(
`picker-internal-popover-diff-${page.getSnapshotSettings()}.png`
);
});

test('modal: should not have visual regression', async ({ page }) => {
await page.goto(`/src/components/picker-internal/test/basic`);

await page.setIonViewport();

await page.click('#modal');

await page.spyOnEvent('ionModalDidPresent');
await page.waitForChanges();

expect(await page.screenshot({ fullPage: true })).toMatchSnapshot(
`picker-internal-modal-diff-${page.getSnapshotSettings()}.png`
);
});
});
});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.