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: add dashboard tests #3256

Merged
merged 2 commits into from
Feb 14, 2024
Merged

Tests: add dashboard tests #3256

merged 2 commits into from
Feb 14, 2024

Conversation

mike10ca
Copy link
Contributor

@mike10ca mike10ca commented Feb 14, 2024

What it solves

Resolves #3255

How this PR fixes it

  • Add additional tests for Dashboard

Tests added:

  • Verify clicking on the share icon copies the app URL to the clipboard
  • Verify clicking on Explore Safe apps button opens list of all apps
  • Verify that pinned in dashboard, an app keeps its status on apps page
  • Verify clicking on View All button directs to list of all queued txs
  • Verify there is empty tx string and image when there are no tx queued
  • Verify that the last created tx in conflicting tx is showed in the widget
  • Verify that tx are displayed correctly in Pending tx section
  • Verify clicking on any tx takes the user to Transactions > Queue tab

How to test it

  • Run Cypress tests and observe outcome

Copy link

github-actions bot commented Feb 14, 2024

Copy link

github-actions bot commented Feb 14, 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 Feb 14, 2024

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

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

Five Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/apps 47.92 KB (🟡 +44 B) 1.07 MB
/apps/custom 39.33 KB (🟡 +44 B) 1.06 MB
/balances/nfts 20.49 KB (🟡 +24 B) 1.04 MB
/home 41.26 KB (🟡 +98 B) 1.06 MB
/transactions/tx 34.09 KB (🟡 +16 B) 1.06 MB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

Copy link

github-actions bot commented Feb 14, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
78.88% (-0.01% 🔻)
11512/14594
🔴 Branches
56.84% (-0.04% 🔻)
2573/4527
🟡 Functions
63.61% (-0.01% 🔻)
1830/2877
🟢 Lines
80.2% (+0.01% 🔼)
10384/12948
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢
... / storeHydrator.tsx
100% 100% 100% 100%
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / addressBookSlice.ts
86.49% (-2.7% 🔻)
44.44% (-11.11% 🔻)
87.5% 92.31%
🟢
... / persistStore.ts
95.24% (-0.92% 🔻)
66.67% (-13.33% 🔻)
100%
94.12% (-0.88% 🔻)
🟡
... / index.ts
69.49% (-0.18% 🔻)
63.64% (+1.14% 🔼)
43.75% (-3.31% 🔻)
68.63% (-0.24% 🔻)
🟢
... / index.tsx
82.35% (-8.82% 🔻)
66.67% (-16.67% 🔻)
50% (-12.5% 🔻)
83.87% (-9.68% 🔻)
🔴
... / test-utils.tsx
58.82% (-3.34% 🔻)
66.67% 37.5%
57.58% (-3.54% 🔻)
🟢
... / SignMessage.tsx
89.89%
82.35% (-0.98% 🔻)
66.67% 90.7%
🔴
... / GlobalPushNotifications.tsx
60.42% (-1.35% 🔻)
35.85% (-2.33% 🔻)
55% (-2.14% 🔻)
57.06% (-1.5% 🔻)

Test suite run success

1399 tests passing in 190 suites.

Report generated by 🧪jest coverage report action from bfebb57

@mike10ca mike10ca marked this pull request as ready for review February 14, 2024 15:32
@francovenica francovenica self-requested a review February 14, 2024 17:26
Copy link
Contributor

@francovenica francovenica left a comment

Choose a reason for hiding this comment

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

Just a misspell in one method

const pendingTxItem = '[data-testid="tx-pending-item"]'
const singleTxDetailsHeader = '[data-testid="tx-details"]'

export function clcikOnTxByIndex(index) {
Copy link
Contributor

@francovenica francovenica Feb 14, 2024

Choose a reason for hiding this comment

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

misspelling on the method. It should say clickOnTxByIndex

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@mike10ca mike10ca merged commit d8c4fe1 into dev Feb 14, 2024
15 checks passed
@mike10ca mike10ca deleted the add-dashboard-tests-p2 branch February 14, 2024 18:02
@github-actions github-actions bot locked and limited conversation to collaborators Feb 14, 2024
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.

Add automation tests for Dashboard
2 participants