Skip to content

Commit

Permalink
chore: adding cypress for stage
Browse files Browse the repository at this point in the history
  • Loading branch information
xoscar committed Apr 5, 2024
1 parent 1dad326 commit 50719f3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cypress-stage.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Cypress Tests
name: Cypress Tests Stage

on:
# allows the manual trigger
Expand Down
1 change: 1 addition & 0 deletions cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = defineConfig({
baseUrl: process.env.POKESHOP_DEMO_URL || 'http://localhost:3000',
env: {
TRACETEST_API_TOKEN: process.env.TRACETEST_API_TOKEN,
TRACETEST_SERVER_URL: process.env.TRACETEST_SERVER_URL || 'https://app.tracetest.io',
},
setupNodeEvents() {
// implement node event listeners here
Expand Down
3 changes: 2 additions & 1 deletion cypress/e2e/1-getting-started/home.cy.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Tracetest, { Types } from '@tracetest/cypress';

const TRACETEST_API_TOKEN = Cypress.env('TRACETEST_API_TOKEN') || '';
const TRACETEST_SERVER_URL = Cypress.env('TRACETEST_SERVER_URL') || 'https://app.tracetest.io';

let tracetest: Types.TracetestCypress | undefined = undefined;

Expand Down Expand Up @@ -28,7 +29,7 @@ spec:

describe('Home', { defaultCommandTimeout: 80000 }, () => {
before(done => {
Tracetest({ apiToken: TRACETEST_API_TOKEN }).then(instance => {
Tracetest({ apiToken: TRACETEST_API_TOKEN, serverUrl: TRACETEST_SERVER_URL, serverPath: '' }).then(instance => {
tracetest = instance;
tracetest
.setOptions({
Expand Down

0 comments on commit 50719f3

Please sign in to comment.