diff --git a/e2e/playwright/fixtures/fixtureSetup.ts b/e2e/playwright/fixtures/fixtureSetup.ts index 27e5066e8..4e1c65e97 100644 --- a/e2e/playwright/fixtures/fixtureSetup.ts +++ b/e2e/playwright/fixtures/fixtureSetup.ts @@ -247,7 +247,7 @@ export class ElectronZoo { } if (!this.firstUrl) { - await this.page.getByText('Your Projects').count() + await this.page.getByRole('heading', { name: 'Projects' }).count() this.firstUrl = this.page.url() } diff --git a/e2e/playwright/fixtures/homePageFixture.ts b/e2e/playwright/fixtures/homePageFixture.ts index 09d77b014..4878e5fbb 100644 --- a/e2e/playwright/fixtures/homePageFixture.ts +++ b/e2e/playwright/fixtures/homePageFixture.ts @@ -92,6 +92,13 @@ export class HomePageFixture { } } + expectIsCurrentPage = async () => { + await expect(this.page).toHaveURL(/.*home/) + await expect( + this.page.getByRole('heading', { name: 'Projects' }) + ).toBeVisible() + } + projectsLoaded = async () => { await expect(this.projectSection).not.toHaveText('Loading your Projects...') } diff --git a/e2e/playwright/onboarding-tests.spec.ts b/e2e/playwright/onboarding-tests.spec.ts index fc8e2745e..a2e776c56 100644 --- a/e2e/playwright/onboarding-tests.spec.ts +++ b/e2e/playwright/onboarding-tests.spec.ts @@ -510,9 +510,7 @@ test('Restarting onboarding on desktop takes one attempt', async ({ }) await test.step('Navigate into project', async () => { - await expect( - page.getByRole('heading', { name: 'Your Projects' }) - ).toBeVisible() + await expect(page.getByRole('heading', { name: 'Projects' })).toBeVisible() await expect(projectCard).toBeVisible() await projectCard.click() await u.waitForPageLoad() diff --git a/e2e/playwright/projects.spec.ts b/e2e/playwright/projects.spec.ts index d8b45a6e5..86d9bfee4 100644 --- a/e2e/playwright/projects.spec.ts +++ b/e2e/playwright/projects.spec.ts @@ -723,7 +723,7 @@ test( test( 'pressing "delete" on home screen should do nothing', { tag: '@electron' }, - async ({ context, page }, testInfo) => { + async ({ context, page, homePage }, testInfo) => { await context.folderSetupFn(async (dir) => { await fsp.mkdir(`${dir}/router-template-slate`, { recursive: true }) await fsp.copyFile( @@ -737,7 +737,7 @@ test( await expect(page.getByText('router-template-slate')).toBeVisible() await expect(page.getByText('Loading your Projects...')).not.toBeVisible() - await expect(page.getByText('Your Projects')).toBeVisible() + await homePage.expectIsCurrentPage() await page.keyboard.press('Delete') await page.waitForTimeout(200) @@ -745,7 +745,7 @@ test( // expect to still be on the home page await expect(page.getByText('router-template-slate')).toBeVisible() - await expect(page.getByText('Your Projects')).toBeVisible() + await homePage.expectIsCurrentPage() } ) diff --git a/e2e/playwright/regression-tests.spec.ts b/e2e/playwright/regression-tests.spec.ts index e96da04fc..edf71bb78 100644 --- a/e2e/playwright/regression-tests.spec.ts +++ b/e2e/playwright/regression-tests.spec.ts @@ -579,7 +579,7 @@ extrude002 = extrude(profile002, length = 150) // Locators const projectsHeading = page.getByRole('heading', { - name: 'Your projects', + name: 'Projects', }) const projectLink = page.getByRole('link', { name: 'bracket' }) const networkHealthIndicator = page.getByTestId('network-toggle') diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-Inch-scale-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-Inch-scale-1-Google-Chrome-linux.png index d700bc8e4..d4ba8fa62 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-Inch-scale-1-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-Inch-scale-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-Inch-scale-2-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-Inch-scale-2-Google-Chrome-linux.png index 6210f4102..061274ae6 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-Inch-scale-2-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-Inch-scale-2-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-Millimeter-scale-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-Millimeter-scale-1-Google-Chrome-linux.png index 0930d6f1c..dec21b27e 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-Millimeter-scale-1-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-Millimeter-scale-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-Millimeter-scale-2-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-Millimeter-scale-2-Google-Chrome-linux.png index 6210f4102..618620c06 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-Millimeter-scale-2-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Client-side-scene-scale-should-match-engine-scale-Millimeter-scale-2-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-circle-should-look-right-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-circle-should-look-right-1-Google-Chrome-linux.png index 388d57e3f..797d295a1 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-circle-should-look-right-1-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-circle-should-look-right-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-rectangles-should-look-right-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-rectangles-should-look-right-1-Google-Chrome-linux.png index 3ffcf6bb5..789342195 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-rectangles-should-look-right-1-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-rectangles-should-look-right-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-1-Google-Chrome-linux.png index 07e46d441..948301555 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-1-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-2-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-2-Google-Chrome-linux.png index 44941d7d0..4254558b2 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-2-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-2-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-3-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-3-Google-Chrome-linux.png index 7f11ac4b2..3c4be1ae6 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-3-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-3-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-4-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-4-Google-Chrome-linux.png index 212b208e4..c3021578a 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-4-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-4-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-5-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-5-Google-Chrome-linux.png index d047115e9..dddbeb24e 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-5-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Draft-segments-should-look-right-5-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Sketch-on-face-with-none-z-up-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Sketch-on-face-with-none-z-up-1-Google-Chrome-linux.png index c5711f32d..07854ea8a 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Sketch-on-face-with-none-z-up-1-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Sketch-on-face-with-none-z-up-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Zoom-to-fit-on-load---solid-2d-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Zoom-to-fit-on-load---solid-2d-1-Google-Chrome-linux.png index a5d9fe750..458ab0de0 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Zoom-to-fit-on-load---solid-2d-1-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Zoom-to-fit-on-load---solid-2d-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Zoom-to-fit-on-load---solid-3d-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Zoom-to-fit-on-load---solid-3d-1-Google-Chrome-linux.png index 902df7091..b6aeee367 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/Zoom-to-fit-on-load---solid-3d-1-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/Zoom-to-fit-on-load---solid-3d-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/code-color-goober-code-color-goober-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/code-color-goober-code-color-goober-1-Google-Chrome-linux.png index 9f5375cdb..b235fa80b 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/code-color-goober-code-color-goober-1-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/code-color-goober-code-color-goober-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/code-color-goober-code-color-goober-opening-window-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/code-color-goober-code-color-goober-opening-window-1-Google-Chrome-linux.png index 5d213836b..30af707f3 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/code-color-goober-code-color-goober-opening-window-1-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/code-color-goober-code-color-goober-opening-window-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable--XY-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable--XY-1-Google-Chrome-linux.png index 067fb599b..a258cf998 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable--XY-1-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable--XY-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable--XZ-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable--XZ-1-Google-Chrome-linux.png index b2f396f3b..0e4d7ead3 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable--XZ-1-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable--XZ-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable--YZ-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable--YZ-1-Google-Chrome-linux.png index 2a3ba9bb3..016ab097a 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable--YZ-1-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable--YZ-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable-XY-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable-XY-1-Google-Chrome-linux.png index 3ad306366..39d0f7595 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable-XY-1-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable-XY-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable-XZ-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable-XZ-1-Google-Chrome-linux.png index fa22d0b7c..4ea4c6e51 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable-XZ-1-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable-XZ-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable-YZ-1-Google-Chrome-linux.png b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable-YZ-1-Google-Chrome-linux.png index 25a345083..d9bf10f22 100644 Binary files a/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable-YZ-1-Google-Chrome-linux.png and b/e2e/playwright/snapshot-tests.spec.ts-snapshots/extrude-on-default-planes-should-be-stable-YZ-1-Google-Chrome-linux.png differ diff --git a/e2e/playwright/test-utils.ts b/e2e/playwright/test-utils.ts index 527648d65..55dcf9eff 100644 --- a/e2e/playwright/test-utils.ts +++ b/e2e/playwright/test-utils.ts @@ -1014,7 +1014,7 @@ export async function createProject({ async function goToHomePageFromModeling(page: Page) { await page.getByTestId('app-logo').click() - await expect(page.getByText('Your Projects')).toBeVisible() + await expect(page.getByRole('heading', { name: 'Projects' })).toBeVisible() } export function executorInputPath(fileName: string): string { diff --git a/e2e/playwright/text-to-cad-tests.spec.ts b/e2e/playwright/text-to-cad-tests.spec.ts index 75f417953..663d40487 100644 --- a/e2e/playwright/text-to-cad-tests.spec.ts +++ b/e2e/playwright/text-to-cad-tests.spec.ts @@ -786,7 +786,7 @@ test.describe('Mocked Text-to-CAD API tests', { tag: ['@skipWin'] }, () => { test( 'Home Page -> Text To CAD -> Existing Project -> Stay in home page -> Reject -> should delete single file', { tag: '@electron' }, - async ({ context, page }, testInfo) => { + async ({ homePage, page }, testInfo) => { const projectName = 'my-project-name' const prompt = '2x2x2 cube' await mockPageTextToCAD(page) @@ -794,7 +794,7 @@ test.describe('Mocked Text-to-CAD API tests', { tag: ['@skipWin'] }, () => { // Create and navigate to the project then come home await createProject({ name: projectName, page, returnHome: true }) - await expect(page.getByText('Your Projects')).toBeVisible() + await homePage.expectIsCurrentPage() await expect(page.getByText('1 file')).toBeVisible() @@ -829,7 +829,7 @@ test.describe('Mocked Text-to-CAD API tests', { tag: ['@skipWin'] }, () => { test( 'Home Page -> Text To CAD -> Existing Project -> Stay in home page -> Accept -> should navigate to file', { tag: '@electron' }, - async ({ context, page }, testInfo) => { + async ({ homePage, page }, testInfo) => { const u = await getUtils(page) const projectName = 'my-project-name' const prompt = '2x2x2 cube' @@ -838,7 +838,7 @@ test.describe('Mocked Text-to-CAD API tests', { tag: ['@skipWin'] }, () => { // Create and navigate to the project then come home await createProject({ name: projectName, page, returnHome: true }) - await expect(page.getByText('Your Projects')).toBeVisible() + await homePage.expectIsCurrentPage() // open commands await page.getByTestId('command-bar-open-button').click() @@ -880,7 +880,7 @@ test.describe('Mocked Text-to-CAD API tests', { tag: ['@skipWin'] }, () => { test( 'Home Page -> Text To CAD -> New Project -> Navigate to the project -> Reject -> should go to home page', { tag: '@electron' }, - async ({ context, page }, testInfo) => { + async ({ homePage, page }, testInfo) => { const projectName = 'my-project-name' const prompt = '2x2x2 cube' await mockPageTextToCAD(page) @@ -919,16 +919,14 @@ test.describe('Mocked Text-to-CAD API tests', { tag: ['@skipWin'] }, () => { await page.getByRole('button', { name: 'Reject' }).click() // Make sure we went back home - await expect( - page.getByText('No Projects found, ready to make your first one?') - ).toBeVisible() + await homePage.expectIsCurrentPage() } ) test( 'Home Page -> Text To CAD -> New Project -> Navigate to the project -> Accept -> should stay in same file', { tag: '@electron' }, - async ({ context, page }, testInfo) => { + async ({ homePage, page }, testInfo) => { const projectName = 'my-project-name' const prompt = '2x2x2 cube' await mockPageTextToCAD(page) @@ -971,7 +969,7 @@ test.describe('Mocked Text-to-CAD API tests', { tag: ['@skipWin'] }, () => { test( 'Home Page -> Text To CAD -> Existing Project -> Navigate to the project -> Reject -> should load main.kcl', { tag: '@electron' }, - async ({ context, page }, testInfo) => { + async ({ homePage, page }, testInfo) => { const u = await getUtils(page) const projectName = 'my-project-name' const prompt = '2x2x2 cube' @@ -980,7 +978,7 @@ test.describe('Mocked Text-to-CAD API tests', { tag: ['@skipWin'] }, () => { // Create and navigate to the project then come home await createProject({ name: projectName, page, returnHome: true }) - await expect(page.getByText('Your Projects')).toBeVisible() + await homePage.expectIsCurrentPage() // open commands await page.getByTestId('command-bar-open-button').click() @@ -1026,7 +1024,7 @@ test.describe('Mocked Text-to-CAD API tests', { tag: ['@skipWin'] }, () => { test( 'Home Page -> Text To CAD -> Existing Project -> Navigate to the project -> Accept -> should load 2x2x2-cube.kcl', { tag: '@electron' }, - async ({ context, page }, testInfo) => { + async ({ homePage, page }, testInfo) => { const u = await getUtils(page) const projectName = 'my-project-name' const prompt = '2x2x2 cube' @@ -1035,7 +1033,7 @@ test.describe('Mocked Text-to-CAD API tests', { tag: ['@skipWin'] }, () => { // Create and navigate to the project then come home await createProject({ name: projectName, page, returnHome: true }) - await expect(page.getByText('Your Projects')).toBeVisible() + await homePage.expectIsCurrentPage() // open commands await page.getByTestId('command-bar-open-button').click() @@ -1083,7 +1081,7 @@ test.describe('Mocked Text-to-CAD API tests', { tag: ['@skipWin'] }, () => { test( 'Home Page -> Text To CAD -> New Project -> Navigate to different project -> Reject -> should stay in project', { tag: '@electron' }, - async ({ context, page, homePage }, testInfo) => { + async ({ homePage, page }, testInfo) => { const u = await getUtils(page) const projectName = 'my-project-name' const unrelatedProjectName = 'unrelated-project' @@ -1097,7 +1095,7 @@ test.describe('Mocked Text-to-CAD API tests', { tag: ['@skipWin'] }, () => { returnHome: true, }) - await expect(page.getByText('Your Projects')).toBeVisible() + await homePage.expectIsCurrentPage() // open commands await page.getByTestId('command-bar-open-button').click() @@ -1160,7 +1158,7 @@ test.describe('Mocked Text-to-CAD API tests', { tag: ['@skipWin'] }, () => { test( 'Home Page -> Text To CAD -> New Project -> Navigate to different project -> Accept -> should go to new project', { tag: '@electron' }, - async ({ context, page, homePage }, testInfo) => { + async ({ page, homePage }, testInfo) => { const u = await getUtils(page) const projectName = 'my-project-name' const unrelatedProjectName = 'unrelated-project' @@ -1174,7 +1172,7 @@ test.describe('Mocked Text-to-CAD API tests', { tag: ['@skipWin'] }, () => { returnHome: true, }) - await expect(page.getByText('Your Projects')).toBeVisible() + await homePage.expectIsCurrentPage() // open commands await page.getByTestId('command-bar-open-button').click() @@ -1233,7 +1231,7 @@ test.describe('Mocked Text-to-CAD API tests', { tag: ['@skipWin'] }, () => { test( 'Home Page -> Text To CAD -> Existing Project -> Navigate to different project -> Reject -> should stay in same project', { tag: '@electron' }, - async ({ context, page, homePage }, testInfo) => { + async ({ page, homePage }, testInfo) => { const u = await getUtils(page) const projectName = 'my-project-name' const unrelatedProjectName = 'unrelated-project' @@ -1246,10 +1244,10 @@ test.describe('Mocked Text-to-CAD API tests', { tag: ['@skipWin'] }, () => { page, returnHome: true, }) - await expect(page.getByText('Your Projects')).toBeVisible() + await homePage.expectIsCurrentPage() await createProject({ name: projectName, page, returnHome: true }) - await expect(page.getByText('Your Projects')).toBeVisible() + await homePage.expectIsCurrentPage() // open commands await page.getByTestId('command-bar-open-button').click() @@ -1308,7 +1306,7 @@ test.describe('Mocked Text-to-CAD API tests', { tag: ['@skipWin'] }, () => { test( 'Home Page -> Text To CAD -> Existing Project -> Navigate to different project -> Accept -> should navigate to new project', { tag: '@electron' }, - async ({ context, page, homePage }, testInfo) => { + async ({ page, homePage }, testInfo) => { const u = await getUtils(page) const projectName = 'my-project-name' const unrelatedProjectName = 'unrelated-project' @@ -1321,10 +1319,10 @@ test.describe('Mocked Text-to-CAD API tests', { tag: ['@skipWin'] }, () => { page, returnHome: true, }) - await expect(page.getByText('Your Projects')).toBeVisible() + await homePage.expectIsCurrentPage() await createProject({ name: projectName, page, returnHome: true }) - await expect(page.getByText('Your Projects')).toBeVisible() + await homePage.expectIsCurrentPage() // open commands await page.getByTestId('command-bar-open-button').click() diff --git a/src/components/ActionButton.tsx b/src/components/ActionButton.tsx index 1c0957a81..705b6c25f 100644 --- a/src/components/ActionButton.tsx +++ b/src/components/ActionButton.tsx @@ -44,7 +44,7 @@ export type ActionButtonProps = | ActionButtonAsElement export const ActionButton = forwardRef((props: ActionButtonProps, ref) => { - const classNames = `action-button leading-[0.7] p-0 m-0 group mono text-xs leading-none flex items-center gap-2 rounded-sm border-solid border border-chalkboard-30 hover:border-chalkboard-40 enabled:dark:border-chalkboard-70 dark:hover:border-chalkboard-60 dark:bg-chalkboard-90/50 text-chalkboard-100 dark:text-chalkboard-10 ${ + const classNames = `action-button leading-[0.7] p-0 m-0 group text-xs leading-none flex items-center gap-2 rounded-sm border-solid border border-chalkboard-30 hover:border-chalkboard-40 enabled:dark:border-chalkboard-70 dark:hover:border-chalkboard-60 dark:bg-chalkboard-90/50 text-chalkboard-100 dark:text-chalkboard-10 ${ props.iconStart ? props.iconEnd ? 'px-0' // No padding if both icons are present diff --git a/src/components/ProjectCard/ProjectCard.tsx b/src/components/ProjectCard/ProjectCard.tsx index 5a7908d01..9cf57765d 100644 --- a/src/components/ProjectCard/ProjectCard.tsx +++ b/src/components/ProjectCard/ProjectCard.tsx @@ -84,7 +84,7 @@ function ProjectCard({ return (
- Loaded from{' '} - - {settings.app.projectDirectory.current} - - . -
- {!readWriteProjectDir.value && ( -{errorMessage(readWriteProjectDir.error)}
- - Change Project Directory - -- No Projects found - {projects.length === 0 - ? ', ready to make your first one?' - : ` with the search term "${query}"`} -
- )} - > - )} -+ Loaded from{' '} + + {settings.app.projectDirectory.current} + + . +
+ {!readWriteProjectDir.value && ( +{errorMessage(readWriteProjectDir.error)}
+ + Change Project Directory + ++ No Projects found + {projects.length === 0 + ? ', ready to make your first one?' + : ` with the search term "${query}"`} +
+ )} + > + )} +