Skip to content

Commit 616a5f9

Browse files
davixckyfoxish
andcommitted
E2E - Fix cypress not running new UI (#257)
* fix contain and other issues to remediate cypress run * test path matcher that is wider * Delete cypress/e2e/hotrod-e2e.cy.js --------- Co-authored-by: Anirudh Ramanathan <anirudh@signadot.com> Co-authored-by: Anirudh Ramanathan <anirudh@foxish.me>
1 parent 99d0828 commit 616a5f9

File tree

4 files changed

+12
-39
lines changed

4 files changed

+12
-39
lines changed

cypress.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ module.exports = defineConfig({
44
e2e: {
55
video: true,
66
experimentalStudio: true,
7+
viewportWidth: 1024,
8+
viewportHeight: 780,
79
env: {
810
HOTROD_NAMESPACE: 'hotrod',
911
SIGNADOT_ROUTING_KEY: '',

cypress/e2e/hotrod-e2e.cy.js

Lines changed: 0 additions & 35 deletions
This file was deleted.

cypress/support/commands.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
// Request a HotRod ride
22
Cypress.Commands.add('requestRide', (from, to) => {
3-
var frontendURL = 'http://frontend.' + Cypress.env('HOTROD_NAMESPACE') + ':8080';
3+
var frontendURL = 'http://frontend.' + Cypress.env('HOTROD_NAMESPACE') + ':8080/';
44
// inject routing key
5-
cy.intercept(frontendURL + '/*', (req) => {
5+
cy.intercept('**', (req) => {
66
req.headers['baggage'] += ',sd-routing-key=' + Cypress.env('SIGNADOT_ROUTING_KEY');
77
})
88

99
cy.visit(frontendURL);
1010
cy.get(':nth-child(1) > .chakra-select__wrapper > .chakra-select').select(from);
1111
cy.get(':nth-child(3) > .chakra-select__wrapper > .chakra-select').select(to);
12-
cy.get('.chakra-button').click();
12+
cy.contains('button', 'Request Ride').click();
13+
cy.contains('button', 'Show Logs').click();
1314
})

cypress/support/e2e.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,9 @@
1717
import './commands'
1818

1919
// Alternatively you can use CommonJS syntax:
20-
// require('./commands')
20+
// require('./commands')
21+
22+
Cypress.on('uncaught:exception', (err, runnable) => {
23+
// returning false here prevents Cypress from failing the test
24+
return false
25+
})

0 commit comments

Comments
 (0)