-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix playwright tests
- Loading branch information
Showing
10 changed files
with
551 additions
and
428 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
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import type { Page } from '@playwright/test'; | ||
|
||
export async function skipModalDialog(page: Page) { | ||
await page.click('[data-test-id="close-modal-dialog"]'); | ||
await new Promise((resolve) => setTimeout(resolve, 500)); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,132 @@ | ||
import fs from 'node:fs'; | ||
import path from 'node:path'; | ||
import { fileURLToPath } from 'node:url'; | ||
import { Addon, compatPath, nodePath } from './ember'; | ||
|
||
const self = import.meta.url; | ||
|
||
const modeModulesPath = path.resolve( | ||
path.dirname(fileURLToPath(self)), | ||
'./../node_modules' | ||
); | ||
|
||
export function internalPackages(mode: string) { | ||
return [ | ||
Addon('ember & ember-source & @ember/*', mode) | ||
.addAlias(/^ember$/, 'ember-source/dist/packages/ember') | ||
.addAlias(/^ember\/version$/, 'ember-source/dist/packages/ember/version') | ||
.addAliases( | ||
emberPackages().map((pkg) => ({ | ||
find: `@ember/${pkg}`, | ||
replacement: nodePath(`ember-source/dist/packages/@ember/${pkg}`), | ||
})) | ||
), | ||
|
||
Addon('@glimmer/*', mode) | ||
.addAlias( | ||
'@glimmer/validator', | ||
nodePath('@glimmer/validator/dist/modules/es2017') | ||
) | ||
.addAlias( | ||
'@glimmer/tracking/primitives/cache', | ||
nodePath( | ||
`ember-source/dist/packages/@glimmer/tracking/primitives/cache.js` | ||
) | ||
) | ||
.addAlias( | ||
/@glimmer\/tracking$/, | ||
nodePath(`ember-source/dist/packages/@glimmer/tracking`) | ||
) | ||
.addAlias( | ||
'@glimmer/component', | ||
'@glimmer/component/addon/-private/component' | ||
) | ||
.addAlias('@glimmer/env', compatPath('glimmer-env')) | ||
.addAliases( | ||
emberGlimmerDepsPackages().map((pkg) => ({ | ||
find: `@glimmer/${pkg}`, | ||
replacement: nodePath( | ||
`ember-source/dist/dependencies/@glimmer/${pkg}` | ||
), | ||
})) | ||
), | ||
|
||
Addon('backburner', mode).addAlias( | ||
/^backburner$/, | ||
nodePath('backburner.js/dist/es6/backburner.js') | ||
), | ||
|
||
Addon('ember-component-manager', mode).addSelfAlias( | ||
'@glimmer/component/addon/-private/ember-component-manager' | ||
), | ||
|
||
Addon('@ember/test-helpers', mode).addSelfAlias( | ||
'@ember/test-helpers/addon-test-support/@ember/test-helpers' | ||
), | ||
|
||
Addon('@ember/test-waiters', mode).addSelfAlias( | ||
'@ember/test-waiters/addon/@ember/test-waiters' | ||
), | ||
|
||
Addon('ember-compatibility-helpers', mode).addSelfAlias( | ||
compatPath('ember-compatibility-helpers/index.ts') | ||
), | ||
Addon('ember-cli-htmlbars', mode).addSelfAlias( | ||
compatPath('ember-cli-htmlbars/index.ts') | ||
), | ||
Addon('ember-cli-test-loader', mode).addNestedAlias( | ||
'test-support/index', | ||
compatPath('ember-cli-test-loader/index.ts') | ||
), | ||
Addon('ember-cli-version-checker', mode).addSelfAlias( | ||
compatPath('ember-cli-version-checker/index.ts') | ||
), | ||
Addon('compat-ember-decorators', mode).addNestedAlias( | ||
'component', | ||
compatPath('ember-decorators/component.ts') | ||
), | ||
Addon('require', mode).addSelfAlias(compatPath('require/index.ts')), | ||
Addon('ember-template-compiler', mode).addSelfAlias( | ||
'node_modules/ember-source/dist/ember-template-compiler.js' | ||
), | ||
Addon('ember-testing', mode) | ||
.addAlias(/^ember-testing$/, 'ember-source/dist/packages/ember-testing') | ||
.addAlias( | ||
/^ember-testing\//, | ||
'ember-source/dist/packages/ember-testing/' | ||
), | ||
Addon('@embroider/macros', mode).addSelfAlias( | ||
compatPath('embroider-macros/index.ts') | ||
), | ||
Addon('@embroider/util', mode).addSelfAlias( | ||
compatPath('embroider-util/index.ts') | ||
), | ||
Addon('@ember/string', mode).needAlias(), | ||
]; | ||
} | ||
|
||
export function emberGlimmerDepsPackages() { | ||
return fs | ||
.readdirSync( | ||
path.join( | ||
modeModulesPath, | ||
'ember-source', | ||
'dist', | ||
'dependencies', | ||
'@glimmer' | ||
) | ||
) | ||
.filter((el) => !el.includes('env.') && !el.includes('manager.')) | ||
.map((el) => el.replace('.js', '')); | ||
} | ||
|
||
export function emberPackages() { | ||
return fs.readdirSync( | ||
path.join(modeModulesPath, 'ember-source', 'dist', 'packages', '@ember') | ||
); | ||
} | ||
|
||
export function eDataPackages() { | ||
const els = fs.readdirSync(path.join(modeModulesPath, '@ember-data')); | ||
return els.filter((e) => e !== 'private-build-infra'); | ||
} |
Oops, something went wrong.