-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/feature-flag-threshold
- Loading branch information
Showing
5 changed files
with
86 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
e2e/specs/multichain/permission-system-summary-default-permissions.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
'use strict'; | ||
import TestHelpers from '../../helpers'; | ||
import { SmokeMultiChainPermissions } from '../../tags'; | ||
import Browser from '../../pages/Browser/BrowserView'; | ||
import TabBarComponent from '../../pages/wallet/TabBarComponent'; | ||
import ConnectedAccountsModal from '../../pages/Browser/ConnectedAccountsModal'; | ||
import FixtureBuilder from '../../fixtures/fixture-builder'; | ||
import { withFixtures } from '../../fixtures/fixture-helper'; | ||
import { loginToApp } from '../../viewHelper'; | ||
import Assertions from '../../utils/Assertions'; | ||
import PermissionSummaryBottomSheet from '../../pages/Browser/PermissionSummaryBottomSheet'; | ||
import { PermissionSummaryBottomSheetSelectorsText } from '../../selectors/Browser/PermissionSummaryBottomSheet.selectors'; | ||
|
||
describe( | ||
SmokeMultiChainPermissions('Permission System - Default Permissions'), | ||
() => { | ||
beforeAll(async () => { | ||
jest.setTimeout(150000); | ||
await TestHelpers.reverseServerPort(); | ||
}); | ||
|
||
it('should display default account and chain permissions in permission summary', async () => { | ||
// Test setup with fixtures | ||
await withFixtures( | ||
{ | ||
dapp: true, | ||
fixture: new FixtureBuilder() | ||
.withPermissionControllerConnectedToTestDapp() | ||
.withChainPermission() // Initialize with Ethereum mainnet only | ||
.build(), | ||
restartDevice: true, | ||
}, | ||
async () => { | ||
// Step 1: Initial app setup | ||
await loginToApp(); | ||
await TabBarComponent.tapBrowser(); | ||
await Browser.navigateToTestDApp(); | ||
|
||
// Step 2: Navigate to permissions management | ||
await Browser.tapNetworkAvatarButtonOnBrowser(); | ||
await ConnectedAccountsModal.tapManagePermissionsButton(); | ||
|
||
// Step 3: Verify account permissions | ||
const accountLabelElement = | ||
await PermissionSummaryBottomSheet.accountPermissionLabelContainer; | ||
const accountLabelAttributes = | ||
await accountLabelElement.getAttributes(); | ||
const accountLabel = accountLabelAttributes.label; | ||
|
||
await Assertions.checkIfTextMatches( | ||
accountLabel, | ||
PermissionSummaryBottomSheetSelectorsText.ACCOUNT_ONE_LABEL, | ||
); | ||
|
||
// Step 4: Verify chain permissions | ||
await Assertions.checkIfVisible( | ||
PermissionSummaryBottomSheet.ethereumMainnetText, | ||
); | ||
}, | ||
); | ||
}); | ||
}, | ||
); |