Skip to content
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

test(many): fix failing tests that CI was not reporting #29485

Merged
merged 11 commits into from
May 10, 2024
5 changes: 4 additions & 1 deletion core/scripts/docker.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,7 @@ if (requestHeaded && !hasHeadedConfigFiles) {
console.warn(chalk.yellow.bold('\n⚠️ You are running tests in headed mode, but one or more of your headed config files was not found.\nPlease ensure that both docker-display.txt and docker-display-volume.txt have been created in the correct location.\n'));
}

execa('docker', args, { shell: true, stdio: 'inherit' });
const res = await execa('docker', args, { shell: true, stdio: 'inherit' });

// If underlying scripts failed this whole process should fail too
process.exit(res.exitCode);
brandyscarney marked this conversation as resolved.
Show resolved Hide resolved
3 changes: 2 additions & 1 deletion core/src/components/accordion/test/standalone/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en" dir="ltr">
<head>
<meta charset="UTF-8" />
<title>Accordion - Basic</title>
<title>Accordion - Standalone</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0" />
<link href="../../../../../css/ionic.bundle.css" rel="stylesheet" />
<link href="../../../../../scripts/testing/styles.css" rel="stylesheet" />
Expand Down Expand Up @@ -119,6 +119,7 @@ <h2>Margins In Content</h2>
outline: none;
text-align: left;
padding: 20px 16px;
color: black;
}

