Skip to content

Commit 87eb2b8

Browse files
chore: removed balance-check shield-entry-modal e2e tests (#38510)
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> Removed redundant spec for shield-entry modal. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/38510?quickstart=1) ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **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** - [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** - [x] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [x] 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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Removes the low-balance shield-entry-modal test, and adds a test to ensure the modal does not show when eligibility returns false, while keeping the positive and external-services-disabled cases. > > - **Tests (e2e/shield)**: > - Remove low-balance threshold spec and the unused `completeCreateNewWalletOnboardingFlow` import/flow. > - Ensure modal displays and routes to `ShieldPlanPage` when balance > threshold. > - Ensure no modal when external services are disabled (includes `manifestFlags.useExternalServices: false`). > - Add test: no modal when eligibility request returns false via `ShieldMockttpService` option. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit d0d898c. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: Chaitanya Potti <[email protected]>
1 parent 38a5e08 commit 87eb2b8

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

test/e2e/tests/shield/shield-entry-modal.spec.ts

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import FixtureBuilder from '../../fixtures/fixture-builder';
33
import { withFixtures } from '../../helpers';
44
import { loginWithBalanceValidation } from '../../page-objects/flows/login.flow';
55
import ShieldPlanPage from '../../page-objects/pages/settings/shield/shield-plan-page';
6-
import { completeCreateNewWalletOnboardingFlow } from '../../page-objects/flows/onboarding.flow';
76
import HomePage from '../../page-objects/pages/home/homepage';
87
import { ShieldMockttpService } from '../../helpers/shield/mocks';
98

@@ -57,30 +56,6 @@ describe('Shield Entry Modal', function () {
5756
);
5857
});
5958

60-
it('should not show the shield entry modal if user does not have a shield subscription and has a balance less than the minimum fiat balance threshold', async function () {
61-
await withFixtures(
62-
{
63-
fixtures: new FixtureBuilder({ onboarding: true }).build(),
64-
title: this.test?.fullTitle(),
65-
testSpecificMock: (server: Mockttp) => {
66-
const shieldMockttpService = new ShieldMockttpService();
67-
return shieldMockttpService.setup(server);
68-
},
69-
},
70-
async ({ driver }) => {
71-
await completeCreateNewWalletOnboardingFlow({
72-
driver,
73-
});
74-
75-
const homePage = new HomePage(driver);
76-
await homePage.checkPageIsLoaded();
77-
await homePage.checkExpectedBalanceIsDisplayed('0');
78-
79-
await homePage.checkNoShieldEntryModalIsDisplayed();
80-
},
81-
);
82-
});
83-
8459
it('should not show the shield entry modal if external services are disabled', async function () {
8560
await withFixtures(
8661
{

0 commit comments

Comments
 (0)