Skip to content

Commit cee10f9

Browse files
committed
fix(amplify-codegen-e2e-core): minor add api walkthrough fix
1 parent ff8bf76 commit cee10f9

File tree

1 file changed

+6
-6
lines changed
  • packages/amplify-codegen-e2e-core/src/categories

1 file changed

+6
-6
lines changed

packages/amplify-codegen-e2e-core/src/categories/api.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,15 @@ const defaultOptions: AddApiOptions = {
3232
testingWithLatestCodebase: false
3333
};
3434

35-
export function addApiWithoutSchema(cwd: string, opts: Partial<AddApiOptions> = {}) {
35+
export function addApiWithoutSchema(cwd: string, opts: Partial<AddApiOptions & { apiKeyExpirationDays: number }> = {}) {
3636
const options = _.assign(defaultOptions, opts);
3737
return new Promise<void>((resolve, reject) => {
38-
spawn(getCLIPath(), ['add', 'api'], { cwd, stripColors: true })
38+
spawn(getCLIPath(options.testingWithLatestCodebase), ['add', 'api'], { cwd, stripColors: true })
3939
.wait('Please select from one of the below mentioned services:')
4040
.sendCarriageReturn()
4141
.wait(/.*Here is the GraphQL API that we will create. Select a setting to edit or continue.*/)
4242
.sendKeyUp(3)
43+
.sendCarriageReturn()
4344
.wait('Provide API name:')
4445
.sendLine(options.apiName)
4546
.wait(/.*Here is the GraphQL API that we will create. Select a setting to edit or continue.*/)
@@ -48,10 +49,9 @@ export function addApiWithoutSchema(cwd: string, opts: Partial<AddApiOptions> =
4849
.sendCarriageReturn()
4950
.wait('Do you want to edit the schema now?')
5051
.sendConfirmNo()
51-
.wait('Successfully added resource collectionapi locally')
52-
// .wait(
53-
// '"amplify publish" will build all your local backend and frontend resources (if you have hosting category added) and provision it in the cloud',
54-
// )
52+
.wait(
53+
'"amplify publish" will build all your local backend and frontend resources (if you have hosting category added) and provision it in the cloud',
54+
)
5555
.run((err: Error) => {
5656
if (!err) {
5757
resolve();

0 commit comments

Comments
 (0)