mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
chore(): sync with main
This commit is contained in:
@@ -108,29 +108,6 @@ test.describe('overlays: focus', () => {
|
||||
test.beforeEach(({ skip }) => {
|
||||
skip.rtl();
|
||||
});
|
||||
test('should not focus the overlay container if element inside of overlay is focused', async ({ page }) => {
|
||||
await page.setContent(`
|
||||
<ion-button id="open-modal">Show Modal</ion-button>
|
||||
<ion-modal trigger="open-modal">
|
||||
<ion-content>
|
||||
<ion-input autofocus="true"></ion-input>
|
||||
</ion-content>
|
||||
</ion-modal>
|
||||
`);
|
||||
|
||||
const ionModalDidPresent = await page.spyOnEvent('ionModalDidPresent');
|
||||
const button = page.locator('ion-button');
|
||||
const input = page.locator('ion-input');
|
||||
|
||||
await button.click();
|
||||
await input.evaluate((el: HTMLIonInputElement) => el.setFocus());
|
||||
|
||||
await ionModalDidPresent.next();
|
||||
await page.waitForChanges();
|
||||
|
||||
await expect(page.locator('ion-input input')).toBeFocused();
|
||||
});
|
||||
|
||||
test('should not select a hidden focusable element', async ({ page, browserName }) => {
|
||||
await page.setContent(`
|
||||
<style>
|
||||
|
||||
Reference in New Issue
Block a user