Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests: Fix hp tests #4024

Merged
merged 6 commits into from
Aug 2, 2024
Merged

Tests: Fix hp tests #4024

merged 6 commits into from
Aug 2, 2024

Conversation

mike10ca
Copy link
Contributor

@mike10ca mike10ca commented Aug 1, 2024

What it solves

How this PR fixes it

  • Add accept cookies key to local storage to maintain cookie acceptance throughout tests
  • Add timeouts to test workflow to max 60 mins
  • Add logout steps to keep login state fresh in further tests

How to test it

  • Run Cypress tests and observe outcome

Copy link

github-actions bot commented Aug 1, 2024

Copy link

github-actions bot commented Aug 1, 2024

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

Copy link

github-actions bot commented Aug 1, 2024

📦 Next.js Bundle Analysis for safe-wallet-web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

Copy link

github-actions bot commented Aug 1, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
78.54% (+0.12% 🔼)
11694/14890
🔴 Branches
58.41% (+0.11% 🔼)
2918/4996
🟡 Functions
65.9% (+0.07% 🔼)
1873/2842
🟡 Lines
79.9% (+0.11% 🔼)
10541/13192
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / index.tsx
93.55% (-0.9% 🔻)
80% (+2.22% 🔼)
100%
96.43% (-0.45% 🔻)
🟢
... / ApprovalItem.tsx
92.31% (-0.55% 🔻)
33.33% (-9.52% 🔻)
75%
90.91% (-0.76% 🔻)

Test suite run success

1447 tests passing in 200 suites.

Report generated by 🧪jest coverage report action from 58f9f0f

@mike10ca mike10ca marked this pull request as ready for review August 2, 2024 07:19
@mike10ca mike10ca merged commit 81f6021 into dev Aug 2, 2024
15 of 22 checks passed
@mike10ca mike10ca deleted the happypath-tests-fix branch August 2, 2024 07:25
@github-actions github-actions bot locked and limited conversation to collaborators Aug 2, 2024
@@ -62,7 +62,8 @@ function executeTransaction() {
}

function addToBatchButton() {
cy.contains(addToBatchBtn).should('be.visible').and('not.be.disabled').click()
cy.wait(1000)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this timeout is necessary. The button is rendered immediately, it's just not in the viewport.

@@ -62,7 +62,8 @@ function executeTransaction() {
}

function addToBatchButton() {
cy.contains(addToBatchBtn).should('be.visible').and('not.be.disabled').click()
cy.wait(1000)
cy.get('button').contains(addToBatchBtn).scrollIntoView().should('not.be.disabled').click()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you don't check if the button is visible, so no need to scroll to it either.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants