Skip to content

Commit fc368cc

Browse files
committed
fix(e2e-tests): revert replace deprecated sendConfirmYes/No with sendYes/No
1 parent 061722a commit fc368cc

13 files changed

Lines changed: 120 additions & 120 deletions

File tree

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

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export const addApiWithoutSchema = async (
9797
.wait('Choose a schema template:')
9898
.sendCarriageReturn()
9999
.wait('Do you want to edit the schema now?')
100-
.sendNo()
100+
.sendConfirmNo()
101101
.wait(
102102
'"amplify publish" will build all your local backend and frontend resources (if you have hosting category added) and provision it in the cloud',
103103
)
@@ -124,7 +124,7 @@ export function addApiWithOneModel(cwd: string, opts: Partial<AddApiOptions & {
124124
.wait('Choose a schema template:')
125125
.sendCarriageReturn()
126126
.wait('Do you want to edit the schema now?')
127-
.sendNo()
127+
.sendConfirmNo()
128128
.wait(
129129
'"amplify publish" will build all your local backend and frontend resources (if you have hosting category added) and provision it in the cloud',
130130
)
@@ -153,7 +153,7 @@ export function addApiWithThreeModels(cwd: string, opts: Partial<AddApiOptions &
153153
.sendKeyDown(1)
154154
.sendCarriageReturn()
155155
.wait('Do you want to edit the schema now?')
156-
.sendNo()
156+
.sendConfirmNo()
157157
.wait(
158158
'"amplify publish" will build all your local backend and frontend resources (if you have hosting category added) and provision it in the cloud',
159159
)
@@ -243,7 +243,7 @@ export function addApiWithBlankSchemaAndConflictDetection(
243243
.sendKeyUp()
244244
.sendCarriageReturn()
245245
.wait(/.*Enable conflict detection.*/)
246-
.sendYes()
246+
.sendConfirmYes()
247247
.wait(/.*Select the default resolution strategy.*/);
248248

249249
selectConflictHandlerType(chain, { conflictHandlerType: opts.conflictHandlerType || ConflictHandlerType.AUTOMERGE, isUpdate: false });
@@ -296,7 +296,7 @@ export function addApiWithAllAuthModes(cwd: string, opts: Partial<AddApiOptions
296296
.wait(/.*After how many days from now the API key should expire.*/)
297297
.sendLine('300')
298298
.wait(/.*Configure additional auth types.*/)
299-
.sendYes()
299+
.sendConfirmYes()
300300
.wait(/.*Choose the additional authorization types you want to configure for the API.*/)
301301
.sendLine('a\r') // All items
302302
// Cognito
@@ -321,7 +321,7 @@ export function addApiWithAllAuthModes(cwd: string, opts: Partial<AddApiOptions
321321
.wait(/.*Choose a Lambda authorization function*/)
322322
.sendCarriageReturn()
323323
.wait(/.*Do you want to edit the local lambda function now*/)
324-
.sendNo()
324+
.sendConfirmNo()
325325
.wait(/.*How long should the authorization response be cached in seconds.*/)
326326
.sendLine('600')
327327
.wait(/.*Here is the GraphQL API that we will create. Select a setting to edit or continue.*/)
@@ -331,7 +331,7 @@ export function addApiWithAllAuthModes(cwd: string, opts: Partial<AddApiOptions
331331
.sendKeyDown(2)
332332
.sendCarriageReturn()
333333
.wait('Do you want to edit the schema now?')
334-
.sendNo()
334+
.sendConfirmNo()
335335
.wait('"amplify publish" will build all your local backend and frontend resources')
336336
.run((err: Error) => {
337337
if (!err) {
@@ -370,15 +370,15 @@ export function addApiWithApiKeyAndLambda(cwd: string, opts: Partial<AddApiOptio
370370
.wait(/.*After how many days from now the API key should expire.*/)
371371
.sendLine('300')
372372
.wait(/.*Configure additional auth types.*/)
373-
.sendYes()
373+
.sendConfirmYes()
374374
.wait(/.*Choose the additional authorization types you want to configure for the API.*/)
375375
.sendKeyDown(3)
376376
.sendLine(' ')
377377
// Lambda
378378
.wait(/.*Choose a Lambda authorization function*/)
379379
.sendCarriageReturn()
380380
.wait(/.*Do you want to edit the local lambda function now*/)
381-
.sendNo()
381+
.sendConfirmNo()
382382
.wait(/.*How long should the authorization response be cached in seconds.*/)
383383
.sendLine('600')
384384
.wait(/.*Here is the GraphQL API that we will create. Select a setting to edit or continue.*/)
@@ -388,7 +388,7 @@ export function addApiWithApiKeyAndLambda(cwd: string, opts: Partial<AddApiOptio
388388
.sendKeyDown(2)
389389
.sendCarriageReturn()
390390
.wait('Do you want to edit the schema now?')
391-
.sendNo()
391+
.sendConfirmNo()
392392
.wait('"amplify publish" will build all your local backend and frontend resources')
393393
.run((err: Error) => {
394394
if (!err) {
@@ -421,9 +421,9 @@ export function updateApiWithMultiAuth(cwd: string, settings?: { testingWithLate
421421
if (testingWithLatestCodebase) {
422422
chain.wait('Do you want to migrate api resource');
423423
if (doMigrate) {
424-
chain.sendYes();
424+
chain.sendConfirmYes();
425425
} else {
426-
chain.sendNo();
426+
chain.sendConfirmNo();
427427
}
428428
}
429429
chain
@@ -436,7 +436,7 @@ export function updateApiWithMultiAuth(cwd: string, settings?: { testingWithLate
436436
.wait(/.*After how many days from now the API key should expire.*/)
437437
.sendLine('300')
438438
.wait(/.*Configure additional auth types.*/)
439-
.sendYes()
439+
.sendConfirmYes()
440440
.wait(/.*Choose the additional authorization types you want to configure for the API.*/)
441441
.sendLine('a') // All items
442442
// Cognito
@@ -504,7 +504,7 @@ export function updateApiConflictHandlerTypePerModel(cwd: string, opts?: Partial
504504
.wait(/.*Select the default resolution strategy.*/)
505505
.sendCarriageReturn() // Select Automerge Handler for project
506506
.wait(/.*Do you want to override default per model settings*/)
507-
.sendYes()
507+
.sendConfirmYes()
508508
.wait('Select the models from below:')
509509
.send('a')
510510
.sendCarriageReturn()
@@ -537,7 +537,7 @@ export function apiEnableDataStore(cwd: string, settings: any) {
537537
.wait(/.*Select the default resolution strategy.*/)
538538
.sendCarriageReturn()
539539
.wait(/.*Do you want to override default per model settings?.*/)
540-
.sendNo()
540+
.sendConfirmNo()
541541
.wait(/.*Successfully updated resource.*/)
542542
.sendEof()
543543
.run((err: Error) => {
@@ -609,7 +609,7 @@ export function updateAPIWithResolutionStrategyWithModels(cwd: string, settings:
609609
.sendKeyDown()
610610
.sendCarriageReturn()
611611
.wait(/.*Do you want to override default per model settings?.*/)
612-
.sendNo()
612+
.sendConfirmNo()
613613
.wait(/.*Successfully updated resource.*/)
614614
.sendEof()
615615
.run((err: Error) => {
@@ -753,9 +753,9 @@ function chooseLambdaFunctionForRestApi(chain: ExecutionContext, settings: { pro
753753

754754
chain
755755
.wait('Do you want to configure advanced settings?')
756-
.sendNo()
756+
.sendConfirmNo()
757757
.wait('Do you want to edit the local lambda function now')
758-
.sendNo();
758+
.sendConfirmNo();
759759
}
760760

761761
const updateRestApiDefaultSettings = {
@@ -822,7 +822,7 @@ export function addApi(projectDir: string, settings?: any): Promise<void> {
822822
if (authTypesToAdd.length > 1) {
823823
authTypesToAdd.shift();
824824

825-
chain.wait('Configure additional auth types?').sendYes();
825+
chain.wait('Configure additional auth types?').sendConfirmYes();
826826

827827
authTypesToSelectFrom = authTypesToSelectFrom.filter((x) => x !== defaultType);
828828

@@ -846,7 +846,7 @@ export function addApi(projectDir: string, settings?: any): Promise<void> {
846846
.wait('Choose a schema template:')
847847
.sendCarriageReturn()
848848
.wait('Do you want to edit the schema now?')
849-
.sendNo()
849+
.sendConfirmNo()
850850
.wait('"amplify publish" will build all your local backend and frontend resources')
851851
.run((err: Error) => {
852852
if (!err) {
@@ -969,7 +969,7 @@ export function addApiWithCognitoUserPoolAuthTypeWhenAuthExists(
969969
.wait('Choose a schema template:')
970970
.sendCarriageReturn()
971971
.wait('Do you want to edit the schema now?')
972-
.sendNo()
972+
.sendConfirmNo()
973973
.wait('"amplify publish" will build all your local backend and frontend resources')
974974
.run((err: Error) => {
975975
if (!err) {
@@ -1001,7 +1001,7 @@ export function addRestContainerApi(projectDir: string, opts: Partial<AddApiOpti
10011001
.wait('When do you want to build & deploy the Fargate task')
10021002
.sendCarriageReturn()
10031003
.wait('Do you want to restrict API access')
1004-
.sendNo()
1004+
.sendConfirmNo()
10051005
.wait('Select which container is the entrypoint')
10061006
.sendCarriageReturn()
10071007
.wait('"amplify publish" will build all your local backend and frontend resources')
@@ -1042,7 +1042,7 @@ export function addRestContainerApiForCustomPolicies(projectDir: string, setting
10421042
.wait('When do you want to build & deploy the Fargate task')
10431043
.sendCarriageReturn()
10441044
.wait('Do you want to restrict API access')
1045-
.sendNo()
1045+
.sendConfirmNo()
10461046
.wait('Select which container is the entrypoint')
10471047
.sendCarriageReturn()
10481048
.wait('"amplify publish" will build all your local backend and frontend resources')

0 commit comments

Comments
 (0)