octicon-rss(16/)
You've already forked ionic-framework
mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 22:44:13 +08:00
chore(): sync with main
This commit is contained in:
octicon-git-branch(16/)
octicon-tag(16/)
octicon-diff(16/tw-mr-1) 457 changed files with 927 additions and 3106 deletions
@@ -1,5 +1,5 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import type { Locator, TestInfo } from '@playwright/test';
|
||||
import { expect } from '@playwright/test';
|
||||
import type { E2EPage, EventSpy } from '@utils/test/playwright';
|
||||
import { test } from '@utils/test/playwright';
|
||||
|
||||
@@ -134,3 +134,31 @@ test.describe('toast: properties', () => {
|
||||
await expect(toast).toHaveClass(/my-custom-class/);
|
||||
});
|
||||
});
|
||||
|
||||
test.describe('toast: duration config', () => {
|
||||
test.beforeEach(({ skip }) => {
|
||||
skip.rtl();
|
||||
skip.mode('ios');
|
||||
});
|
||||
test('should have duration set to 0', async ({ page }) => {
|
||||
await page.setContent(`
|
||||
<ion-toast></ion-toast>
|
||||
`);
|
||||
const toast = page.locator('ion-toast');
|
||||
await expect(toast).toHaveJSProperty('duration', 0);
|
||||
});
|
||||
|
||||
test('should have duration set to 5000', async ({ page }) => {
|
||||
await page.setContent(`
|
||||
<ion-toast></ion-toast>
|
||||
<script>
|
||||
window.Ionic = {
|
||||
config: { toastDuration: 5000 }
|
||||
}
|
||||
</script>
|
||||
`);
|
||||
|
||||
const toast = page.locator('ion-toast');
|
||||
await expect(toast).toHaveJSProperty('duration', 5000);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user