Skip to content

Commit fc450a4

Browse files
committed
test: attempt fix permissions multichain e2e
1 parent bbed664 commit fc450a4

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

e2e/specs/multichain/permissions/chains/permission-system-add-non-permitted.spec.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import TabBarComponent from '../../../../pages/wallet/TabBarComponent';
1717
import NetworkNonPemittedBottomSheet from '../../../../pages/Network/NetworkNonPemittedBottomSheet';
1818
import ConnectedAccountsModal from '../../../../pages/Browser/ConnectedAccountsModal';
1919
import NetworkConnectMultiSelector from '../../../../pages/Browser/NetworkConnectMultiSelector';
20+
import { buildPermissions } from '../../../../fixtures/utils';
2021

2122
const fixtureServer = new FixtureServer();
2223
const SEPOLIA = CustomNetworks.Sepolia.providerConfig.nickname;
@@ -141,15 +142,15 @@ describe(
141142
});
142143

143144
it('should allow switching to permitted network when attempting to use non-permitted network', async () => {
145+
const chainIds = ['0x1', CustomNetworks.Sepolia.providerConfig.chainId]; // Initialize with Ethereum mainnet and Sepolia
144146
await withFixtures(
145147
{
146148
dapp: true,
147149
fixture: new FixtureBuilder()
148-
.withPermissionControllerConnectedToTestDapp()
149-
.withChainPermission([
150-
'0x1',
151-
CustomNetworks.Sepolia.providerConfig.chainId,
152-
]) // Initialize with Ethereum mainnet and Sepolia
150+
.withPermissionControllerConnectedToTestDapp(
151+
buildPermissions(chainIds),
152+
)
153+
.withChainPermission(chainIds)
153154
.build(),
154155
restartDevice: true,
155156
},

e2e/specs/multichain/permissions/chains/permission-system-update-permissions.spec.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import WalletView from '../../../../pages/wallet/WalletView';
1515
import NetworkEducationModal from '../../../../pages/Network/NetworkEducationModal';
1616
import PermissionSummaryBottomSheet from '../../../../pages/Browser/PermissionSummaryBottomSheet';
1717
import { NetworkNonPemittedBottomSheetSelectorsText } from '../../../../selectors/Network/NetworkNonPemittedBottomSheet.selectors';
18+
import { buildPermissions } from '../../../../fixtures/utils';
1819

1920
describe(SmokeMultiChainPermissions('Chain Permission Management'), () => {
2021
beforeAll(async () => {
@@ -66,16 +67,19 @@ describe(SmokeMultiChainPermissions('Chain Permission Management'), () => {
6667
});
6768

6869
it('follows fallback priority when revoking permission for currently active chain', async () => {
70+
const chainIds = [
71+
'0x1', // Ethereum mainnet
72+
CustomNetworks.Sepolia.providerConfig.chainId, // Sepolia
73+
'0xe705', // Linea Sepolia
74+
];
6975
await withFixtures(
7076
{
7177
dapp: true,
7278
fixture: new FixtureBuilder()
73-
.withPermissionControllerConnectedToTestDapp()
74-
.withChainPermission([
75-
'0x1', // Ethereum mainnet
76-
CustomNetworks.Sepolia.providerConfig.chainId, // Sepolia
77-
'0xe705', // Linea Sepolia
78-
])
79+
.withPermissionControllerConnectedToTestDapp(
80+
buildPermissions(chainIds),
81+
)
82+
.withChainPermission(chainIds)
7983
.build(),
8084
restartDevice: true,
8185
},

0 commit comments

Comments
 (0)