Skip to content

Commit 582ec93

Browse files
authored
test: Fix invalid fixture builder (#29783)
## **Description** Two of the permission fixture builders were adding permissions for accounts that do not exist. They have been updated to only grant permissions for the selected account, which is the only account guaranteed to exist in the default fixture. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29783?quickstart=1) ## **Related issues** This was extracted from #27847 ## **Manual testing steps** See that E2E tests still pass ## **Screenshots/Recordings** N/A ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.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.
1 parent 3b85633 commit 582ec93

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

test/e2e/fixture-builder.js

+3-12
Original file line numberDiff line numberDiff line change
@@ -479,10 +479,7 @@ class FixtureBuilder {
479479
caveats: [
480480
{
481481
type: 'restrictReturnedAccounts',
482-
value: [
483-
selectedAccount.toLowerCase(),
484-
'0x09781764c08de8ca82e156bbf156a3ca217c7950',
485-
],
482+
value: [selectedAccount.toLowerCase()],
486483
},
487484
],
488485
date: 1664388714636,
@@ -594,10 +591,7 @@ class FixtureBuilder {
594591
caveats: [
595592
{
596593
type: 'restrictReturnedAccounts',
597-
value: [
598-
'0x5cfe73b6021e818b776b421b1c4db2474086a7e1',
599-
'0x09781764c08de8ca82e156bbf156a3ca217c7950',
600-
],
594+
value: ['0x5cfe73b6021e818b776b421b1c4db2474086a7e1'],
601595
},
602596
],
603597
date: 1664388714636,
@@ -614,10 +608,7 @@ class FixtureBuilder {
614608
caveats: [
615609
{
616610
type: 'restrictReturnedAccounts',
617-
value: [
618-
'0x5cfe73b6021e818b776b421b1c4db2474086a7e1',
619-
'0x09781764c08de8ca82e156bbf156a3ca217c7950',
620-
],
611+
value: ['0x5cfe73b6021e818b776b421b1c4db2474086a7e1'],
621612
},
622613
],
623614
date: 1664388714636,

0 commit comments

Comments
 (0)