diff --git a/packages/amplify-e2e-core/src/categories/auth.ts b/packages/amplify-e2e-core/src/categories/auth.ts index fa71b669b0b..d358b656d76 100644 --- a/packages/amplify-e2e-core/src/categories/auth.ts +++ b/packages/amplify-e2e-core/src/categories/auth.ts @@ -119,12 +119,23 @@ export function addAuthWithGroupTrigger(cwd: string, settings: any): Promise { return new Promise((resolve, reject) => { - spawn(getCLIPath(), ['add', 'api'], { cwd, stripColors: true }) + spawn(getCLIPath(defaultOptions.testingWithLatestCodebase), ['add', 'api'], { cwd, stripColors: true }) .wait('Please select from one of the below mentioned services:') .sendCarriageReturn() - .wait('Provide API name') + .wait(/.*Here is the GraphQL API that we will create. Select a setting to edit or continue.*/) + .sendKeyUp(2) .sendCarriageReturn() .wait('Choose the default authorization type for the API') .send(KEY_DOWN_ARROW) @@ -148,10 +159,9 @@ export function addAuthViaAPIWithTrigger(cwd: string, settings: any): Promise { return new Promise((resolve, reject) => { - spawn(getCLIPath(), ['add', 'api'], { cwd, stripColors: true }) + spawn(getCLIPath(defaultOptions.testingWithLatestCodebase), ['add', 'api'], { cwd, stripColors: true }) .wait('Please select from one of the below mentioned services:') .sendCarriageReturn() - .wait('Provide API name') + .wait(/.*Here is the GraphQL API that we will create. Select a setting to edit or continue.*/) + .sendKeyUp(2) .sendCarriageReturn() .wait('Choose the default authorization type for the API') .send(KEY_DOWN_ARROW) @@ -235,10 +246,9 @@ export function addAuthwithUserPoolGroupsViaAPIWithTrigger(cwd: string, settings .sendCarriageReturn() .wait('Do you want to edit your add-to-group function now?') .sendConfirmNo() - .wait(/.*Do you want to configure advanced settings for the GraphQL API.*/) - .sendCarriageReturn() - .wait('Do you have an annotated GraphQL schema?') + .wait(/.*Configure additional auth types.*/) .sendConfirmNo() + .wait(/.*Here is the GraphQL API that we will create. Select a setting to edit or continue.*/) .sendCarriageReturn() .wait('Choose a schema template:') .sendCarriageReturn()