-
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.
fix(modal): card modal shadow now shows up correctly on ipad (#24203)
- Loading branch information
1 parent
59e27bd
commit 5d4f5af
Showing
4 changed files
with
104 additions
and
2 deletions.
There are no files selected for viewing
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
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
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 |
---|---|---|
@@ -1,10 +1,102 @@ | ||
import { newE2EPage } from '@stencil/core/testing'; | ||
import { testModal } from '../test.utils'; | ||
|
||
const DIRECTORY = 'card'; | ||
|
||
test('modal: card', async () => { | ||
await testModal(DIRECTORY, '#card', true); | ||
}); | ||
|
||
test('modal: card - custom', async () => { | ||
await testModal(DIRECTORY, '#card-custom', true); | ||
}); | ||
|
||
test('modal: card - Stacked, Tablet', async () => { | ||
const page = await newE2EPage({ url: '/src/components/modal/test/card?ionic:_testing=true' }); | ||
|
||
// Ensure that we get tablet styles | ||
await page.setViewport({ width: 768, height: 500 }); | ||
|
||
const screenshotCompares = []; | ||
const ionModalDidPresent = await page.spyOnEvent('ionModalDidPresent'); | ||
|
||
await page.click('#card'); | ||
await page.waitForSelector('#card'); | ||
|
||
await ionModalDidPresent.next(); | ||
|
||
screenshotCompares.push(await page.compareScreenshot()); | ||
|
||
await page.click('.add'); | ||
await page.waitForSelector('.add'); | ||
|
||
await ionModalDidPresent.next(); | ||
|
||
screenshotCompares.push(await page.compareScreenshot()); | ||
}); | ||
|
||
test('modal: card - Stacked, Mobile', async () => { | ||
const page = await newE2EPage({ url: '/src/components/modal/test/card?ionic:_testing=true' }); | ||
|
||
const screenshotCompares = []; | ||
const ionModalDidPresent = await page.spyOnEvent('ionModalDidPresent'); | ||
|
||
await page.click('#card'); | ||
await page.waitForSelector('#card'); | ||
|
||
await ionModalDidPresent.next(); | ||
|
||
screenshotCompares.push(await page.compareScreenshot()); | ||
|
||
await page.click('.add'); | ||
await page.waitForSelector('.add'); | ||
|
||
await ionModalDidPresent.next(); | ||
|
||
screenshotCompares.push(await page.compareScreenshot()); | ||
}); | ||
|
||
test('modal: card - Custom, Stacked, Tablet', async () => { | ||
const page = await newE2EPage({ url: '/src/components/modal/test/card?ionic:_testing=true' }); | ||
|
||
// Ensure that we get tablet styles | ||
await page.setViewport({ width: 768, height: 500 }); | ||
|
||
const screenshotCompares = []; | ||
const ionModalDidPresent = await page.spyOnEvent('ionModalDidPresent'); | ||
|
||
await page.click('#card-custom'); | ||
await page.waitForSelector('#card-custom'); | ||
|
||
await ionModalDidPresent.next(); | ||
|
||
screenshotCompares.push(await page.compareScreenshot()); | ||
|
||
await page.click('.add'); | ||
await page.waitForSelector('.add'); | ||
|
||
await ionModalDidPresent.next(); | ||
|
||
screenshotCompares.push(await page.compareScreenshot()); | ||
}); | ||
|
||
test('modal: card - Custom, Stacked, Mobile', async () => { | ||
const page = await newE2EPage({ url: '/src/components/modal/test/card?ionic:_testing=true' }); | ||
|
||
const screenshotCompares = []; | ||
const ionModalDidPresent = await page.spyOnEvent('ionModalDidPresent'); | ||
|
||
await page.click('#card-custom'); | ||
await page.waitForSelector('#card-custom'); | ||
|
||
await ionModalDidPresent.next(); | ||
|
||
screenshotCompares.push(await page.compareScreenshot()); | ||
|
||
await page.click('.add'); | ||
await page.waitForSelector('.add'); | ||
|
||
await ionModalDidPresent.next(); | ||
|
||
screenshotCompares.push(await page.compareScreenshot()); | ||
}); |
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