Skip to content

Commit

Permalink
Do not trust null/undefined value when selecting tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Martijn Dirkse committed Nov 21, 2024
1 parent f27b94e commit 23139e1
Show file tree
Hide file tree
Showing 20 changed files with 21 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/testing.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ jobs:
run: sed "s|SELECTION||g" cypress.env.json.cicd.template > cypress.env.json.cicd
working-directory: ladybug-frontend
if: ${{ matrix.selection }} === 'default'
- name: Choose tests to run - choice is some-selection
run: sed "s|SELECTION|\"selection\":\"some-selection\",|g" cypress.env.json.cicd.template > cypress.env.json.cicd
- name: Choose tests to run
run: sed "s|SELECTION|\"selection\":\"${{ matrix.selection }}\",|g" cypress.env.json.cicd.template > cypress.env.json.cicd
working-directory: ladybug-frontend
if: ${{ matrix.selection }} === 'some-selection'

Expand Down
1 change: 1 addition & 0 deletions cypress/e2e/checks.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
describe('Checks of the test environment', () => {
it('Show environment', () => {
cy.log('Environment variable \'selection\' is ' + Cypress.env('selection'))
cy.screenshot()
})
})
2 changes: 1 addition & 1 deletion cypress/e2e/copying.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { showSkipped } from "cypress/support/commands";

describe('Tests about copying', () => {
if(Cypress.env('selection')) {
if(Cypress.env('selection') === "default") {
showSkipped()
return
}
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/debug/aboutOpenedReports.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { showSkipped } from "cypress/support/commands";

describe('About opened reports', () => {
if(Cypress.env('selection')) {
if(Cypress.env('selection') === "default") {
showSkipped()
return
}
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/debug/clickingInTableOpensReport.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { showSkipped } from "cypress/support/commands";

describe('Clicking a report', () => {
if(Cypress.env('selection')) {
if(Cypress.env('selection') === "default") {
showSkipped()
return
}
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/debug/custom-editor.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { showSkipped } from "cypress/support/commands";

describe('Tests for custom editor in debug tab', () => {
if(Cypress.env('selection')) {
if(Cypress.env('selection') === "default") {
showSkipped()
return
}
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/debug/deleteReports.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { showSkipped } from "cypress/support/commands";

describe('About deleting reports', () => {
if(Cypress.env('selection')) {
if(Cypress.env('selection') === "default") {
showSkipped()
return
}
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/debug/fileupload.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { showSkipped } from "cypress/support/commands";

describe('Debug file upload', () => {
if(Cypress.env('selection')) {
if(Cypress.env('selection') === "default") {
showSkipped()
return
}
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/debug/filterTable.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { showSkipped } from "cypress/support/commands";

describe('Tests for table filter', () => {
if(Cypress.env('selection')) {
if(Cypress.env('selection') === "default") {
showSkipped()
return
}
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/debug/labels.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { showSkipped } from "cypress/support/commands";

describe('Test labels', () => {
if(Cypress.env('selection')) {
if(Cypress.env('selection') === "default") {
showSkipped()
return
}
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/debug/refresh.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { showSkipped } from "cypress/support/commands";

describe('Refresh', () => {
if(Cypress.env('selection')) {
if(Cypress.env('selection') === "default") {
showSkipped()
return
}
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/debug/reportGenerator.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { showSkipped } from "cypress/support/commands";

describe('Report generator', () => {
if(Cypress.env('selection')) {
if(Cypress.env('selection') === "default") {
showSkipped()
return
}
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/debug/runningReports.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { showSkipped } from "cypress/support/commands";

describe('Test running reports', () => {
if(Cypress.env('selection')) {
if(Cypress.env('selection') === "default") {
showSkipped()
return
}
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/debug/settings-component.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { showSkipped } from "cypress/support/commands";

describe('Tests for settings component', () => {
if(Cypress.env('selection')) {
if(Cypress.env('selection') === "default") {
showSkipped()
return
}
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/debug/show-warnings-and-errors.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { showSkipped } from "cypress/support/commands";

describe('Tests for showing errors and warnings', () => {
if(Cypress.env('selection')) {
if(Cypress.env('selection') === "default") {
showSkipped()
return
}
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/debug/table.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { showSkipped } from "cypress/support/commands";

describe('Tests for Debug tab table', () => {
if(Cypress.env('selection')) {
if(Cypress.env('selection') === "default") {
showSkipped()
return
}
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/debug/toast.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { showSkipped } from "cypress/support/commands";

describe('Test toast window', () => {
if(Cypress.env('selection')) {
if(Cypress.env('selection') === "default") {
showSkipped()
return
}
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/debug/transformation.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { showSkipped } from "cypress/support/commands";

describe('Tests for report transformation', () => {
if(Cypress.env('selection')) {
if(Cypress.env('selection') === "default") {
showSkipped()
return
}
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/keep_state.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { showSkipped } from "cypress/support/commands";

describe('Tests for keeping state in tabs when switching tabs', () => {
if(Cypress.env('selection')) {
if(Cypress.env('selection') === "default") {
showSkipped()
return
}
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/test/testtab.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { showSkipped } from "cypress/support/commands";

describe('Test the Test tab', () => {
if(Cypress.env('selection')) {
if(Cypress.env('selection') === "default") {
showSkipped()
return
}
Expand Down

0 comments on commit 23139e1

Please sign in to comment.