Skip to content

Commit

Permalink
e2e - fix failing e2e workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tplevko authored and lordrip committed Jun 13, 2024
1 parent ecf913e commit 7e209ed
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 27 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest

container:
image: cypress/browsers:node-18.16.0-chrome-112.0.5615.121-1-ff-112.0.1-edge-112.0.1722.48-1
image: cypress/browsers:node-20.13.1-chrome-125.0.6422.60-1-ff-126.0-edge-125.0.2535.51-1
options: --user 1001

steps:
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
needs: install
runs-on: ubuntu-latest
container:
image: cypress/browsers:node-18.16.0-chrome-112.0.5615.121-1-ff-112.0.1-edge-112.0.1722.48-1
image: cypress/browsers:node-20.13.1-chrome-125.0.6422.60-1-ff-126.0-edge-125.0.2535.51-1
options: --user 1001

steps:
Expand Down Expand Up @@ -100,10 +100,10 @@ jobs:
browser: firefox
# we have already installed all dependencies above
# install: false
start: yarn workspace @kaoto/kaoto run preview
start: yarn workspace @kaoto/kaoto run preview --host
config: baseUrl=http://localhost:4173
working-directory: packages/ui-tests
wait-on: 'http://localhost:4173'
wait-on: 'http://127.0.0.1:4173'
wait-on-timeout: 120
env:
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }}
Expand All @@ -128,7 +128,7 @@ jobs:
needs: install
runs-on: ubuntu-latest
container:
image: cypress/browsers:node-18.16.0-chrome-112.0.5615.121-1-ff-112.0.1-edge-112.0.1722.48-1
image: cypress/browsers:node-20.13.1-chrome-125.0.6422.60-1-ff-126.0-edge-125.0.2535.51-1
options: --user 1001

steps:
Expand Down Expand Up @@ -159,10 +159,10 @@ jobs:
browser: chrome
# we have already installed all dependencies above
# install: false
start: yarn workspace @kaoto/kaoto run preview
start: yarn workspace @kaoto/kaoto run preview --host
config: baseUrl=http://localhost:4173
working-directory: packages/ui-tests
wait-on: 'http://localhost:4173'
wait-on: 'http://127.0.0.1:4173'
wait-on-timeout: 120
env:
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }}
Expand All @@ -187,7 +187,7 @@ jobs:
needs: install
runs-on: ubuntu-latest
container:
image: cypress/browsers:node-18.16.0-chrome-112.0.5615.121-1-ff-112.0.1-edge-112.0.1722.48-1
image: cypress/browsers:node-20.13.1-chrome-125.0.6422.60-1-ff-126.0-edge-125.0.2535.51-1
options: --user 1001

steps:
Expand Down Expand Up @@ -218,10 +218,10 @@ jobs:
browser: edge
# we have already installed all dependencies above
# install: false
start: yarn workspace @kaoto/kaoto run preview
start: yarn workspace @kaoto/kaoto run preview --host
config: baseUrl=http://localhost:4173
working-directory: packages/ui-tests
wait-on: 'http://localhost:4173'
wait-on: 'http://127.0.0.1:4173'
wait-on-timeout: 120
env:
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }}
Expand Down
10 changes: 5 additions & 5 deletions packages/ui-tests/cypress/support/next-commands/sourceCode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ Cypress.Commands.add('editorAddText', (line, text) => {
.click()
.type(`${line}` + '{enter}');
// insert new line, so the new text can be added
cy.focused().type('{enter}{upArrow}', { delay: 1 });
cy.focused().type('{enter}{upArrow}', { force: true, delay: 1 });
text.split('\n').forEach((lineToWrite) => {
cy.focused().type('{enter}{enter}{upArrow}', { delay: 1 });
cy.focused().type('{ctrl}{l}', { delay: 1 });
cy.focused().type(lineToWrite, { delay: 1 });
cy.focused().type('{enter}{enter}{upArrow}', { force: true, delay: 1 });
cy.focused().type('{ctrl}{l}', { force: true, delay: 1 });
cy.focused().type(lineToWrite, { force: true, delay: 1 });
});
});

