Skip to content

Commit

Permalink
fix(e2e): updating template
Browse files Browse the repository at this point in the history
  • Loading branch information
xoscar committed Jan 11, 2024
1 parent 55d4a71 commit 00f3c4e
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 33 deletions.
18 changes: 9 additions & 9 deletions cypress/e2e/1-getting-started/home.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ const TRACETEST_API_TOKEN = Cypress.env('TRACETEST_API_TOKEN') || '';
let tracetest: Types.TracetestCypress | undefined = undefined;

const definition = `
type: Test
spec:
id: aW1wb3J0cyBhIHBva2Vtb24=
name: imports a pokemon
trigger:
type: cypress
specs:
type: Test
spec:
id: UGxheXdyaWdodDogaW1wb3J0cyBhIHBva2Vtb24=
name: "Playwright: imports a pokemon"
trigger:
type: playwright
specs:
- selector: span[tracetest.span.type="http"] span[tracetest.span.type="http"]
name: "All HTTP Spans: Status code is 200"
assertions:
Expand All @@ -20,11 +20,11 @@ const definition = `
name: "All Database Spans: Processing time is less than 100ms"
assertions:
- attr:tracetest.span.duration < 2s
outputs:
outputs:
- name: MY_OUTPUT
selector: span[tracetest.span.type="general" name="Tracetest trigger"]
value: attr:name
`;
`;

describe('Home', { defaultCommandTimeout: 60000 }, () => {
before(done => {
Expand Down
1 change: 1 addition & 0 deletions docker-compose.e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ services:
environment:
TRACETEST_DEV: ${TRACETEST_DEV}
TRACETEST_API_KEY: ${TRACETEST_AGENT_API_KEY}
TRACETEST_SERVER_URL: ${TRACETEST_SERVER_URL}
image: kubeshop/tracetest-agent:latest
networks:
default: null
26 changes: 13 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
"dependencies": {
"@opentelemetry/sdk-trace-base": "^1.18.1",
"@tracetest/cypress": "^0.0.22",
"@tracetest/playwright": "0.0.22"
"@tracetest/cypress": "^0.0.23",
"@tracetest/playwright": "0.0.23"
}
}
19 changes: 10 additions & 9 deletions playwright/home.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ let tracetest: Types.TracetestPlaywright | undefined = undefined;
test.describe.configure({ mode: 'serial' });

const definition = `
type: Test
spec:
id: UGxheXdyaWdodDogaW1wb3J0cyBhIHBva2Vtb24=
name: "Playwright: imports a pokemon"
trigger:
type: playwright
specs:
type: Test
spec:
id: UGxheXdyaWdodDogaW1wb3J0cyBhIHBva2Vtb24=
name: "Playwright: imports a pokemon"
trigger:
type: playwright
specs:
- selector: span[tracetest.span.type="http"] span[tracetest.span.type="http"]
name: "All HTTP Spans: Status code is 200"
assertions:
Expand All @@ -23,14 +23,15 @@ const definition = `
name: "All Database Spans: Processing time is less than 100ms"
assertions:
- attr:tracetest.span.duration < 2s
outputs:
outputs:
- name: MY_OUTPUT
selector: span[tracetest.span.type="general" name="Tracetest trigger"]
value: attr:name
`;
`;

test.beforeAll(async () => {
tracetest = await Tracetest({ apiToken: TRACETEST_API_TOKEN });

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

0 comments on commit 00f3c4e

Please sign in to comment.