Skip to content

Commit

Permalink
Cypress workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
xoscar committed Dec 18, 2023
1 parent d6ea3a3 commit 54ebb13
Showing 1 changed file with 19 additions and 24 deletions.
43 changes: 19 additions & 24 deletions cypress/e2e/1-getting-started/home.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,30 +36,25 @@ describe('Home', { defaultCommandTimeout: 60000 }, () => {
});

const definition = `
type: Test
spec:
id: aW1wb3J0cyBhIHBva2Vtb24=
name: imports a pokemon
trigger:
type: traceid
traceid:
id: \${var:TRACE_ID}
specs:
- selector: span[tracetest.span.type="http"]
name: "All HTTP Spans: Status code is not 400"
assertions:
- attr:http.status_code != 400
- selector: span[tracetest.span.type="database"]
name: "All Database Spans: Processing time is less than 100ms"
assertions:
- attr:tracetest.span.duration < 100ms
outputs:
- name: MY_OUTPUT
selector: span[tracetest.span.type="general" name="Tracetest trigger"]
value: attr:name
- name: MY_OUTPUT_2
selector: span[tracetest.span.type="general" name="Tracetest trigger"]
value: attr:name
type: Test
spec:
id: aW1wb3J0cyBhIHBva2Vtb24=
name: imports a pokemon
trigger:
type: cypress
specs:
- selector: span[tracetest.span.type="http"] span[tracetest.span.type="http"]
name: "All HTTP Spans: Status code is 200"
assertions:
- attr:http.status_code = 200
- selector: span[tracetest.span.type="database"]
name: "All Database Spans: Processing time is less than 100ms"
assertions:
- attr:tracetest.span.duration < 100ms
outputs:
- name: MY_OUTPUT
selector: span[tracetest.span.type="general" name="Tracetest trigger"]
value: attr:name
`;

it('imports a pokemon', { env: { definition } }, () => {
Expand Down

0 comments on commit 54ebb13

Please sign in to comment.