-
Notifications
You must be signed in to change notification settings - Fork 12k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: update E2E tests to test against standalone apps
This commits updates E2E tests to reflect standalone by default.
- Loading branch information
1 parent
ac0db66
commit 2b7c8c4
Showing
49 changed files
with
385 additions
and
889 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 was deleted.
Oops, something went wrong.
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,40 @@ | ||
import { getGlobalVariable } from '../../utils/env'; | ||
import { ng } from '../../utils/process'; | ||
import { updateJsonFile, useCIChrome, useCIDefaults } from '../../utils/project'; | ||
|
||
export default async function () { | ||
await ng('generate', 'app', 'test-project-two', '--no-standalone', '--skip-install'); | ||
await ng('generate', 'e2e', '--related-app-name=test-project-two'); | ||
|
||
// Setup testing to use CI Chrome. | ||
await useCIChrome('test-project-two', './projects/test-project-two/e2e'); | ||
await useCIDefaults('test-project-two'); | ||
|
||
// Make prod use JIT. | ||
|
||
const useWebpackBuilder = !getGlobalVariable('argv')['esbuild']; | ||
// Setup webpack builder if esbuild is not requested on the commandline | ||
await updateJsonFile('angular.json', (json) => { | ||
const build = json['projects']['test-project-two']['architect']['build']; | ||
if (useWebpackBuilder) { | ||
build.builder = '@angular-devkit/build-angular:browser'; | ||
build.options = { | ||
...build.options, | ||
main: build.options.browser, | ||
browser: undefined, | ||
buildOptimizer: false, | ||
}; | ||
|
||
build.configurations.development = { | ||
...build.configurations.development, | ||
vendorChunk: true, | ||
namedChunks: true, | ||
}; | ||
} | ||
|
||
build.options.aot = false; | ||
}); | ||
// Test it works | ||
await ng('e2e', 'test-project-two', '--configuration=production'); | ||
await ng('e2e', 'test-project-two', '--configuration=development'); | ||
} |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.