Skip to content

Commit

Permalink
test(amplify-e2e-tests): update to use correct helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
danielleadams committed Oct 7, 2021
1 parent cccd518 commit 8e3eb58
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/amplify-e2e-tests/src/__tests__/sandbox-mode.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,21 @@ import {
deleteProject,
createNewProjectDir,
deleteProjectDir,
addApiWithSchema,
addApiWithoutSchema,
amplifyPush,
getProjectMeta,
updateApiSchema,
} from 'amplify-e2e-core';
import { testSchema } from '../schema-api-directives';

describe('api directives @allow_public_data_access_with_api_key', () => {
let projectDir: string;
const projName = 'myproject';
const envName = 'dev';

beforeEach(async () => {
projectDir = await createNewProjectDir('model');
await initJSProjectWithProfile(projectDir, { envName });
await initJSProjectWithProfile(projectDir, { name: projName, envName });
});

afterEach(async () => {
Expand All @@ -24,7 +26,8 @@ describe('api directives @allow_public_data_access_with_api_key', () => {
});

it('schema and files generate with sandbox mode', async () => {
await addApiWithSchema(projectDir, 'model_with_sandbox_mode.graphql');
await addApiWithoutSchema(projectDir);
await updateApiSchema(projectDir, projName,'model_with_sandbox_mode.graphql')
await amplifyPush(projectDir);

const meta = getProjectMeta(projectDir);
Expand Down

0 comments on commit 8e3eb58

Please sign in to comment.