Expand Down Expand Up @@ -48,7 +48,7 @@ Cypress.Commands.add('editorDeleteLine', (line: number, repeatCount: number) =>

// Delete the line as many times as specified
for (let i = 0; i < repeatCount; i++) {
cy.focused().type('{ctrl}{shift}{k}', { delay: 1 });
cy.focused().type('{ctrl}{shift}{k}', { force: true, delay: 1 });
}
});

Expand Down
2 changes: 1 addition & 1 deletion packages/ui-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"@storybook/testing-library": "^0.2.0",
"@storybook/theming": "^7.4.0",
"chromatic": "^11.0.0",
"cypress": "^13.0.0",
"cypress": "^13.11.0",
"cypress-file-upload": "^5.0.8",
"eslint": "^8.45.0",
"eslint-config-prettier": "^9.0.0",
Expand Down
21 changes: 10 additions & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2431,7 +2431,7 @@ __metadata:
"@storybook/testing-library": ^0.2.0
"@storybook/theming": ^7.4.0
chromatic: ^11.0.0
cypress: ^13.0.0
cypress: ^13.11.0
cypress-file-upload: ^5.0.8
eslint: ^8.45.0
eslint-config-prettier: ^9.0.0
Expand Down Expand Up @@ -6162,7 +6162,7 @@ __metadata:
languageName: node
linkType: hard

"@types/node@npm:^16.0.0, @types/node@npm:^16.18.39":
"@types/node@npm:^16.0.0":
version: 16.18.46
resolution: "@types/node@npm:16.18.46"
checksum: 1aed3fe9693f2098b8dac8c76c809c1925a456da00dd6f06c1ccb55c62ccfbbe7ec43ccfd12001f9cb4ff84e138292ae53456435dfecd5c4bb1324394c3e09c7
Expand Down Expand Up @@ -7676,7 +7676,7 @@ __metadata:
languageName: node
linkType: hard

"buffer@npm:^5.5.0, buffer@npm:^5.6.0":
"buffer@npm:^5.5.0, buffer@npm:^5.7.1":
version: 5.7.1
resolution: "buffer@npm:5.7.1"
dependencies:
Expand Down Expand Up @@ -8724,19 +8724,18 @@ __metadata:
languageName: node
linkType: hard

"cypress@npm:^13.0.0":
version: 13.0.0
resolution: "cypress@npm:13.0.0"
"cypress@npm:^13.11.0":
version: 13.11.0
resolution: "cypress@npm:13.11.0"
dependencies:
"@cypress/request": ^3.0.0
"@cypress/xvfb": ^1.2.4
"@types/node": ^16.18.39
"@types/sinonjs__fake-timers": 8.1.1
"@types/sizzle": ^2.3.2
arch: ^2.2.0
blob-util: ^2.0.2
bluebird: ^3.7.2
buffer: ^5.6.0
buffer: ^5.7.1
cachedir: ^2.3.0
chalk: ^4.1.0
check-more-types: ^2.24.0
Expand All @@ -8754,7 +8753,7 @@ __metadata:
figures: ^3.2.0
fs-extra: ^9.1.0
getos: ^3.2.1
is-ci: ^3.0.0
is-ci: ^3.0.1
is-installed-globally: ~0.4.0
lazy-ass: ^1.6.0
listr2: ^3.8.3
Expand All @@ -8773,7 +8772,7 @@ __metadata:
yauzl: ^2.10.0
bin:
cypress: bin/cypress
checksum: 223dddfd85dbde5e3a915e87b6cb176b99a9e5bcc24baa40cd5b9ca4a93315a95cf53c5c6ac3a6984f59be55ffc8b58b93a713c0ddcb63a5f4996229cce70329
checksum: 67f61152b03955a3649d1ddcfb940271614e47d02c2e9f6f08e85158199c2d22a805ab8fcbccb985f8e1ef628b099b24487e8aebde181ed82abf039890abc6fc
languageName: node
linkType: hard

Expand Down Expand Up @@ -12226,7 +12225,7 @@ __metadata:
languageName: node
linkType: hard

"is-ci@npm:^3.0.0, is-ci@npm:^3.0.1":
"is-ci@npm:^3.0.1":
version: 3.0.1
resolution: "is-ci@npm:3.0.1"
dependencies:
Expand Down

0 comments on commit 7e209ed

Please sign in to comment.