Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Irev-Dev committed Feb 28, 2025
1 parent 93624c8 commit f135f49
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
15 changes: 8 additions & 7 deletions e2e/playwright/regression-tests.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -633,10 +633,10 @@ extrude001 = extrude(sketch001, length = 50)
test(`Toolbar doesn't show modeling tools during sketch plane selection animation`, async ({
page,
homePage,
toolbar
toolbar,
}) => {
const u = await getUtils(page)

await test.step('Load an empty file', async () => {
await page.addInitScript(async () => {
localStorage.setItem('persistCode', '')
Expand All @@ -646,23 +646,24 @@ extrude001 = extrude(sketch001, length = 50)
await u.waitForPageLoad()
})

const toolBarMode = () => page.locator('[data-currentMode]').getAttribute('data-currentMode')

const toolBarMode = () =>
page.locator('[data-currentMode]').getAttribute('data-currentMode')

await test.step('Start sketch and select a plane', async () => {
await expect.poll(toolBarMode).toEqual('modeling')
// Click the start sketch button
await toolbar.startSketchPlaneSelection()

// Click on a default plane at position [700, 200]
await page.mouse.click(700, 200)

// Check that the modeling toolbar doesn't appear during the animation
// The animation typically takes around 500ms, so we'll check for 800
for (let i = 0; i < 8; i++) {
await expect.poll(toolBarMode).not.toEqual('modeling')
await page.waitForTimeout(100)
}

// After animation completes, we should see the sketching toolbar
await expect.poll(toolBarMode).toEqual('sketching')
})
Expand Down
5 changes: 4 additions & 1 deletion src/Toolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,10 @@ export function Toolbar({
}, [currentMode, disableAllButtons, configCallbackProps])

return (
<menu data-currentMode={currentMode} className="max-w-full whitespace-nowrap rounded-b px-2 py-1 bg-chalkboard-10 dark:bg-chalkboard-90 relative border border-chalkboard-30 dark:border-chalkboard-80 border-t-0 shadow-sm">
<menu
data-currentMode={currentMode}
className="max-w-full whitespace-nowrap rounded-b px-2 py-1 bg-chalkboard-10 dark:bg-chalkboard-90 relative border border-chalkboard-30 dark:border-chalkboard-80 border-t-0 shadow-sm"
>
<ul
{...props}
ref={toolbarButtonsRef}
Expand Down

0 comments on commit f135f49

Please sign in to comment.