Fix webdriver for MacOS, onboarding, and obs-importer tests - #6046
Conversation
BundleMonFiles added (4)
Total files change +15.17MB Final result: ✅ View report in BundleMon website ➡️ |
c358049 to
35f1144
Compare
There was a problem hiding this comment.
Pull request overview
Updates the WebdriverIO end-to-end tests to match the new onboarding/login flow and to make macOS startup handling more robust (specifically around the MacPermissions onboarding step).
Changes:
- Updates onboarding test assertions/selectors to reflect the new login UI and onboarding step order.
- Updates the OBS importer test to enter the new onboarding/login flow and start the import via the new UI entry point.
- Updates the Webdriver harness on macOS to only click “Continue” on the MacPermissions screen when that page is actually present.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| test/regular/onboarding.ts | Adjusts onboarding flow test steps/selectors; introduces helper-flow changes that need further alignment with the new onboarding sequence. |
| test/regular/obs-importer.ts | Updates OBS importer test to navigate the new onboarding/login flow and use the new “Start Import” entry point. |
| test/helpers/webdriver/index.ts | Makes macOS startup logic conditional on the MacPermissions page being present before clicking “Continue”. |
Comments suppressed due to low confidence (3)
test/regular/onboarding.ts:136
finishOnboarding()is still written for the old flow (theme step +choose-free-plan-btn), but the updated onboarding test in this file now expects the new sequence (Connect Platforms → Choose Your Plan → Set Up Your Mic & Webcam). As-is, once the entry gating is fixed, this helper is likely to hang or skip required steps for CASE 3/5 that depend on it.
async function finishOnboarding(installTheme = false) {
// Skip hardware config
await waitForDisplayed('h1=Set Up Your Mic & Webcam');
await clickIfDisplayed('button=Skip');
// Theme install
if (installTheme) {
await waitForDisplayed('h1=Add your first theme');
await clickWhenDisplayed('button=Install');
await waitForDisplayed('span=100%');
} else {
await waitForDisplayed('h1=Add your first theme');
await clickIfDisplayed('button=Skip');
}
// Skip purchasing prime
await clickWhenDisplayed('div[data-testid=choose-free-plan-btn]', { timeout: 60000 });
test/regular/onboarding.ts:178
- This selector is both stale relative to the new onboarding UI (this test now checks for
button=Twitch) and also doesn’t assert anything because the boolean result is ignored. It should either be removed or changed to an explicit wait for the new UI so the test reliably synchronizes before callinglogIn.
// Complete login
await isDisplayed('button=Log in with Twitch');
const user = await logIn(t, 'twitch', { prime: false }, false, true);
test/regular/obs-importer.ts:56
- These
clickIfDisplayed('button=Skip')calls don’t wait for the skip buttons to appear. If the next onboarding step renders a moment later, the clicks are skipped and the test can continue on the wrong page. Prefer an explicit wait+click for each expected Skip step.
await clickIfDisplayed('button=Skip');
await clickIfDisplayed('button=Skip');
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e34525b to
de49d57
Compare
webdriver: remove manual button click for MacPermissions.tsx onboarding.ts - Fix onboarding test to run with new onboarding flow obs-importer: Updated for new onboarding flow
de49d57 to
12f80a1
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (2)
test/regular/onboarding.ts:90
goThroughOnboarding()currently returns early (and silently) whenh2=Live Streamingis not shown. With the new onboarding flow (which showsh1=Welcome to Streamlabs Desktop), this helper will no-op and any callers will effectively skip onboarding without failing, producing false-positive tests.
// TODO: This page is no longer shown in the new onboarding flow. We should remove this.
if (!(await isDisplayed('h2=Live Streaming'))) return;
await clickWhenDisplayed('a=Log In', { timeout: 5000 });
test/regular/onboarding.ts:94
- This
await isDisplayed('button=Twitch')call ignores the boolean result, so it doesn't actually assert anything or reliably wait for the login UI before faking auth. Using an explicit wait here makes the helper less flaky and makes the intent clear.
await isDisplayed('button=Twitch');
webdriver: verifyMacPermissions.tsxpage is visible before attempting to click Continue button. Will make this code more robust.onboarding.ts- Fix onboarding test to run with the new onboarding flowobs-importer: Updated for new onboarding flow