.custom-accordion-content {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ config, screenshot, t
test('should update the active item', async ({ page }) => {
const breadcrumbItems = page.locator('ion-breadcrumb');

const addItemButton = page.locator('ion-button#add-btn');
const addItemButton = page.locator('#add-btn');

await expect(breadcrumbItems).toHaveCount(4);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ configs().forEach(({ title, screenshot, config }) => {
await page.goto('/src/components/datetime/test/position', config);
const ionPopoverDidPresent = await page.spyOnEvent('ionPopoverDidPresent');

const openDateTimeBtn = page.locator('ion-button#open-datetime');
const openDateTimeBtn = page.locator('#open-datetime');
await openDateTimeBtn.click();

await ionPopoverDidPresent.next();
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion core/src/components/loading/test/basic/loading.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, screenshot, c

await ionLoadingDidPresent.next();

const button = page.locator('ion-loading ion-button');
const button = page.locator('ion-loading button');

if (browserName === 'webkit') {
await page.keyboard.down('Alt');
Expand Down
10 changes: 5 additions & 5 deletions core/src/components/nav/test/basic/nav.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>

test.describe('pushing a new page', () => {
test('should render the pushed component', async ({ page }) => {
const pageTwoButton = page.locator('ion-button:has-text("Go to Page Two")');
const pageTwoButton = page.locator('button:has-text("Go to Page Two")');
const pageOne = page.locator('page-one');
const pageTwo = page.locator('page-two');

Expand All @@ -32,7 +32,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
});

test('should render the back button', async ({ page }) => {
const pageTwoButton = page.locator('ion-button:has-text("Go to Page Two")');
const pageTwoButton = page.locator('button:has-text("Go to Page Two")');
const pageTwoBackButton = page.locator('page-two ion-back-button');

await pageTwoButton.click();
Expand All @@ -45,7 +45,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
test('back button should pop to the previous page', async ({ page }) => {
const pageOne = page.locator('page-one');
const pageTwo = page.locator('page-two');
const pageTwoButton = page.locator('ion-button:has-text("Go to Page Two")');
const pageTwoButton = page.locator('button:has-text("Go to Page Two")');
const pageTwoBackButton = page.locator('page-two ion-back-button');

await pageTwoButton.click();
Expand All @@ -65,8 +65,8 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
const pageTwo = page.locator('page-two');
const pageThree = page.locator('page-three');

const pageTwoButton = page.locator('ion-button:has-text("Go to Page Two")');
const pageThreeButton = page.locator('ion-button:has-text("Go to Page Three")');
const pageTwoButton = page.locator('button:has-text("Go to Page Two")');
const pageThreeButton = page.locator('button:has-text("Go to Page Three")');

await pageTwoButton.click();
await page.waitForChanges();
Expand Down
12 changes: 6 additions & 6 deletions core/src/components/nav/test/nested/nav.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
const pageOne = page.locator('page-one');
const pageTwo = page.locator('page-two');

const pageTwoButton = page.locator('ion-button:has-text("Go to Page 2")');
const pageTwoTwoButton = page.locator('ion-button:has-text("Go to Page 2.2")');
const pageTwoButton = page.locator('button:has-text("Go to Page 2")');
const pageTwoTwoButton = page.locator('button:has-text("Go to Page 2.2")');

await pageTwoButton.click();
await page.waitForChanges();
Expand All @@ -35,7 +35,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
await expect(pageTwoOne).toHaveCount(1);
await expect(pageTwoTwo).toBeVisible();

const pageThreeButton = page.locator('ion-button:has-text("Go to Page 3")');
const pageThreeButton = page.locator('button:has-text("Go to Page 3")');

await pageThreeButton.click();
await page.waitForChanges();
Expand All @@ -49,8 +49,8 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>

test.describe('back button', () => {
test('should work with nested ion-nav', async ({ page }) => {
const pageTwoButton = page.locator('ion-button:has-text("Go to Page 2")');
const pageTwoTwoButton = page.locator('ion-button:has-text("Go to Page 2.2")');
const pageTwoButton = page.locator('button:has-text("Go to Page 2")');
const pageTwoTwoButton = page.locator('button:has-text("Go to Page 2.2")');

await pageTwoButton.click();
await page.waitForChanges();
Expand All @@ -61,7 +61,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
await pageTwoTwoButton.click();
await page.waitForChanges();

const pageThreeButton = page.locator('ion-button:has-text("Go to Page 3")');
const pageThreeButton = page.locator('button:has-text("Go to Page 3")');
const pageThreeBackButton = page.locator('page-three ion-back-button');

await pageThreeButton.click();
Expand Down
14 changes: 7 additions & 7 deletions core/src/components/nav/test/routing/nav.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
const pageOne = page.locator('page-one');
const pageTwo = page.locator('page-two');

const pageOneButton = page.locator('ion-button:has-text("Go to Page One")');
const pageTwoButton = page.locator('ion-button:has-text("Go to Page Two")');
const pageOneButton = page.locator('button:has-text("Go to Page One")');
const pageTwoButton = page.locator('button:has-text("Go to Page Two")');

await pageOneButton.click();
await page.waitForChanges();
Expand All @@ -45,7 +45,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
});

test('should render the back button', async ({ page }) => {
const pageOneButton = page.locator('ion-button:has-text("Go to Page One")');
const pageOneButton = page.locator('button:has-text("Go to Page One")');
const pageOneBackButton = page.locator('page-one ion-back-button');

await pageOneButton.click();
Expand All @@ -59,7 +59,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
const pageRoot = page.locator('page-root');
const pageOne = page.locator('page-one');

const pageOneButton = page.locator('ion-button:has-text("Go to Page One")');
const pageOneButton = page.locator('button:has-text("Go to Page One")');
const pageOneBackButton = page.locator('page-one ion-back-button');

await pageOneButton.click();
Expand All @@ -80,9 +80,9 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
const pageTwo = page.locator('page-two');
const pageThree = page.locator('page-three');

const pageOneButton = page.locator('ion-button:has-text("Go to Page One")');
const pageTwoButton = page.locator('ion-button:has-text("Go to Page Two")');
const pageThreeButton = page.locator('ion-button:has-text("Go to Page Three")');
const pageOneButton = page.locator('button:has-text("Go to Page One")');
const pageTwoButton = page.locator('button:has-text("Go to Page Two")');
const pageThreeButton = page.locator('button:has-text("Go to Page Three")');

await pageOneButton.click();
await page.waitForChanges();
Expand Down