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

fix: (cherry-pick) Remove special reject button case from api spec tests (#26048) #26051

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

pedronfigueiredo
Copy link
Contributor

@pedronfigueiredo pedronfigueiredo commented Jul 23, 2024

Description

Merging #25769 toggled on the signatures redesign by default for all tests. This change resulted in api-spec tests failing.

The fix is removing the logic for conditionally expect a "Reject" button instead of the default "Cancel" for some confirmations. In the redesign all signatures share the same footer.

Open in GitHub Codespaces

Related issues

No issue created for this test failure

Manual testing steps

Create a test build, then run yarn test:api-specs

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Description

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

## **Description**

Merging #25769
toggled on the signatures redesign by default for all tests. This change
resulted in `api-spec` tests failing.

The fix is removing the logic for conditionally expect a "Reject" button
instead of the default "Cancel" for some confirmations. In the redesign
all signatures share the same footer.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/26048?quickstart=1)

## **Related issues**

No issue created for this test failure

## **Manual testing steps**

Create a test build, then run `yarn test:api-specs`

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
@pedronfigueiredo pedronfigueiredo requested a review from a team as a code owner July 23, 2024 15:43
@pedronfigueiredo pedronfigueiredo self-assigned this Jul 23, 2024
@pedronfigueiredo pedronfigueiredo added the team-confirmations Push issues to confirmations team label Jul 23, 2024
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Removed special case logic for 'Reject' button in api-spec tests to align with the new signatures redesign.

  • Modified test/e2e/api-specs/ConfirmationRejectionRule.ts to remove conditional logic for 'Reject' button.
  • Ensured all confirmation dialogs now expect the default 'Cancel' button.
  • Simplified test logic for consistency and maintainability.
  • Verified no specific scenarios requiring 'Reject' button are overlooked.

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

@pedronfigueiredo pedronfigueiredo changed the title fix: Remove special reject button case from api spec tests (#26048) cherry-pick: fix: Remove special reject button case from api spec tests (#26048) Jul 23, 2024
@pedronfigueiredo pedronfigueiredo changed the title cherry-pick: fix: Remove special reject button case from api spec tests (#26048) fix: (cherry-pick) Remove special reject button case from api spec tests (#26048) Jul 23, 2024
@pedronfigueiredo pedronfigueiredo merged commit 6b875da into Version-v12.2.0 Jul 23, 2024
70 of 74 checks passed
@pedronfigueiredo pedronfigueiredo deleted the pnf/cherry-pick-api-spec-fix branch July 23, 2024 16:03
@github-actions github-actions bot locked and limited conversation to collaborators Jul 23, 2024
@metamaskbot metamaskbot added the release-12.2.0 Issue or pull request that will be included in release 12.2.0 label Aug 19, 2024
@metamaskbot
Copy link
Collaborator

No release label on PR. Adding release label release-12.2.0 on PR, as PR was cherry-picked in branch 12.2.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.2.0 Issue or pull request that will be included in release 12.2.0 team-confirmations Push issues to confirmations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants