Skip to content

Commit 5fb4104

Browse files
Merge pull request #1415 from Coflnet/cypress-update
update cypress and avoid fanky crafts issue
2 parents f460851 + b9a5989 commit 5fb4104

4 files changed

Lines changed: 120 additions & 52 deletions

File tree

.github/workflows/playwright.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
jobs:
88
cypress-run:
99
timeout-minutes: 60
10-
runs-on: ubuntu-22.04
10+
runs-on: ubuntu-24.04
1111
steps:
1212
- name: Checkout
1313
uses: actions/checkout@v4

cypress/e2e/crafts.cy.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ describe('Profitable craft page', () => {
66
it('works', () => {
77
cy.visit('/crafts')
88
cy.contains('The top 3 crafts can only be seen with starter premium or betterYou Cheated the ').should('be.visible')
9-
cy.wait(1000)
10-
cy.contains('button', 'Crafting Cost').should('be.visible').click()
9+
// click the element twice to avoid flakyness
10+
cy.contains('button', 'Crafting Cost').scrollIntoView().children().first().should('be.visible').click()
11+
cy.contains('button', 'Crafting Cost').scrollIntoView().children().first().should('be.visible').click()
1112
cy.contains('h3', 'Recipe').should('be.visible')
1213
cy.contains(/\)[\.,\d]* Coins.*/).should('be.visible')
1314
})

0 commit comments

Comments
 (0)