Skip to content

Commit

Permalink
upgrading deps
Browse files Browse the repository at this point in the history
  • Loading branch information
xoscar committed Dec 14, 2023
1 parent 91dd3db commit 1e2f923
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 38 deletions.
57 changes: 28 additions & 29 deletions cypress/e2e/1-getting-started/home.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,9 @@ const TRACETEST_API_TOKEN = Cypress.env('TRACETEST_API_TOKEN') || '';

const tracetest = Tracetest();

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
`;

describe('Home', { defaultCommandTimeout: 60000 }, () => {
before(done => {
tracetest.configure(TRACETEST_API_TOKEN).then(() => done());
tracetest.configure(TRACETEST_API_TOKEN, 'http://localhost:3000').then(() => done());
});

beforeEach(() => {
Expand All @@ -47,7 +20,6 @@ describe('Home', { defaultCommandTimeout: 60000 }, () => {
tracetest.runTest(definition).then(() => done());
});


// uncomment to wait for trace tests to be done
after(done => {
tracetest.summary().then(() => done());
Expand All @@ -63,6 +35,33 @@ describe('Home', { defaultCommandTimeout: 60000 }, () => {
cy.get('button').contains('OK').click();
});

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
`;

it('imports a pokemon', { env: { definition } }, () => {
cy.get('[data-cy="import-pokemon-button"]').click();
cy.get('[data-cy="import-pokemon-form"]').should('be.visible');
Expand Down
16 changes: 8 additions & 8 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
},
"dependencies": {
"@opentelemetry/sdk-trace-base": "^1.18.1",
"@tracetest/cypress": "^0.0.12-alpha.0"
"@tracetest/cypress": "^0.0.13-alpha.0"
}
}

0 comments on commit 1e2f923

Please sign in to comment.