Skip to content

Commit d71850d

Browse files
author
Dane Pilcher
authored
test: fix gen 1 init api-plugin-stable (#2925)
1 parent 0a68a53 commit d71850d

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

client-test-apps/js/api-model-relationship-app/src/__tests__/utils/amplifyCLI.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,10 @@ export class AmplifyCLI {
273273
console.log(`Using CLI path '${cliPath}'`);
274274
console.log(`Project root: '${this.projectRoot}'`);
275275
const chain = spawn(cliPath, cliArgs, { cwd: this.projectRoot, env, disableCIDetection: s.disableCIDetection })
276+
.wait('Do you want to continue with Amplify Gen 1?')
277+
.sendConfirmYes()
278+
.wait('Why would you like to use Amplify Gen 1?')
279+
.sendCarriageReturn()
276280
.wait('Enter a name for the project')
277281
.sendLine(s.name)
278282
.wait('Initialize the project with the above configuration?')

packages/amplify-e2e-core/src/init/initProjectHelper.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ export function initJSProjectWithProfile(cwd: string, settings?: Partial<typeof
5656
disableCIDetection: s.disableCIDetection,
5757
noOutputTimeout: 10 * 60 * 1000,
5858
})
59+
.wait('Do you want to continue with Amplify Gen 1?')
60+
.sendConfirmYes()
61+
.wait('Why would you like to use Amplify Gen 1?')
62+
.sendCarriageReturn()
5963
.wait('Enter a name for the project')
6064
.sendLine(s.name)
6165
.wait('Initialize the project with the above configuration?')
@@ -113,6 +117,10 @@ export function initAndroidProjectWithProfile(cwd: string, settings: Object): Pr
113117
CLI_DEV_INTERNAL_DISABLE_AMPLIFY_APP_CREATION: '1',
114118
},
115119
})
120+
.wait('Do you want to continue with Amplify Gen 1?')
121+
.sendConfirmYes()
122+
.wait('Why would you like to use Amplify Gen 1?')
123+
.sendCarriageReturn()
116124
.wait('Enter a name for the project')
117125
.sendLine(s.name)
118126
.wait('Initialize the project with the above configuration?')
@@ -163,6 +171,10 @@ export function initIosProjectWithProfile(cwd: string, settings: Object): Promis
163171
CLI_DEV_INTERNAL_DISABLE_AMPLIFY_APP_CREATION: '1',
164172
},
165173
})
174+
.wait('Do you want to continue with Amplify Gen 1?')
175+
.sendConfirmYes()
176+
.wait('Why would you like to use Amplify Gen 1?')
177+
.sendCarriageReturn()
166178
.wait('Enter a name for the project')
167179
.sendLine(s.name)
168180
.wait('Initialize the project with the above configuration?')
@@ -200,6 +212,10 @@ export function initFlutterProjectWithProfile(cwd: string, settings: Object): Pr
200212

201213
return new Promise((resolve, reject) => {
202214
const chain = spawn(getCLIPath(), ['init'], { cwd, stripColors: true })
215+
.wait('Do you want to continue with Amplify Gen 1?')
216+
.sendConfirmYes()
217+
.wait('Why would you like to use Amplify Gen 1?')
218+
.sendCarriageReturn()
203219
.wait('Enter a name for the project')
204220
.sendLine(s.name)
205221
.wait('Initialize the project with the above configuration?')
@@ -250,6 +266,10 @@ export function initProjectWithAccessKey(
250266
CLI_DEV_INTERNAL_DISABLE_AMPLIFY_APP_CREATION: '1',
251267
},
252268
})
269+
.wait('Do you want to continue with Amplify Gen 1?')
270+
.sendConfirmYes()
271+
.wait('Why would you like to use Amplify Gen 1?')
272+
.sendCarriageReturn()
253273
.wait('Enter a name for the project')
254274
.sendLine(s.name)
255275
.wait('Initialize the project with the above configuration?')

packages/amplify-e2e-tests/src/init-special-cases/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ async function initWorkflow(cwd: string, settings: { accessKeyId: string; secret
5151
CLI_DEV_INTERNAL_DISABLE_AMPLIFY_APP_CREATION: '1',
5252
},
5353
})
54+
.wait('Do you want to continue with Amplify Gen 1?')
55+
.sendConfirmYes()
56+
.wait('Why would you like to use Amplify Gen 1?')
57+
.sendCarriageReturn()
5458
.wait('Enter a name for the project')
5559
.sendCarriageReturn()
5660
.wait('Initialize the project with the above configuration?')

0 commit comments

Comments
 (0)