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 collectibles tests #3264

Merged
merged 2 commits into from
Feb 15, 2024
Merged

Tests: add collectibles tests #3264

merged 2 commits into from
Feb 15, 2024

Conversation

mike10ca
Copy link
Contributor

What it solves

Resolves #3261

How this PR fixes it

To increase automation coverage, the following test were added to collectibles suite:

  • Verify Send button is disabled for disconnected wallet
  • Verify Send button is disabled for non-owner
  • Verify that when 2 NFTs are selected, actions and tx details are correct in Review step
  • Verify that when 1 NFTs is selected, there is no Actions block in Review step

How to test it

  • Run Cypress tests and observe outcome.

Copy link

github-actions bot commented Feb 15, 2024

Copy link

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

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

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

Six 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/open 64.18 KB (🟡 +16 B) 1.09 MB
/transactions 92.67 KB (🟡 +16 B) 1.12 MB
/transactions/history 92.63 KB (🟡 +16 B) 1.12 MB
/transactions/messages 49.46 KB (🟡 +16 B) 1.07 MB
/transactions/queue 44.56 KB (🟡 +16 B) 1.07 MB
/transactions/tx 34.11 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 15, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
78.93% (+0.24% 🔼)
11554/14638
🔴 Branches
56.97% (+0.17% 🔼)
2587/4541
🟡 Functions
63.72% (+0.09% 🔼)
1839/2886
🟢 Lines
80.23% (+0.22% 🔼)
10418/12985
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🔴
... / undeployedSafesSlice.ts
44% (+5.76% 🔼)
0% (-33.33% 🔻)
60% (+10% 🔼)
50% (+4.17% 🔼)
🟡
... / index.tsx
58.62% (-1.38% 🔻)
0% 0%
65.38% (-1.28% 🔻)
🟡
... / CounterfactualForm.tsx
73.53% (-1.86% 🔻)
46.67%
50% (-16.67% 🔻)
73.85% (-1.96% 🔻)

Test suite run success

1404 tests passing in 191 suites.

Report generated by 🧪jest coverage report action from 9e669b2

@mike10ca mike10ca marked this pull request as ready for review February 15, 2024 11:44
@@ -78,13 +78,17 @@ const DecodedTx = ({
)}

<Accordion elevation={0} onChange={onChangeExpand} sx={!tx ? { pointerEvents: 'none' } : undefined}>
<AccordionSummary expandIcon={<ExpandMoreIcon />} className={accordionCss.accordion}>
<AccordionSummary
data-testid="accordion-summary"
Copy link
Member

Choose a reason for hiding this comment

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

I would name it something more specific to decoded txs as we use the same AccordionSummary in many other components.

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

<span style={{ flex: 1 }}>Transaction details</span>

{decodedData ? decodedData.method : tx?.data.operation === OperationType.DelegateCall ? 'Delegate call' : ''}
</AccordionSummary>

<AccordionDetails>
<AccordionDetails data-testid="accordion-details">
Copy link
Member

Choose a reason for hiding this comment

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

Same here.

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

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.

LGTM

@mike10ca mike10ca merged commit fb2fdb1 into dev Feb 15, 2024
15 checks passed
@mike10ca mike10ca deleted the cypress-collectibles-tests branch February 15, 2024 17:28
@github-actions github-actions bot locked and limited conversation to collaborators Feb 15, 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 for collectibles
3 participants