+
Date: Tue, 29 Apr 2025 08:14:11 -0400
Subject: [PATCH 09/29] Remove onboarding avatar tests, they are becoming
irrelevant
---
e2e/playwright/onboarding-tests.spec.ts | 135 ------------------------
1 file changed, 135 deletions(-)
diff --git a/e2e/playwright/onboarding-tests.spec.ts b/e2e/playwright/onboarding-tests.spec.ts
index 001327f7a88..621cf96088c 100644
--- a/e2e/playwright/onboarding-tests.spec.ts
+++ b/e2e/playwright/onboarding-tests.spec.ts
@@ -277,141 +277,6 @@ test.describe('Onboarding tests', () => {
timeout: 10_000,
})
})
-
- // (lee) The two avatar tests are weird because even on main, we don't have
- // anything to do with the avatar inside the onboarding test. Due to the
- // low impact of an avatar not showing I'm changing this to fixme.
- test('Avatar text updates depending on image load success', async ({
- context,
- page,
- toolbar,
- homePage,
- tronApp,
- }) => {
- if (!tronApp) {
- fail()
- }
-
- await tronApp.cleanProjectDir({
- app: {
- onboarding_status: '',
- },
- })
-
- // Override beforeEach test setup
- await context.addInitScript(
- async ({ settingsKey, settings }) => {
- localStorage.setItem(settingsKey, settings)
- },
- {
- settingsKey: TEST_SETTINGS_KEY,
- settings: settingsToToml({
- settings: TEST_SETTINGS_ONBOARDING_USER_MENU,
- }),
- }
- )
-
- await page.setBodyDimensions({ width: 1200, height: 500 })
- await homePage.goToModelingScene()
-
- // Test that the text in this step is correct
- const avatarLocator = toolbar.userSidebarButton.locator('img')
- const onboardingOverlayLocator = page
- .getByTestId('onboarding-content')
- .locator('div')
- .nth(1)
-
- // Expect the avatar to be visible and for the text to reference it
- await expect(avatarLocator).toBeVisible()
- await expect(onboardingOverlayLocator).toBeVisible()
- await expect(onboardingOverlayLocator).toContainText('your avatar')
-
- // This is to force the avatar to 404.
- // For our test image (only triggers locally. on CI, it's Kurt's /
- // gravatar image )
- await page.route('/cat.jpg', async (route) => {
- await route.fulfill({
- status: 404,
- contentType: 'text/plain',
- body: 'Not Found!',
- })
- })
-
- // 404 the CI avatar image
- await page.route('https://lh3.googleusercontent.com/**', async (route) => {
- await route.fulfill({
- status: 404,
- contentType: 'text/plain',
- body: 'Not Found!',
- })
- })
-
- await page.reload({ waitUntil: 'domcontentloaded' })
-
- // Now expect the text to be different
- await expect(avatarLocator).not.toBeVisible()
- await expect(onboardingOverlayLocator).toBeVisible()
- await expect(onboardingOverlayLocator).toContainText('the menu button')
- })
-
- test("Avatar text doesn't mention avatar when no avatar", async ({
- context,
- page,
- toolbar,
- homePage,
- tronApp,
- }) => {
- if (!tronApp) {
- fail()
- }
-
- await tronApp.cleanProjectDir({
- app: {
- onboarding_status: '',
- },
- })
- // Override beforeEach test setup
- await context.addInitScript(
- async ({ settingsKey, settings }) => {
- localStorage.setItem(settingsKey, settings)
- localStorage.setItem('FORCE_NO_IMAGE', 'FORCE_NO_IMAGE')
- },
- {
- settingsKey: TEST_SETTINGS_KEY,
- settings: settingsToToml({
- settings: TEST_SETTINGS_ONBOARDING_USER_MENU,
- }),
- }
- )
-
- await page.setBodyDimensions({ width: 1200, height: 500 })
- await homePage.goToModelingScene()
-
- // Test that the text in this step is correct
- const sidebar = toolbar.userSidebarButton
- const avatar = sidebar.locator('img')
- const onboardingOverlayLocator = page
- .getByTestId('onboarding-content')
- .locator('div')
- .nth(1)
-
- // Expect the avatar to be visible and for the text to reference it
- await expect(avatar).not.toBeVisible()
- await expect(onboardingOverlayLocator).toBeVisible()
- await expect(onboardingOverlayLocator).toContainText('the menu button')
-
- // Test we mention what else is in this menu for https://github.com/KittyCAD/modeling-app/issues/2939
- // which doesn't deserver its own full test spun up
- const userMenuFeatures = [
- 'manage your account',
- 'report a bug',
- 'request a feature',
- 'sign out',
- ]
- for (const feature of userMenuFeatures) {
- await expect(onboardingOverlayLocator).toContainText(feature)
- }
- })
})
test('Restarting onboarding on desktop takes one attempt', async ({
From 4bbffd0f3e6eab766131db8bf788a65fcf5ff3f9 Mon Sep 17 00:00:00 2001
From: Frank Noirot
Date: Tue, 29 Apr 2025 09:32:41 -0400
Subject: [PATCH 10/29] Consolidate onboarding tests to one longer one
and update it to not use pixel color checks, and use fixtures.
---
e2e/playwright/fixtures/homePageFixture.ts | 2 +
e2e/playwright/fixtures/toolbarFixture.ts | 4 +
e2e/playwright/onboarding-tests.spec.ts | 479 ++++++---------------
src/routes/Home.tsx | 2 +-
4 files changed, 143 insertions(+), 344 deletions(-)
diff --git a/e2e/playwright/fixtures/homePageFixture.ts b/e2e/playwright/fixtures/homePageFixture.ts
index 4878e5fbb93..43765161682 100644
--- a/e2e/playwright/fixtures/homePageFixture.ts
+++ b/e2e/playwright/fixtures/homePageFixture.ts
@@ -24,6 +24,7 @@ export class HomePageFixture {
projectTextName!: Locator
sortByDateBtn!: Locator
sortByNameBtn!: Locator
+ tutorialBtn!: Locator
constructor(page: Page) {
this.page = page
@@ -43,6 +44,7 @@ export class HomePageFixture {
this.sortByDateBtn = this.page.getByTestId('home-sort-by-modified')
this.sortByNameBtn = this.page.getByTestId('home-sort-by-name')
+ this.tutorialBtn = this.page.getByTestId('home-tutorial-button')
}
private _serialiseSortBy = async (): Promise<
diff --git a/e2e/playwright/fixtures/toolbarFixture.ts b/e2e/playwright/fixtures/toolbarFixture.ts
index ed7bffe79c9..4962f1ee2da 100644
--- a/e2e/playwright/fixtures/toolbarFixture.ts
+++ b/e2e/playwright/fixtures/toolbarFixture.ts
@@ -17,6 +17,8 @@ type LengthUnitLabel = (typeof baseUnitLabels)[keyof typeof baseUnitLabels]
export class ToolbarFixture {
public page: Page
+ projectName: Locator
+ fileName: Locator
extrudeButton!: Locator
loftButton!: Locator
sweepButton!: Locator
@@ -53,6 +55,8 @@ export class ToolbarFixture {
constructor(page: Page) {
this.page = page
+ this.projectName = page.getByTestId('app-header-project-name')
+ this.fileName = page.getByTestId('app-header-file-name')
this.extrudeButton = page.getByTestId('extrude')
this.loftButton = page.getByTestId('loft')
this.sweepButton = page.getByTestId('sweep')
diff --git a/e2e/playwright/onboarding-tests.spec.ts b/e2e/playwright/onboarding-tests.spec.ts
index 621cf96088c..49fbd892ba3 100644
--- a/e2e/playwright/onboarding-tests.spec.ts
+++ b/e2e/playwright/onboarding-tests.spec.ts
@@ -1,383 +1,176 @@
-import { join } from 'path'
-import { bracket } from '@e2e/playwright/fixtures/bracket'
-import { onboardingPaths } from '@src/routes/Onboarding/paths'
-import fsp from 'fs/promises'
-
-import { expectPixelColor } from '@e2e/playwright/fixtures/sceneFixture'
-import {
- TEST_SETTINGS_KEY,
- TEST_SETTINGS_ONBOARDING_EXPORT,
- TEST_SETTINGS_ONBOARDING_START,
- TEST_SETTINGS_ONBOARDING_USER_MENU,
-} from '@e2e/playwright/storageStates'
-import {
- createProject,
- executorInputPath,
- getUtils,
- settingsToToml,
-} from '@e2e/playwright/test-utils'
import { expect, test } from '@e2e/playwright/zoo-test'
-// Because our default test settings have the onboardingStatus set to 'dismissed',
-// we must set it to empty for the tests where we want to see the onboarding immediately.
-
test.describe('Onboarding tests', () => {
- test('Onboarding code is shown in the editor', async ({
+ test('Desktop onboarding flow works', async ({
page,
homePage,
- tronApp,
- }) => {
- if (!tronApp) {
- fail()
- }
- await tronApp.cleanProjectDir({
- app: {
- onboarding_status: '',
- },
- })
-
- const u = await getUtils(page)
- await page.setBodyDimensions({ width: 1200, height: 500 })
- await homePage.goToModelingScene()
-
- await test.step('Ensure the onboarding request toast appears', async () => {
- await expect(page.getByTestId('onboarding-toast')).toBeVisible()
- await page.getByTestId('onboarding-next').click()
- })
-
- // Test that the onboarding pane loaded
- await expect(page.getByText('Welcome to Design Studio! This')).toBeVisible()
-
- // Test that the onboarding pane loaded
- await expect(page.getByText('Welcome to Design Studio! This')).toBeVisible()
-
- // *and* that the code is shown in the editor
- await expect(page.locator('.cm-content')).toContainText('// Shelf Bracket')
-
- // Make sure the model loaded
- const XYPlanePoint = { x: 774, y: 116 } as const
- const modelColor: [number, number, number] = [45, 45, 45]
- await page.mouse.move(XYPlanePoint.x, XYPlanePoint.y)
- expect(await u.getGreatestPixDiff(XYPlanePoint, modelColor)).toBeLessThan(8)
- })
-
- test(
- 'Desktop: fresh onboarding executes and loads',
- {
- tag: '@electron',
- },
- async ({ page, tronApp, scene }) => {
- if (!tronApp) {
- fail()
- }
- await tronApp.cleanProjectDir({
- app: {
- onboarding_status: '',
- },
- })
-
- const viewportSize = { width: 1200, height: 500 }
- await page.setBodyDimensions(viewportSize)
-
- await test.step(`Create a project and open to the onboarding`, async () => {
- await createProject({ name: 'project-link', page })
- await test.step(`Ensure the engine connection works by testing the sketch button`, async () => {
- await scene.connectionEstablished()
- })
- })
-
- await test.step(`Ensure we see the onboarding stuff`, async () => {
- await test.step('Ensure the onboarding request toast appears', async () => {
- await expect(page.getByTestId('onboarding-toast')).toBeVisible()
- await page.getByTestId('onboarding-next').click()
- })
-
- // Test that the onboarding pane loaded
- await expect(
- page.getByText('Welcome to Design Studio! This')
- ).toBeVisible()
-
- // *and* that the code is shown in the editor
- await expect(page.locator('.cm-content')).toContainText(
- '// Shelf Bracket'
- )
-
- // TODO: jess make less shit
- // Make sure the model loaded
- //const XYPlanePoint = { x: 986, y: 522 } as const
- //const modelColor: [number, number, number] = [76, 76, 76]
- //await page.mouse.move(XYPlanePoint.x, XYPlanePoint.y)
-
- //await expectPixelColor(page, modelColor, XYPlanePoint, 8)
- })
- }
- )
-
- test('Code resets after confirmation', async ({
- page,
- homePage,
- tronApp,
+ toolbar,
+ editor,
scene,
- }) => {
- if (!tronApp) {
- fail()
- }
- await tronApp.cleanProjectDir()
-
- const initialCode = `sketch001 = startSketchOn(XZ)`
-
- // Load the page up with some code so we see the confirmation warning
- // when we go to replay onboarding
- await page.addInitScript((code) => {
- localStorage.setItem('persistCode', code)
- }, initialCode)
-
- await page.setBodyDimensions({ width: 1200, height: 500 })
- await homePage.goToModelingScene()
- await scene.connectionEstablished()
-
- // Replay the onboarding
- await page.getByRole('link', { name: 'Settings' }).last().click()
- const replayButton = page.getByRole('button', {
- name: 'Replay onboarding',
- })
- await expect(replayButton).toBeVisible()
- await replayButton.click()
-
- // Ensure we see the warning, and that the code has not yet updated
- await expect(
- page.getByText('Start tutorial in a new project?')
- ).toBeVisible()
- await expect(page.locator('.cm-content')).toHaveText(initialCode)
-
- const nextButton = page.getByTestId('onboarding-next')
- await nextButton.hover()
- await nextButton.click()
-
- // Ensure we see the introduction and that the code has been reset
- await expect(page.getByText('Welcome to Design Studio!')).toBeVisible()
- await expect(page.locator('.cm-content')).toContainText('// Shelf Bracket')
-
- // There used to be old code here that checked if we stored the reset
- // code into localStorage but that isn't the case on desktop. It gets
- // saved to the file system, which we have other tests for.
- })
-
- test('Click through each onboarding step and back', async ({
- context,
- page,
- homePage,
tronApp,
}) => {
if (!tronApp) {
fail()
}
+
+ // Because our default test settings have the onboardingStatus set to 'dismissed',
+ // we must set it to empty for the tests where we want to see the onboarding UI.
await tronApp.cleanProjectDir({
app: {
onboarding_status: '',
},
})
- // Override beforeEach test setup
- await context.addInitScript(
- async ({ settingsKey, settings }) => {
- // Give no initial code, so that the onboarding start is shown immediately
- localStorage.setItem('persistCode', '')
- localStorage.setItem(settingsKey, settings)
- },
- {
- settingsKey: TEST_SETTINGS_KEY,
- settings: settingsToToml({
- settings: TEST_SETTINGS_ONBOARDING_START,
- }),
- }
- )
-
- await page.setBodyDimensions({ width: 1200, height: 1080 })
- await homePage.goToModelingScene()
+ const bracketComment = '// Shelf Bracket'
+ const tutorialWelcomHeading = page.getByText(
+ 'Welcome to Design Studio! This'
+ )
const nextButton = page.getByTestId('onboarding-next')
const prevButton = page.getByTestId('onboarding-prev')
-
- await test.step('Ensure the onboarding request toast appears', async () => {
- await expect(page.getByTestId('onboarding-toast')).toBeVisible()
- await nextButton.click()
+ const userMenuButton = toolbar.userSidebarButton
+ const userMenuSettingsButton = page.getByRole('button', {
+ name: 'User settings',
})
-
- // Test that the onboarding pane loaded
- await expect(page.getByText('Welcome to Design Studio! This')).toBeVisible()
-
- while ((await nextButton.innerText()) !== 'Finish') {
- await nextButton.hover()
- await nextButton.click()
- }
-
- while ((await prevButton.innerText()) !== 'Dismiss') {
- await prevButton.hover()
- await prevButton.click()
- }
-
- // Dismiss the onboarding
- await prevButton.hover()
- await prevButton.click()
-
- // Test that the onboarding pane is gone
- await expect(page.getByTestId('onboarding-content')).not.toBeVisible()
- await expect.poll(() => page.url()).not.toContain('/onboarding')
- })
-
- test('Onboarding code gets reset to demo on Interactive Numbers step', async ({
- page,
- homePage,
- tronApp,
- editor,
- toolbar,
- }) => {
- if (!tronApp) {
- fail()
- }
- await tronApp.cleanProjectDir({
- app: {
- onboarding_status: '/parametric-modeling',
- },
+ const settingsHeading = page.getByRole('heading', {
+ name: 'Settings',
+ exact: true,
})
-
- const badCode = `// This is bad code we shouldn't see`
-
- await page.setBodyDimensions({ width: 1200, height: 1080 })
- await homePage.goToModelingScene()
-
- await expect
- .poll(() => page.url())
- .toContain(onboardingPaths.PARAMETRIC_MODELING)
-
- // Check the code got reset on load
- await toolbar.openPane('code')
- await editor.expectEditor.toContain(bracket, {
- shouldNormalise: true,
- timeout: 10_000,
+ const restartOnboardingSettingsButton = page.getByRole('button', {
+ name: 'Replay onboarding',
})
-
- // Mess with the code again
- await editor.replaceCode('', badCode)
- await editor.expectEditor.toContain(badCode, {
- shouldNormalise: true,
- timeout: 10_000,
+ const helpMenuButton = page.getByRole('button', {
+ name: 'Help and resources',
})
-
- // Click to the next step
- await page.locator('[data-testid="onboarding-next"]').hover()
- await page.locator('[data-testid="onboarding-next"]').click()
- await page.waitForURL('**' + onboardingPaths.INTERACTIVE_NUMBERS, {
- waitUntil: 'domcontentloaded',
+ const helpMenuRestartOnboardingButton = page.getByRole('button', {
+ name: 'Replay onboarding tutorial',
})
+ const postDismissToast = page.getByText(
+ 'Click the question mark in the lower-right corner if you ever want to redo the tutorial!'
+ )
- // Check that the code has been reset
- await editor.expectEditor.toContain(bracket, {
- shouldNormalise: true,
- timeout: 10_000,
+ await test.step('Test initial home page view, showing a tutorial button', async () => {
+ await expect(homePage.tutorialBtn).toBeVisible()
+ await homePage.expectState({
+ projectCards: [],
+ sortBy: 'last-modified-desc',
+ })
})
- })
-})
-test('Restarting onboarding on desktop takes one attempt', async ({
- context,
- page,
- toolbar,
- tronApp,
-}) => {
- if (!tronApp) {
- fail()
- }
-
- await tronApp.cleanProjectDir({
- app: {
- onboarding_status: 'dismissed',
- },
- })
+ await test.step('Create a blank project and verify no onboarding chrome is shown', async () => {
+ await homePage.goToModelingScene()
+ await expect(toolbar.projectName).toContainText('testDefault')
+ await expect(tutorialWelcomHeading).not.toBeVisible()
+ await editor.expectEditor.toContain('@settings(defaultLengthUnit = in)', {
+ shouldNormalise: true,
+ })
+ await scene.connectionEstablished()
+ await expect(toolbar.startSketchBtn).toBeEnabled({ timeout: 15_000 })
+ })
- await context.folderSetupFn(async (dir) => {
- const routerTemplateDir = join(dir, 'router-template-slate')
- await fsp.mkdir(routerTemplateDir, { recursive: true })
- await fsp.copyFile(
- executorInputPath('router-template-slate.kcl'),
- join(routerTemplateDir, 'main.kcl')
- )
- })
+ await test.step('Go home and verify we still see the tutorial button, then begin it.', async () => {
+ await toolbar.logoLink.click()
+ await expect(homePage.tutorialBtn).toBeVisible()
+ await homePage.expectState({
+ projectCards: [
+ {
+ title: 'testDefault',
+ fileCount: 1,
+ },
+ ],
+ sortBy: 'last-modified-desc',
+ })
+ await homePage.tutorialBtn.click()
+ })
- // Our constants
- const u = await getUtils(page)
- const projectCard = page.getByText('router-template-slate')
- const helpMenuButton = page.getByRole('button', {
- name: 'Help and resources',
- })
- const restartOnboardingButton = page.getByRole('button', {
- name: 'Replay onboarding tutorial',
- })
- const nextButton = page.getByTestId('onboarding-next')
+ // This is web-only.
+ // TODO: write a new test just for the onboarding in browser
+ // await test.step('Ensure the onboarding request toast appears', async () => {
+ // await expect(page.getByTestId('onboarding-toast')).toBeVisible()
+ // await page.getByTestId('onboarding-next').click()
+ // })
+
+ await test.step('Ensure we see the welcome screen in a new project', async () => {
+ await expect(toolbar.projectName).toContainText('Tutorial Project 00')
+ await expect(tutorialWelcomHeading).toBeVisible()
+ await editor.expectEditor.toContain(bracketComment)
+ await scene.connectionEstablished()
+ await expect(toolbar.startSketchBtn).toBeEnabled({ timeout: 15_000 })
+ })
- const tutorialProjectIndicator = page
- .getByTestId('project-sidebar-toggle')
- .filter({ hasText: 'Tutorial Project 00' })
- const tutorialModalText = page.getByText('Welcome to Design Studio!')
- const tutorialDismissButton = page.getByRole('button', { name: 'Dismiss' })
- const userMenuButton = toolbar.userSidebarButton
- const userMenuSettingsButton = page.getByRole('button', {
- name: 'User settings',
- })
- const settingsHeading = page.getByRole('heading', {
- name: 'Settings',
- exact: true,
- })
- const restartOnboardingSettingsButton = page.getByRole('button', {
- name: 'Replay onboarding',
- })
+ await test.step('Test the clicking through the onboarding flow', async () => {
+ await test.step('Going forward', async () => {
+ while ((await nextButton.innerText()) !== 'Finish') {
+ await nextButton.hover()
+ await nextButton.click()
+ }
+ })
- await test.step('Navigate into project', async () => {
- await expect(page.getByRole('heading', { name: 'Projects' })).toBeVisible()
- await expect(projectCard).toBeVisible()
- await projectCard.click()
- await u.waitForPageLoad()
- })
+ await test.step('Going backward', async () => {
+ while ((await prevButton.innerText()) !== 'Dismiss') {
+ await prevButton.hover()
+ await prevButton.click()
+ }
+ })
- await test.step('Restart the onboarding from help menu', async () => {
- await helpMenuButton.click()
- await restartOnboardingButton.click()
+ // Dismiss the onboarding
+ await test.step('Dismiss the onboarding', async () => {
+ await prevButton.hover()
+ await prevButton.click()
+ await expect(page.getByTestId('onboarding-content')).not.toBeVisible()
+ await expect(postDismissToast).toBeVisible()
+ await expect.poll(() => page.url()).not.toContain('/onboarding')
+ })
+ })
- await nextButton.hover()
- await nextButton.click()
- })
+ await test.step('Resetting onboarding from inside project should always make a new one', async () => {
+ await test.step('Reset onboarding from settings', async () => {
+ await userMenuButton.click()
+ await userMenuSettingsButton.click()
+ await expect(settingsHeading).toBeVisible()
+ await expect(restartOnboardingSettingsButton).toBeVisible()
+ await restartOnboardingSettingsButton.click()
+ })
- await test.step('Confirm that the onboarding has restarted', async () => {
- await expect(tutorialProjectIndicator).toBeVisible()
- await expect(tutorialModalText).toBeVisible()
- // Make sure the model loaded
- const XYPlanePoint = { x: 988, y: 523 } as const
- const modelColor: [number, number, number] = [76, 76, 76]
+ await test.step('Makes a new project', async () => {
+ await expect(toolbar.projectName).toContainText('Tutorial Project 01')
+ await expect(tutorialWelcomHeading).toBeVisible()
+ await editor.expectEditor.toContain(bracketComment)
+ await scene.connectionEstablished()
+ await expect(toolbar.startSketchBtn).toBeEnabled({ timeout: 15_000 })
+ })
- await page.mouse.move(XYPlanePoint.x, XYPlanePoint.y)
- await expectPixelColor(page, modelColor, XYPlanePoint, 8)
- await tutorialDismissButton.click()
- // Make sure model still there.
- await expectPixelColor(page, modelColor, XYPlanePoint, 8)
- })
+ await test.step('Dismiss the onboarding', async () => {
+ await postDismissToast.waitFor({ state: 'detached' })
+ await page.keyboard.press('Escape')
+ await expect(postDismissToast).toBeVisible()
+ await expect(page.getByTestId('onboarding-content')).not.toBeVisible()
+ await expect.poll(() => page.url()).not.toContain('/onboarding')
+ })
+ })
- await test.step('Clear code and restart onboarding from settings', async () => {
- await u.openKclCodePanel()
- await expect(u.codeLocator).toContainText('// Shelf Bracket')
- await u.codeLocator.selectText()
- await u.codeLocator.fill('')
+ await test.step('Resetting onboarding from home help menu makes a new project', async () => {
+ await test.step('Go home and reset onboarding from lower-right help menu', async () => {
+ await toolbar.logoLink.click()
+ await expect(homePage.tutorialBtn).not.toBeVisible()
+ await homePage.expectState({
+ projectCards: [
+ { title: 'Tutorial Project 01', fileCount: 1 },
+ { title: 'Tutorial Project 00', fileCount: 1 },
+ { title: 'testDefault', fileCount: 1 },
+ ],
+ sortBy: 'last-modified-desc',
+ })
+ await helpMenuButton.click()
+ await helpMenuRestartOnboardingButton.click()
+ })
- await test.step('Navigate to settings', async () => {
- await userMenuButton.click()
- await userMenuSettingsButton.click()
- await expect(settingsHeading).toBeVisible()
- await expect(restartOnboardingSettingsButton).toBeVisible()
+ await test.step('Makes a new project', async () => {
+ await expect(toolbar.projectName).toContainText('Tutorial Project 02')
+ await expect(tutorialWelcomHeading).toBeVisible()
+ await editor.expectEditor.toContain(bracketComment)
+ await scene.connectionEstablished()
+ await expect(toolbar.startSketchBtn).toBeEnabled({ timeout: 15_000 })
+ })
})
-
- await restartOnboardingSettingsButton.click()
- // Since the code is empty, we should not see the confirmation dialog
- await expect(nextButton).not.toBeVisible()
- await expect(tutorialProjectIndicator).toBeVisible()
- await expect(tutorialModalText).toBeVisible()
})
})
diff --git a/src/routes/Home.tsx b/src/routes/Home.tsx
index d4fde7ce9f1..38ef49357e9 100644
--- a/src/routes/Home.tsx
+++ b/src/routes/Home.tsx
@@ -235,7 +235,7 @@ const Home = () => {
bgClassName: '!bg-primary rounded-sm',
iconClassName: '!text-white',
}}
- data-testid="home-tutorial"
+ data-testid="home-tutorial-button"
>
{onboardingStatus === '' ? 'Start' : 'Continue'} tutorial
From 1237d38eebef5d05cd30317b6563eeb82d94a3a6 Mon Sep 17 00:00:00 2001
From: Frank Noirot
Date: Tue, 29 Apr 2025 09:52:06 -0400
Subject: [PATCH 11/29] Shorten warning toast button text
---
src/routes/Onboarding/utils.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/routes/Onboarding/utils.tsx b/src/routes/Onboarding/utils.tsx
index 31a95a6b5c7..c749f9c672e 100644
--- a/src/routes/Onboarding/utils.tsx
+++ b/src/routes/Onboarding/utils.tsx
@@ -399,7 +399,7 @@ export function TutorialWebConfirmationToast(props: OnboardingUtilDeps) {
name="accept"
onClick={onAccept}
>
- Overwrite my code and begin
+ Overwrite and begin
From dd05756b2a188231bc8e34d8eb0ef85c1bf54ae4 Mon Sep 17 00:00:00 2001
From: Frank Noirot