Skip to content

Commit

Permalink
tests(pw): add env id
Browse files Browse the repository at this point in the history
  • Loading branch information
adnanrahic committed Oct 7, 2024
1 parent b2b68c0 commit c35c814
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions .env.template
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
TRACETEST_API_TOKEN=
POKESHOP_DEMO_URL=http://localhost:8081
TRACETEST_AGENT_API_KEY=
TRACETEST_ENVIRONMENT_ID=
9 changes: 7 additions & 2 deletions playwright/home.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { test, expect } from '@playwright/test';
import Tracetest, { Types } from '@tracetest/playwright';

const { TRACETEST_API_TOKEN = '', TRACETEST_SERVER_URL = 'https://app.tracetest.io' } = process.env;
const { TRACETEST_API_TOKEN = '', TRACETEST_SERVER_URL = 'https://app.tracetest.io', TRACETEST_ENVIRONMENT_ID = '' } = process.env;

let tracetest: Types.TracetestPlaywright | undefined = undefined;

Expand Down Expand Up @@ -30,7 +30,12 @@ spec:
`;

test.beforeAll(async () => {
tracetest = await Tracetest({ apiToken: TRACETEST_API_TOKEN, serverUrl: TRACETEST_SERVER_URL, serverPath: '' });
tracetest = await Tracetest({
apiToken: TRACETEST_API_TOKEN,
serverUrl: TRACETEST_SERVER_URL,
serverPath: '',
environmentId: TRACETEST_ENVIRONMENT_ID,
});

await tracetest.setOptions({
'Playwright: imports a pokemon': {
Expand Down

0 comments on commit c35c814

Please sign in to comment.