-
Notifications
You must be signed in to change notification settings - Fork 5.4k
feat: cp-13.12.0 only use build feature flag for sidepanel #38408
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
Changes from all commits
8faf9bb
a41e775
29dcfa1
41ee047
bcf1659
97231f5
f00030e
5f662b7
733a22b
e3f10e8
faf9891
d390cd2
8c865ce
cd6e517
956cadb
3e29061
a4980cb
c286e1e
fa9d999
920ea47
e692d9a
056ccbf
f78abd4
67c4541
b14a9d5
11255c1
2fa16aa
bb8b7e3
6f558d9
4916d85
346dad3
23c0f5d
4b50616
cab7484
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,40 +8,38 @@ import StartOnboardingPage from '../pages/onboarding/start-onboarding-page'; | |
| import SecureWalletPage from '../pages/onboarding/secure-wallet-page'; | ||
| import OnboardingCompletePage from '../pages/onboarding/onboarding-complete-page'; | ||
| import OnboardingPrivacySettingsPage from '../pages/onboarding/onboarding-privacy-settings-page'; | ||
| import { WALLET_PASSWORD } from '../../helpers'; | ||
| import { WALLET_PASSWORD } from '../../constants'; | ||
| import { E2E_SRP } from '../../fixtures/default-fixture'; | ||
| import HomePage from '../pages/home/homepage'; | ||
| import LoginPage from '../pages/login-page'; | ||
| import TermsOfUseUpdateModal from '../pages/dialog/terms-of-use-update-modal'; | ||
|
|
||
| /** | ||
| * Helper function to handle post-onboarding navigation for sidepanel builds. | ||
| * When sidepanel is enabled, clicking "Done" doesn't navigate the current window, | ||
| * so we need to manually navigate to home.html. | ||
| * When sidepanel is enabled, clicking "Done" opens the home page in the sidepanel, | ||
| * but the main window remains on the onboarding completion page. | ||
| * This function navigates the current window to the actual home page. | ||
| * Note: Sidepanel is only supported on Chrome-based browsers, not Firefox. | ||
| * | ||
| * @param driver - The WebDriver instance | ||
| */ | ||
| export const handleSidepanelPostOnboarding = async ( | ||
| driver: Driver, | ||
| ): Promise<void> => { | ||
| // Check if sidepanel is enabled via build configuration | ||
| // AND we're not running on Firefox (which doesn't support sidepanel) | ||
| const isSidepanelEnabled = | ||
| process.env.IS_SIDEPANEL === 'true' && | ||
| process.env.SELENIUM_BROWSER !== Browser.FIREFOX; | ||
|
|
||
| if (isSidepanelEnabled) { | ||
| // Give the onboarding completion time to process (needed for sidepanel) | ||
| await driver.delay(2000); | ||
|
|
||
| // Navigate directly to home page in current window | ||
| // With sidepanel enabled, this ensures we load home page in the test window | ||
| await driver.driver.get(`${driver.extensionUrl}/home.html`); | ||
|
|
||
| // Wait for the home page to fully load | ||
| await driver.waitForSelector('[data-testid="account-menu-icon"]'); | ||
| // Only run on Chrome-based browsers (Firefox doesn't support sidepanel) | ||
| if (process.env.SELENIUM_BROWSER === Browser.FIREFOX) { | ||
| return; | ||
| } | ||
|
|
||
| // Give the onboarding completion time to process (needed for sidepanel) | ||
| await driver.delay(2000); | ||
|
|
||
| // Navigate directly to home page in current window | ||
| // With sidepanel enabled, this ensures we load home page in the test window | ||
| await driver.driver.get(`${driver.extensionUrl}/home.html`); | ||
|
|
||
| // Wait for the home page to fully load | ||
| await driver.waitForSelector('[data-testid="account-menu-icon"]'); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Sidepanel handling inconsistent with flag check helperThe
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is a valid comment though I think also it was the |
||
| }; | ||
|
|
||
| /** | ||
|
|
@@ -506,6 +504,10 @@ export const completeCreateNewWalletOnboardingFlowWithCustomSettings = async ({ | |
| await onboardingCompletePage.checkPageIsLoaded(); | ||
|
|
||
| await onboardingCompletePage.completeOnboarding(); | ||
| if (process.env.SELENIUM_BROWSER === Browser.CHROME) { | ||
| // wait for the sidepanel to open | ||
| await driver.delay(3000); | ||
| } | ||
ameliejyc marked this conversation as resolved.
Show resolved
Hide resolved
ameliejyc marked this conversation as resolved.
Show resolved
Hide resolved
ameliejyc marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| await handleSidepanelPostOnboarding(driver); | ||
| }; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.