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): local e2e test hanging for sendYes #13010

Closed
wants to merge 5 commits into from
Closed
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
4 changes: 3 additions & 1 deletion packages/amplify-e2e-core/src/init/amplifyPush.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ export const amplifyPush = async (cwd: string, testingWithLatestCodebase = false
await spawn(getCLIPath(testingWithLatestCodebase), pushArgs, { cwd, stripColors: true, noOutputTimeout: pushTimeoutMS })
.wait('Are you sure you want to continue?')
.sendYes()
.sendCarriageReturn()
.wait('Do you want to generate code for your newly created GraphQL API')
.sendConfirmNo()
.sendNo()
.sendCarriageReturn()
.wait(/.*/)
.runAsync();
};
Expand Down
13 changes: 8 additions & 5 deletions packages/amplify-e2e-tests/sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
AWS_ACCESS_KEY_ID=<your-access-key>
AWS_SECRET_ACCESS_KEY=<your-secret-access-key>
AWS_SESSION_TOKEN=<optional-session-token>
CLI_REGION=<region>

# Used for Auth Hosted UI
FACEBOOK_APP_ID=fbAppId
Expand All @@ -20,12 +21,14 @@ APPLE_KEY_ID=2QLZXKYJ8J
APPLE_PRIVATE_KEY=----BEGIN PRIVATE KEY-----MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgIltgNsTgTfSzUadYiCS0VYtDDMFln/J8i1yJsSIw5g+gCgYIKoZIzj0DAQehRANCAASI8E0L/DhR/mIfTT07v3VwQu6q8I76lgn7kFhT0HvWoLuHKGQFcFkXXCgztgBrprzd419mUChAnKE6y89bWcNw----END PRIVATE KEY----
APPLE_PRIVATE_KEY_2=----BEGIN PRIVATE KEY-----MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgIltgNsTgTfSzUadYiCS0VYtDDMFln/J8i1yJsSIw5g+gCgYIKoZIzj0DAQehRANCAASI8E0L/DhR/mIfTT07v3VwQu6q8I76lgn7kFhT0HvWoLuHKGQFcFkXXCgztgBrprzd419mUChAnKE6y89bWcNw----END PRIVATE KEY----

#Used for delete test
AWS_ACCESS_KEY_ID=<your-access-key>
AWS_SECRET_ACCESS_KEY=<your-secret-access-key>
CLI_REGION=<region>

# Used for cleanup script
CIRCLECI_TOKEN = '<your token>' # Token used for querying CircleCI to get the build details
CIRCLE_PROJECT_USERNAME='<your github username>'
CIRCLE_PROJECT_REPONAME='amplify-cli'

# Path to the Amplify CLI executable.
# When working locally it should be set to the `bin/amplify` file in the workspace.
# e.g. "packages/amplify-cli/bin/amplify".
# When running regular e2e test, if working locally with migration test, it should point to older version of amplify.
# Absolute paths are recommended.
AMPLIFY_PATH=<amplify-cli-executable>