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

fix: e2e testing #554

Merged
merged 9 commits into from
Mar 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .circleci/config.base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ install_cli_with_local_codegen: &install_cli
startLocalRegistry "$(pwd)/.circleci/verdaccio.yaml"
setNpmRegistryUrlToLocal
changeNpmGlobalPath
npm install -g @aws-amplify/cli-internal
npm install -g @aws-amplify/cli-internal@11.0.0-rc.e5f00c392.0
amplify -v
npm list --global --depth=1
unsetNpmRegistryUrl
Expand Down Expand Up @@ -184,7 +184,7 @@ jobs:
name: Run e2e tests
command: |
cd packages/amplify-codegen-e2e-tests
yarn e2e --maxWorkers=3 $TEST_SUITE
yarn e2e --forceExit --maxWorkers=3 $TEST_SUITE
no_output_timeout: 20m
- store_test_results:
path: packages/amplify-codegen-e2e-tests/
Expand Down Expand Up @@ -215,7 +215,7 @@ jobs:
name: Run e2e tests
command: |
cd packages/amplify-codegen-e2e-tests
yarn e2e --maxWorkers=3 $TEST_SUITE
yarn e2e --forceExit --maxWorkers=3 $TEST_SUITE
no_output_timeout: 20m
- store_test_results:
path: packages/amplify-codegen-e2e-tests/
Expand All @@ -241,7 +241,7 @@ jobs:
name: Run e2e tests
command: |
cd packages/amplify-codegen-e2e-tests
yarn e2e --maxWorkers=3 $TEST_SUITE
yarn e2e --forceExit --maxWorkers=3 $TEST_SUITE
no_output_timeout: 20m
- store_test_results:
path: packages/amplify-codegen-e2e-tests/
Expand Down
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ install_cli_with_local_codegen: &ref_3
startLocalRegistry "$(pwd)/.circleci/verdaccio.yaml"
setNpmRegistryUrlToLocal
changeNpmGlobalPath
npm install -g @aws-amplify/cli-internal
npm install -g @aws-amplify/cli-internal@11.0.0-rc.e5f00c392.0
amplify -v
npm list --global --depth=1
unsetNpmRegistryUrl
Expand Down Expand Up @@ -197,7 +197,7 @@ jobs:
name: Run e2e tests
command: |
cd packages/amplify-codegen-e2e-tests
yarn e2e --maxWorkers=3 $TEST_SUITE
yarn e2e --forceExit --maxWorkers=3 $TEST_SUITE
no_output_timeout: 20m
- store_test_results:
path: packages/amplify-codegen-e2e-tests/
Expand Down Expand Up @@ -228,7 +228,7 @@ jobs:
name: Run e2e tests
command: |
cd packages/amplify-codegen-e2e-tests
yarn e2e --maxWorkers=3 $TEST_SUITE
yarn e2e --forceExit --maxWorkers=3 $TEST_SUITE
no_output_timeout: 20m
- store_test_results:
path: packages/amplify-codegen-e2e-tests/
Expand All @@ -254,7 +254,7 @@ jobs:
name: Run e2e tests
command: |
cd packages/amplify-codegen-e2e-tests
yarn e2e --maxWorkers=3 $TEST_SUITE
yarn e2e --forceExit --maxWorkers=3 $TEST_SUITE
no_output_timeout: 20m
- store_test_results:
path: packages/amplify-codegen-e2e-tests/
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
"@commitlint/cli": "^17.0.3",
"@commitlint/config-conventional": "^17.0.3",
"@commitlint/config-lerna-scopes": "^17.0.2",
"@types/jest": "^28.1.6",
"@types/js-yaml": "^3.12.3",
"@types/jest": "^27.0.0",
"@types/js-yaml": "^4.0.0",
"@typescript-eslint/eslint-plugin": "^4.0.0",
"@typescript-eslint/parser": "^4.0.0",
"cmd-shim": "^3.0.3",
Expand All @@ -84,20 +84,20 @@
"eslint-plugin-spellcheck": "^0.0.17",
"glob": "^7.1.6",
"husky": "^3.0.3",
"jest": "^28.1.3",
"jest-circus": "^28.1.3",
"jest-junit": "^14.0.0",
"js-yaml": "3.13.1",
"jest": "^27.0.0",
"jest-circus": "^27.0.0",
"jest-junit": "^12.0.0",
"js-yaml": "^4.0.0",
"lnk": "1.1.0",
"prettier": "^1.19.1",
"prettier-eslint": "^9.0.1",
"pretty-quick": "^3.1.0",
"rimraf": "^3.0.0",
"ts-jest": "^28.0.7",
"ts-jest": "^27.0.0",
"ts-node": "^8.10.1",
"typescript": "4.7.4",
"amplify-cli-core": "^3.0.0",
"graphql-transformer-core": "^7.2.1",
"amplify-cli-core": "4.0.0-rc.e5f00c392.0",
"graphql-transformer-core": "^8.0.0",
"amplify-headless-interface": "^1.13.1"
},
"resolutions": {
Expand Down
4 changes: 2 additions & 2 deletions packages/amplify-codegen-e2e-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
"uuid": "7.0.1"
},
"peerDependencies": {
"amplify-cli-core": "^3.0.0",
"amplify-cli-core": "4.0.0-rc.e5f00c392.0",
"amplify-headless-interface": "^1.13.1",
"graphql-transformer-core": "^7.6.6"
"graphql-transformer-core": "^8.0.0"
}
}
8 changes: 4 additions & 4 deletions packages/amplify-codegen-e2e-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@
"yargs": "^15.1.0"
},
"devDependencies": {
"@types/jest": "^28.1.6",
"ts-node": "^8.9.0"
"@types/jest": "^27.0.0",
"ts-node": "^8.10.1"
},
"peerDependencies": {
"amplify-cli-core": "^3.0.0",
"graphql-transformer-core": "^7.6.6"
"amplify-cli-core": "4.0.0-rc.e5f00c392.0",
"graphql-transformer-core": "^8.0.0"
},
"jest": {
"verbose": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ export async function testRemoveCodegen(config: AmplifyFrontendConfig, projectRo
expect(isNotEmptyDir(path.join(projectRoot, config.graphqlCodegenDir))).toBe(true);
// graphql configuration should be updated to remove previous configuration
const generatedConfig = load(readFileSync(getGraphQLConfigFilePath(projectRoot)).toString());
expect(Object.keys(generatedConfig.projects).length).toEqual(0);
}
expect(Object.keys(generatedConfig['projects']).length).toEqual(0);
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ export async function testValidGraphQLConfig(
expect(existsSync(getGraphQLConfigFilePath(projectRoot))).toBe(true);

const generatedConfig = load(readFileSync(getGraphQLConfigFilePath(projectRoot)).toString());
Object.keys(generatedConfig.projects).forEach(projectName => {
const projectConfig = generatedConfig.projects[projectName];
Object.keys(generatedConfig['projects']).forEach(projectName => {
const projectConfig = generatedConfig['projects'][projectName];
const expectedProjectConfig = constructGraphQLConfig(projectName, config, maxDepth, region, isConfigured);
// check if the graphql codegen configuration is valid
expect(projectConfig).toEqual(expectedProjectConfig);
Expand Down
4 changes: 2 additions & 2 deletions packages/amplify-codegen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
"slash": "^3.0.0"
},
"peerDependencies": {
"amplify-cli-core": "^3.0.0",
"graphql-transformer-core": "^7.2.1"
"amplify-cli-core": "4.0.0-rc.e5f00c392.0",
"graphql-transformer-core": "^8.0.0"
},
"jest": {
"collectCoverage": true,
Expand Down
Loading