Skip to content

Commit f72a9b7

Browse files
committed
fix(amplify-codegen-e2e-tests): fix env codegen tests
1 parent 0a95ec8 commit f72a9b7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/amplify-codegen-e2e-tests/src/__tests__/env-codegen.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ import {
22
createNewProjectDir,
33
deleteProjectDir,
44
deleteProject,
5-
addApiWithSchema,
65
initJSProjectWithProfile,
76
amplifyPush,
87
generateModels,
8+
addApiWithoutSchema,
99
updateApiSchema
1010
} from "amplify-codegen-e2e-core";
1111
import { addEnvironment, checkoutEnvironment } from "../environment/env";
@@ -27,7 +27,9 @@ describe('env codegen tests', () => {
2727
it('should generate models in different environments', async () => {
2828
//create amplify project with enva
2929
await initJSProjectWithProfile(projectRoot, { envName: 'enva' });
30-
await addApiWithSchema(projectRoot, schema, { apiName });
30+
await addApiWithoutSchema(projectRoot, { apiName: apiName });
31+
await updateApiSchema(projectRoot, apiName, schema);
32+
3133
await amplifyPush(projectRoot);
3234
//create new envb
3335
await addEnvironment(projectRoot, { envName: 'envb' });

0 commit comments

Comments
 (0)