-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(img): migrate tests to playwright (#25488)
- Loading branch information
1 parent
e52392e
commit b6e9c01
Showing
30 changed files
with
41 additions
and
36 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { expect } from '@playwright/test'; | ||
import { test } from '@utils/test/playwright'; | ||
|
||
test.describe('img: basic', () => { | ||
test('should not have visual regressions', async ({ page }) => { | ||
await page.goto('/src/components/img/test/basic'); | ||
|
||
await page.setIonViewport(); | ||
|
||
expect(await page.screenshot()).toMatchSnapshot(`img-basic-${page.getSnapshotSettings()}.png`); | ||
}); | ||
}); |
Binary file added
BIN
+73 KB
...s/img/test/basic/img.e2e.ts-snapshots/img-basic-ios-ltr-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+46.5 KB
.../img/test/basic/img.e2e.ts-snapshots/img-basic-ios-ltr-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+62.2 KB
...s/img/test/basic/img.e2e.ts-snapshots/img-basic-ios-ltr-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+77.8 KB
...s/img/test/basic/img.e2e.ts-snapshots/img-basic-ios-rtl-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+48.1 KB
.../img/test/basic/img.e2e.ts-snapshots/img-basic-ios-rtl-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+62.2 KB
...s/img/test/basic/img.e2e.ts-snapshots/img-basic-ios-rtl-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+73.7 KB
...ts/img/test/basic/img.e2e.ts-snapshots/img-basic-md-ltr-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+47 KB
...s/img/test/basic/img.e2e.ts-snapshots/img-basic-md-ltr-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+63.3 KB
...ts/img/test/basic/img.e2e.ts-snapshots/img-basic-md-ltr-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+78.3 KB
...ts/img/test/basic/img.e2e.ts-snapshots/img-basic-md-rtl-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+48.6 KB
...s/img/test/basic/img.e2e.ts-snapshots/img-basic-md-rtl-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+63.3 KB
...ts/img/test/basic/img.e2e.ts-snapshots/img-basic-md-rtl-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { expect } from '@playwright/test'; | ||
import { test } from '@utils/test/playwright'; | ||
|
||
test.describe('img: draggable', () => { | ||
test('should correctly set draggable attribute on inner img element', async ({ page }) => { | ||
await page.goto('/src/components/img/test/draggable'); | ||
|
||
const imgDraggableTrue = page.locator('#img-draggable-true img'); | ||
expect(imgDraggableTrue).toHaveAttribute('draggable', 'true'); | ||
|
||
const imgDraggableFalse = page.locator('#img-draggable-false img'); | ||
expect(imgDraggableFalse).toHaveAttribute('draggable', 'false'); | ||
|
||
const imgDraggableUnset = page.locator('#img-draggable-unset img'); | ||
expect(imgDraggableUnset).toHaveAttribute('draggable', ''); | ||
}); | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { expect } from '@playwright/test'; | ||
import { test } from '@utils/test/playwright'; | ||
|
||
test.describe('img: standalone', () => { | ||
test('should not have visual regressions', async ({ page }) => { | ||
await page.goto('/src/components/img/test/standalone'); | ||
|
||
await page.setIonViewport(); | ||
|
||
expect(await page.screenshot()).toMatchSnapshot(`img-standalone-${page.getSnapshotSettings()}.png`); | ||
}); | ||
}); |
Binary file added
BIN
+61 KB
.../standalone/img.e2e.ts-snapshots/img-standalone-ios-ltr-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+23.5 KB
...standalone/img.e2e.ts-snapshots/img-standalone-ios-ltr-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+49 KB
.../standalone/img.e2e.ts-snapshots/img-standalone-ios-ltr-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+61.4 KB
.../standalone/img.e2e.ts-snapshots/img-standalone-ios-rtl-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+23.8 KB
...standalone/img.e2e.ts-snapshots/img-standalone-ios-rtl-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+48.7 KB
.../standalone/img.e2e.ts-snapshots/img-standalone-ios-rtl-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+60.8 KB
...t/standalone/img.e2e.ts-snapshots/img-standalone-md-ltr-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+22.1 KB
.../standalone/img.e2e.ts-snapshots/img-standalone-md-ltr-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+47.6 KB
...t/standalone/img.e2e.ts-snapshots/img-standalone-md-ltr-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+61.2 KB
...t/standalone/img.e2e.ts-snapshots/img-standalone-md-rtl-Mobile-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+22.5 KB
.../standalone/img.e2e.ts-snapshots/img-standalone-md-rtl-Mobile-Firefox-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+47.3 KB
...t/standalone/img.e2e.ts-snapshots/img-standalone-md-rtl-Mobile-Safari-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.