Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-de-vera committed Jun 18, 2024
1 parent db745d2 commit 0171cc3
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 37 deletions.
37 changes: 0 additions & 37 deletions .signadot/ict/e2e-tests-job.yaml

This file was deleted.

File renamed without changes.
21 changes: 21 additions & 0 deletions .signadot/testing/demo-tests-job.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
spec:
namePrefix: hotrod-cypress-demo
runnerGroup: cypress
script: |
#!/bin/bash
set -e
# Clone the git repo
echo "Cloning signadot repo"
git clone --single-branch -b "@{branch}" \
https://github.com/signadot/hotrod.git
# Run the cypress e2e tests
cd hotrod
export CYPRESS_HOTROD_NAMESPACE="@{namespace}"
npx cypress run
routingContext:
sandbox: "@{sandbox}"
uploadArtifact:
- path: hotrod/cypress/videos/hotrod.cy.js.mp4
26 changes: 26 additions & 0 deletions .signadot/testing/e2e-tests-job.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
spec:
namePrefix: hotrod-cypress-e2e
runnerGroup: cypress
script: |
#!/bin/bash
set -e
# Clone the git repo
echo "Cloning signadot repo"
git clone --single-branch -b "@{branch}" \
https://github.com/signadot/hotrod.git
# Run the cypress e2e tests
cd hotrod
export CYPRESS_HOTROD_E2E="1"
export CYPRESS_HOTROD_NAMESPACE="@{namespace}"
export CYPRESS_FRONTEND_SANDBOX_NAME="@{frontend_sandbox_name}"
export CYPRESS_LOCATION_SANDBOX_NAME="@{location_sandbox_name}"
export CYPRESS_ROUTE_SANDBOX_NAME="@{route_sandbox_name}"
export CYPRESS_DRIVER_SANDBOX_NAME="@{driver_sandbox_name}"
npx cypress run
routingContext:
sandbox: "@{sandbox}"
uploadArtifact:
- path: hotrod/cypress/videos/hotrod.cy.js.mp4
4 changes: 4 additions & 0 deletions cypress/e2e/hotrod.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ describe('hotrod spec', () => {
// check if the driver has been delivered
cy.get(':nth-child(6) > .css-bjcoli').contains(/Driver (.*) arriving in (.*)./);

if (Cypress.env('HOTROD_E2E') != "1"){
return
}

// check routing context
var frontendSandboxName = Cypress.env('FRONTEND_SANDBOX_NAME');
cy.get('.css-8g8ihq :nth-child(2) > :nth-child(2)').should('have.text', 'frontend');
Expand Down

0 comments on commit 0171cc3

Please sign in to comment.