Opt-in tests that cover Windows-specific capabilities (#6489)
* Opt-in tests that cover Windows-specific capabilities * Remove unnecessary quotes
This commit is contained in:
@ -155,7 +155,7 @@ async function doBasicSketch(
|
||||
|> xLine(length = -segLen(seg01))`)
|
||||
}
|
||||
|
||||
test.describe('Basic sketch', { tag: ['@skipWin'] }, () => {
|
||||
test.describe('Basic sketch', () => {
|
||||
test('code pane open at start', async ({ page, homePage }) => {
|
||||
test.fixme(orRunWhenFullSuiteEnabled())
|
||||
await doBasicSketch(page, homePage, ['code'])
|
||||
|
@ -8,10 +8,7 @@ import type { ToolbarFixture } from '@e2e/playwright/fixtures/toolbarFixture'
|
||||
import { getUtils } from '@e2e/playwright/test-utils'
|
||||
import { expect, test } from '@e2e/playwright/zoo-test'
|
||||
|
||||
test.describe(
|
||||
'Can create sketches on all planes and their back sides',
|
||||
{ tag: ['@skipWin'] },
|
||||
() => {
|
||||
test.describe('Can create sketches on all planes and their back sides', () => {
|
||||
const sketchOnPlaneAndBackSideTest = async (
|
||||
page: Page,
|
||||
homePage: HomePageFixture,
|
||||
@ -133,5 +130,4 @@ test.describe(
|
||||
)
|
||||
})
|
||||
}
|
||||
}
|
||||
)
|
||||
})
|
||||
|
@ -10,7 +10,7 @@ import {
|
||||
} from '@e2e/playwright/test-utils'
|
||||
import { expect, test } from '@e2e/playwright/zoo-test'
|
||||
|
||||
test.describe('Code pane and errors', { tag: ['@skipWin'] }, () => {
|
||||
test.describe('Code pane and errors', () => {
|
||||
test('Typing KCL errors induces a badge on the code pane button', async ({
|
||||
page,
|
||||
homePage,
|
||||
|
@ -9,7 +9,7 @@ import {
|
||||
} from '@e2e/playwright/test-utils'
|
||||
import { expect, test } from '@e2e/playwright/zoo-test'
|
||||
|
||||
test.describe('Command bar tests', { tag: ['@skipWin'] }, () => {
|
||||
test.describe('Command bar tests', () => {
|
||||
test('Extrude from command bar selects extrude line after', async ({
|
||||
page,
|
||||
homePage,
|
||||
@ -179,10 +179,10 @@ test.describe('Command bar tests', { tag: ['@skipWin'] }, () => {
|
||||
await expect(commandLevelArgButton).toHaveText('level: project')
|
||||
})
|
||||
|
||||
test(
|
||||
'Command bar keybinding works from code editor and can change a setting',
|
||||
{ tag: ['@skipWin'] },
|
||||
async ({ page, homePage }) => {
|
||||
test('Command bar keybinding works from code editor and can change a setting', async ({
|
||||
page,
|
||||
homePage,
|
||||
}) => {
|
||||
await page.setBodyDimensions({ width: 1200, height: 500 })
|
||||
await homePage.goToModelingScene()
|
||||
|
||||
@ -217,9 +217,10 @@ test.describe('Command bar tests', { tag: ['@skipWin'] }, () => {
|
||||
await page.keyboard.press('ArrowDown')
|
||||
await page.keyboard.press('ArrowDown')
|
||||
await page.keyboard.press('ArrowDown')
|
||||
await expect(
|
||||
page.getByRole('option', { name: 'system' })
|
||||
).toHaveAttribute('data-headlessui-state', 'active')
|
||||
await expect(page.getByRole('option', { name: 'system' })).toHaveAttribute(
|
||||
'data-headlessui-state',
|
||||
'active'
|
||||
)
|
||||
await page.keyboard.press('Enter')
|
||||
|
||||
// Check the toast appeared
|
||||
@ -228,8 +229,7 @@ test.describe('Command bar tests', { tag: ['@skipWin'] }, () => {
|
||||
).toBeVisible()
|
||||
// Check that the theme changed
|
||||
await expect(page.locator('body')).not.toHaveClass(`body-bg dark`)
|
||||
}
|
||||
)
|
||||
})
|
||||
|
||||
test('Can extrude from the command bar', async ({
|
||||
page,
|
||||
|
@ -10,7 +10,7 @@ import { expect, test } from '@e2e/playwright/zoo-test'
|
||||
|
||||
test(
|
||||
'export works on the first try',
|
||||
{ tag: ['@electron', '@macOS', '@skipLocalEngine'] },
|
||||
{ tag: ['@electron', '@macos', '@windows', '@skipLocalEngine'] },
|
||||
async ({ page, context, scene, tronApp, cmdBar }, testInfo) => {
|
||||
if (!tronApp) {
|
||||
fail()
|
||||
|
@ -10,7 +10,7 @@ import {
|
||||
} from '@e2e/playwright/test-utils'
|
||||
import { expect, test } from '@e2e/playwright/zoo-test'
|
||||
|
||||
test.describe('Editor tests', { tag: ['@skipWin'] }, () => {
|
||||
test.describe('Editor tests', () => {
|
||||
test('can comment out code with ctrl+/', async ({ page, homePage }) => {
|
||||
const u = await getUtils(page)
|
||||
await page.setBodyDimensions({ width: 1000, height: 500 })
|
||||
@ -989,10 +989,11 @@ sketch001 = startSketchOn(XZ)
|
||||
|> close()`)
|
||||
})
|
||||
|
||||
test(
|
||||
'Can undo a sketch modification with ctrl+z',
|
||||
{ tag: ['@skipWin'] },
|
||||
async ({ page, homePage, editor }) => {
|
||||
test('Can undo a sketch modification with ctrl+z', async ({
|
||||
page,
|
||||
homePage,
|
||||
editor,
|
||||
}) => {
|
||||
const u = await getUtils(page)
|
||||
await page.addInitScript(async () => {
|
||||
localStorage.setItem(
|
||||
@ -1143,8 +1144,7 @@ sketch001 = startSketchOn(XZ)
|
||||
|> extrude(length = 5)`,
|
||||
{ shouldNormalise: true }
|
||||
)
|
||||
}
|
||||
)
|
||||
})
|
||||
|
||||
test(
|
||||
`Can import a local OBJ file`,
|
||||
|
@ -41,7 +41,7 @@ class MyAPIReporter implements Reporter {
|
||||
annotations: test.annotations.map((a) => a.type), // e.g. 'fail' or 'fixme'
|
||||
id: test.id, // computed file/test/project ID used for reruns
|
||||
retry: result.retry,
|
||||
tags: test.tags, // e.g. '@snapshot' or '@skipWin'
|
||||
tags: test.tags, // e.g. '@snapshot' or '@skipLocalEngine'
|
||||
// Extra environment variables
|
||||
CI_COMMIT_SHA: process.env.CI_COMMIT_SHA || null,
|
||||
CI_PR_NUMBER: process.env.CI_PR_NUMBER || null,
|
||||
|
@ -6,7 +6,10 @@ import { expect, test } from '@e2e/playwright/zoo-test'
|
||||
* Not all menu actions are tested. Some are default electron menu actions.
|
||||
* Test file menu actions that trigger something in the frontend
|
||||
*/
|
||||
test.describe('Native file menu', { tag: ['@electron', '@macOS'] }, () => {
|
||||
test.describe(
|
||||
'Native file menu',
|
||||
{ tag: ['@electron', '@macos', '@windows'] },
|
||||
() => {
|
||||
test.skip() // TODO: Reimplement native file menu tests
|
||||
test.describe('Home page', () => {
|
||||
test.describe('File role', () => {
|
||||
@ -161,7 +164,11 @@ test.describe('Native file menu', { tag: ['@electron', '@macOS'] }, () => {
|
||||
const defaultUnit = settings.locator('#defaultUnit')
|
||||
await expect(defaultUnit).toBeVisible()
|
||||
})
|
||||
test('Home.File.Preferences.Theme', async ({ tronApp, cmdBar, page }) => {
|
||||
test('Home.File.Preferences.Theme', async ({
|
||||
tronApp,
|
||||
cmdBar,
|
||||
page,
|
||||
}) => {
|
||||
if (!tronApp) fail()
|
||||
// Run electron snippet to find the Menu!
|
||||
await page.waitForTimeout(100) // wait for createModelingPageMenu() to run
|
||||
@ -365,7 +372,11 @@ test.describe('Native file menu', { tag: ['@electron', '@macOS'] }, () => {
|
||||
})
|
||||
})
|
||||
test.describe('Help role', () => {
|
||||
test('Home.Help.Show all commands', async ({ tronApp, cmdBar, page }) => {
|
||||
test('Home.Help.Show all commands', async ({
|
||||
tronApp,
|
||||
cmdBar,
|
||||
page,
|
||||
}) => {
|
||||
if (!tronApp) fail()
|
||||
// Run electron snippet to find the Menu!
|
||||
await page.waitForTimeout(100) // wait for createModelingPageMenu() to run
|
||||
@ -389,7 +400,11 @@ test.describe('Native file menu', { tag: ['@electron', '@macOS'] }, () => {
|
||||
const actual = cmdBar.cmdBarElement.getByTestId('cmd-bar-search')
|
||||
await expect(actual).toBeVisible()
|
||||
})
|
||||
test('Home.Help.KCL code samples', async ({ tronApp, cmdBar, page }) => {
|
||||
test('Home.Help.KCL code samples', async ({
|
||||
tronApp,
|
||||
cmdBar,
|
||||
page,
|
||||
}) => {
|
||||
if (!tronApp) fail()
|
||||
// Run electron snippet to find the Menu!
|
||||
await page.waitForTimeout(100) // wait for createModelingPageMenu() to run
|
||||
@ -435,7 +450,11 @@ test.describe('Native file menu', { tag: ['@electron', '@macOS'] }, () => {
|
||||
)
|
||||
await expect(actual).toBeVisible()
|
||||
})
|
||||
test('Home.Help.Reset onboarding', async ({ tronApp, cmdBar, page }) => {
|
||||
test('Home.Help.Reset onboarding', async ({
|
||||
tronApp,
|
||||
cmdBar,
|
||||
page,
|
||||
}) => {
|
||||
if (!tronApp) fail()
|
||||
// Run electron snippet to find the Menu!
|
||||
await page.waitForTimeout(100) // wait for createModelingPageMenu() to run
|
||||
@ -2354,4 +2373,5 @@ test.describe('Native file menu', { tag: ['@electron', '@macOS'] }, () => {
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
)
|
||||
|
@ -18,7 +18,7 @@ import { expect, test } from '@e2e/playwright/zoo-test'
|
||||
|
||||
test(
|
||||
'projects reload if a new one is created, deleted, or renamed externally',
|
||||
{ tag: ['@electron', '@macOS'] },
|
||||
{ tag: ['@electron', '@macos', '@windows'] },
|
||||
async ({ context, page }, testInfo) => {
|
||||
let externalCreatedProjectName = 'external-created-project'
|
||||
|
||||
|
@ -29,7 +29,7 @@ sketch003 = startSketchOn(XY)
|
||||
extrude003 = extrude(sketch003, length = 20)
|
||||
`
|
||||
|
||||
test.describe('Prompt-to-edit tests', { tag: '@skipWin' }, () => {
|
||||
test.describe('Prompt-to-edit tests', () => {
|
||||
test.describe('Check the happy path, for basic changing color', () => {
|
||||
const cases = [
|
||||
{
|
||||
|
@ -14,7 +14,7 @@ import {
|
||||
} from '@e2e/playwright/test-utils'
|
||||
import { expect, test } from '@e2e/playwright/zoo-test'
|
||||
|
||||
test.describe('Regression tests', { tag: ['@skipWin'] }, () => {
|
||||
test.describe('Regression tests', () => {
|
||||
// bugs we found that don't fit neatly into other categories
|
||||
test('bad model has inline error #3251', async ({
|
||||
context,
|
||||
@ -239,10 +239,11 @@ extrude001 = extrude(sketch001, length = 50)
|
||||
await expect(zooLogo).not.toHaveAttribute('href')
|
||||
})
|
||||
|
||||
test(
|
||||
'Position _ Is Out Of Range... regression test',
|
||||
{ tag: ['@skipWin'] },
|
||||
async ({ context, page, homePage }) => {
|
||||
test('Position _ Is Out Of Range... regression test', async ({
|
||||
context,
|
||||
page,
|
||||
homePage,
|
||||
}) => {
|
||||
const u = await getUtils(page)
|
||||
// const PUR = 400 / 37.5 //pixeltoUnitRatio
|
||||
await page.setBodyDimensions({ width: 1200, height: 500 })
|
||||
@ -315,8 +316,7 @@ extrude001 = extrude(sketch001, length = 50)
|
||||
thing: "blah"`)
|
||||
|
||||
await expect(page.locator('.cm-lint-marker-error')).toBeVisible()
|
||||
}
|
||||
)
|
||||
})
|
||||
|
||||
test(
|
||||
'window resize updates should reconfigure the stream',
|
||||
@ -486,10 +486,10 @@ extrude002 = extrude(profile002, length = 150)
|
||||
}
|
||||
)
|
||||
// We updated this test such that you can have multiple exports going at once.
|
||||
test(
|
||||
'ensure you CAN export while an export is already going',
|
||||
{ tag: ['@skipLinux', '@skipWin'] },
|
||||
async ({ page, homePage }) => {
|
||||
test('ensure you CAN export while an export is already going', async ({
|
||||
page,
|
||||
homePage,
|
||||
}) => {
|
||||
const u = await getUtils(page)
|
||||
await test.step('Set up the code and durations', async () => {
|
||||
await page.addInitScript(
|
||||
@ -560,8 +560,7 @@ extrude002 = extrude(profile002, length = 150)
|
||||
|
||||
await expect(successToastMessage).toHaveCount(2)
|
||||
})
|
||||
}
|
||||
)
|
||||
})
|
||||
|
||||
test(
|
||||
`Network health indicator only appears in modeling view`,
|
||||
|
@ -16,7 +16,7 @@ import {
|
||||
} from '@e2e/playwright/test-utils'
|
||||
import { expect, test } from '@e2e/playwright/zoo-test'
|
||||
|
||||
test.describe('Sketch tests', { tag: ['@skipWin'] }, () => {
|
||||
test.describe('Sketch tests', () => {
|
||||
test('multi-sketch file shows multiple Edit Sketch buttons', async ({
|
||||
page,
|
||||
context,
|
||||
@ -393,10 +393,13 @@ sketch001 = startProfileAt([12.34, -12.34], sketch002)
|
||||
|> close()
|
||||
`)
|
||||
}
|
||||
test(
|
||||
'code pane open at start-handles',
|
||||
{ tag: ['@skipWin'] },
|
||||
async ({ page, homePage, scene, toolbar, cmdBar }) => {
|
||||
test('code pane open at start-handles', async ({
|
||||
page,
|
||||
homePage,
|
||||
scene,
|
||||
toolbar,
|
||||
cmdBar,
|
||||
}) => {
|
||||
// Load the app with the code panes
|
||||
await page.addInitScript(async () => {
|
||||
localStorage.setItem(
|
||||
@ -417,13 +420,15 @@ sketch001 = startProfileAt([12.34, -12.34], sketch002)
|
||||
toolbar,
|
||||
cmdBar
|
||||
)
|
||||
}
|
||||
)
|
||||
})
|
||||
|
||||
test(
|
||||
'code pane closed at start-handles',
|
||||
{ tag: ['@skipWin'] },
|
||||
async ({ page, homePage, scene, toolbar, cmdBar }) => {
|
||||
test('code pane closed at start-handles', async ({
|
||||
page,
|
||||
homePage,
|
||||
scene,
|
||||
toolbar,
|
||||
cmdBar,
|
||||
}) => {
|
||||
// Load the app with the code panes
|
||||
await page.addInitScript(async (persistModelingContext) => {
|
||||
localStorage.setItem(
|
||||
@ -439,8 +444,7 @@ sketch001 = startProfileAt([12.34, -12.34], sketch002)
|
||||
toolbar,
|
||||
cmdBar
|
||||
)
|
||||
}
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
test('Can edit a circle center and radius by dragging its handles', async ({
|
||||
@ -1389,10 +1393,15 @@ offsetPlane001 = offsetPlane(XY, offset = 10)`
|
||||
})
|
||||
|
||||
test.describe('multi-profile sketching', () => {
|
||||
test(
|
||||
`test it removes half-finished expressions when changing tools in sketch mode`,
|
||||
{ tag: ['@skipWin'] },
|
||||
async ({ context, page, scene, toolbar, editor, homePage, cmdBar }) => {
|
||||
test(`test it removes half-finished expressions when changing tools in sketch mode`, async ({
|
||||
context,
|
||||
page,
|
||||
scene,
|
||||
toolbar,
|
||||
editor,
|
||||
homePage,
|
||||
cmdBar,
|
||||
}) => {
|
||||
test.fixme(orRunWhenFullSuiteEnabled())
|
||||
// We seed the scene with a single offset plane
|
||||
await context.addInitScript(() => {
|
||||
@ -1461,9 +1470,7 @@ profile002 = startProfileAt([117.2, 56.08], sketch001)
|
||||
|
||||
await test.step('equip line tool and verify three-point circle code is removed', async () => {
|
||||
await toolbar.lineBtn.click()
|
||||
await editor.expectEditor.not.toContain(
|
||||
'profile003 = circleThreePoint('
|
||||
)
|
||||
await editor.expectEditor.not.toContain('profile003 = circleThreePoint(')
|
||||
})
|
||||
|
||||
await test.step('equip three-point-arc tool and click first two points', async () => {
|
||||
@ -1520,12 +1527,16 @@ profile002 = startProfileAt([117.2, 56.08], sketch001)
|
||||
await editor.expectEditor.not.toContain('arc(')
|
||||
await editor.expectEditor.toContain('profile002')
|
||||
})
|
||||
}
|
||||
)
|
||||
test(
|
||||
`snapToProfile start only works for current profile`,
|
||||
{ tag: ['@skipWin'] },
|
||||
async ({ context, page, scene, toolbar, editor, homePage, cmdBar }) => {
|
||||
})
|
||||
test(`snapToProfile start only works for current profile`, async ({
|
||||
context,
|
||||
page,
|
||||
scene,
|
||||
toolbar,
|
||||
editor,
|
||||
homePage,
|
||||
cmdBar,
|
||||
}) => {
|
||||
// We seed the scene with a single offset plane
|
||||
await context.addInitScript(() => {
|
||||
localStorage.setItem(
|
||||
@ -1604,8 +1615,7 @@ profile003 = startProfileAt([206.63, -56.73], sketch001)
|
||||
`[profileStartX(%), profileStartY(%)]`
|
||||
)
|
||||
})
|
||||
}
|
||||
)
|
||||
})
|
||||
test('can enter sketch mode for sketch with no profiles', async ({
|
||||
scene,
|
||||
toolbar,
|
||||
@ -2071,10 +2081,13 @@ profile003 = startProfileAt([206.63, -56.73], sketch001)
|
||||
})
|
||||
})
|
||||
|
||||
test(
|
||||
'Can edit a sketch with multiple profiles, dragging segments to edit them, and adding one new profile',
|
||||
{ tag: ['@skipWin'] },
|
||||
async ({ homePage, scene, toolbar, editor, page }) => {
|
||||
test('Can edit a sketch with multiple profiles, dragging segments to edit them, and adding one new profile', async ({
|
||||
homePage,
|
||||
scene,
|
||||
toolbar,
|
||||
editor,
|
||||
page,
|
||||
}) => {
|
||||
await page.addInitScript(async () => {
|
||||
localStorage.setItem(
|
||||
'persistCode',
|
||||
@ -2204,12 +2217,15 @@ profile004 = circleThreePoint(sketch001, p1 = [13.44, -6.8], p2 = [13.39, -2.07]
|
||||
|> close()`.replaceAll('\n', '')
|
||||
)
|
||||
})
|
||||
}
|
||||
)
|
||||
test(
|
||||
'Can delete a profile in the editor while is sketch mode, and sketch mode does not break, can ctrl+z to undo after constraint with variable was added',
|
||||
{ tag: ['@skipWin', '@skipLinux'] },
|
||||
async ({ scene, toolbar, editor, cmdBar, page, homePage }) => {
|
||||
})
|
||||
test('Can delete a profile in the editor while is sketch mode, and sketch mode does not break, can ctrl+z to undo after constraint with variable was added', async ({
|
||||
scene,
|
||||
toolbar,
|
||||
editor,
|
||||
cmdBar,
|
||||
page,
|
||||
homePage,
|
||||
}) => {
|
||||
await page.addInitScript(async () => {
|
||||
localStorage.setItem(
|
||||
'persistCode',
|
||||
@ -2303,13 +2319,15 @@ profile003 = circle(sketch001, center = [6.92, -4.2], radius = 3.16)
|
||||
await editor.expectEditor.not.toContain('length001 = 7')
|
||||
await sketchIsDrawnProperly()
|
||||
})
|
||||
}
|
||||
)
|
||||
})
|
||||
|
||||
test(
|
||||
'can enter sketch when there is an extrude',
|
||||
{ tag: ['@skipWin'] },
|
||||
async ({ homePage, scene, toolbar, page, cmdBar }) => {
|
||||
test('can enter sketch when there is an extrude', async ({
|
||||
homePage,
|
||||
scene,
|
||||
toolbar,
|
||||
page,
|
||||
cmdBar,
|
||||
}) => {
|
||||
await page.addInitScript(async () => {
|
||||
localStorage.setItem(
|
||||
'persistCode',
|
||||
@ -2361,8 +2379,7 @@ extrude001 = extrude(profile003, length = 5)
|
||||
scene.expectPixelColor(TEST_COLORS.WHITE, { x: 763, y: 214 }, 15),
|
||||
])
|
||||
})
|
||||
}
|
||||
)
|
||||
})
|
||||
test('exit new sketch without drawing anything should not be a problem', async ({
|
||||
homePage,
|
||||
scene,
|
||||
@ -2416,10 +2433,13 @@ extrude001 = extrude(profile003, length = 5)
|
||||
await scene.expectPixelColor([255, 255, 255], { x: 633, y: 211 }, 15)
|
||||
})
|
||||
})
|
||||
test(
|
||||
'A sketch with only "startProfileAt" and no segments should still be able to be continued',
|
||||
{ tag: ['@skipWin'] },
|
||||
async ({ homePage, scene, toolbar, editor, page }) => {
|
||||
test('A sketch with only "startProfileAt" and no segments should still be able to be continued', async ({
|
||||
homePage,
|
||||
scene,
|
||||
toolbar,
|
||||
editor,
|
||||
page,
|
||||
}) => {
|
||||
await page.addInitScript(async () => {
|
||||
localStorage.setItem(
|
||||
'persistCode',
|
||||
@ -2457,12 +2477,14 @@ profile002 = startProfileAt([85.81, 52.55], sketch002)
|
||||
await page.waitForTimeout(100)
|
||||
await nextPoint()
|
||||
await editor.expectEditor.toContain(`|> line(end = [126.05, 44.12])`)
|
||||
}
|
||||
)
|
||||
test(
|
||||
'old style sketch all in one pipe (with extrude) will break up to allow users to add a new profile to the same sketch',
|
||||
{ tag: ['@skipWin'] },
|
||||
async ({ homePage, scene, toolbar, editor, page }) => {
|
||||
})
|
||||
test('old style sketch all in one pipe (with extrude) will break up to allow users to add a new profile to the same sketch', async ({
|
||||
homePage,
|
||||
scene,
|
||||
toolbar,
|
||||
editor,
|
||||
page,
|
||||
}) => {
|
||||
await page.addInitScript(async () => {
|
||||
localStorage.setItem(
|
||||
'persistCode',
|
||||
@ -2517,12 +2539,15 @@ extrude001 = extrude(thePart, length = 75)
|
||||
await profilePoint2()
|
||||
await editor.expectEditor.toContain(`|> line(end = [18.97, -18.06])`)
|
||||
})
|
||||
}
|
||||
)
|
||||
test(
|
||||
'Can enter sketch on sketch of wall and cap for segment, solid2d, extrude-wall, extrude-cap selections',
|
||||
{ tag: ['@skipWin'] },
|
||||
async ({ homePage, scene, toolbar, editor, page, cmdBar }) => {
|
||||
})
|
||||
test('Can enter sketch on sketch of wall and cap for segment, solid2d, extrude-wall, extrude-cap selections', async ({
|
||||
homePage,
|
||||
scene,
|
||||
toolbar,
|
||||
editor,
|
||||
page,
|
||||
cmdBar,
|
||||
}) => {
|
||||
// TODO this test should include a test for selecting revolve walls and caps
|
||||
|
||||
await page.addInitScript(async () => {
|
||||
@ -2681,12 +2706,14 @@ extrude003 = extrude(profile011, length = 2.5)
|
||||
})
|
||||
}
|
||||
}) */
|
||||
}
|
||||
)
|
||||
test(
|
||||
'Can enter sketch loft edges, base and continue sketch',
|
||||
{ tag: ['@skipWin'] },
|
||||
async ({ homePage, scene, toolbar, editor, page }) => {
|
||||
})
|
||||
test('Can enter sketch loft edges, base and continue sketch', async ({
|
||||
homePage,
|
||||
scene,
|
||||
toolbar,
|
||||
editor,
|
||||
page,
|
||||
}) => {
|
||||
await page.addInitScript(async () => {
|
||||
localStorage.setItem(
|
||||
'persistCode',
|
||||
@ -2736,8 +2763,7 @@ loft([profile001, profile002])
|
||||
await editor.expectEditor.toContain(
|
||||
`angledLine(angle = 0, length = 113.01, tag = $rectangleSegmentA001)`
|
||||
)
|
||||
}
|
||||
)
|
||||
})
|
||||
test('Can enter sketch loft edges offsetPlane and continue sketch', async ({
|
||||
scene,
|
||||
toolbar,
|
||||
@ -3245,10 +3271,15 @@ profile003 = startProfileAt([-201.08, 254.17], sketch002)
|
||||
).toBeVisible()
|
||||
})
|
||||
})
|
||||
test(
|
||||
'adding a syntax error, recovers after fixing',
|
||||
{ tag: ['@skipWin'] },
|
||||
async ({ page, homePage, context, scene, editor, toolbar, cmdBar }) => {
|
||||
test('adding a syntax error, recovers after fixing', async ({
|
||||
page,
|
||||
homePage,
|
||||
context,
|
||||
scene,
|
||||
editor,
|
||||
toolbar,
|
||||
cmdBar,
|
||||
}) => {
|
||||
const file = await fs.readFile(
|
||||
path.resolve(
|
||||
__dirname,
|
||||
@ -3335,6 +3366,5 @@ profile003 = startProfileAt([-201.08, 254.17], sketch002)
|
||||
15
|
||||
)
|
||||
})
|
||||
}
|
||||
)
|
||||
})
|
||||
})
|
||||
|
@ -47,7 +47,7 @@ test.setTimeout(60_000)
|
||||
// up with another PR if we want this back.
|
||||
test(
|
||||
'exports of each format should work',
|
||||
{ tag: ['@snapshot', '@skipWin', '@skipMacos'] },
|
||||
{ tag: ['@snapshot'] },
|
||||
async ({ page, context, scene, cmdBar, tronApp }) => {
|
||||
if (!tronApp) {
|
||||
fail()
|
||||
|
@ -8,9 +8,12 @@ import {
|
||||
} from '@e2e/playwright/test-utils'
|
||||
import { expect, test } from '@e2e/playwright/zoo-test'
|
||||
|
||||
test.describe('Test network and connection issues', {
|
||||
tag: ['@macOS'],
|
||||
}, () => {
|
||||
test.describe(
|
||||
'Test network and connection issues',
|
||||
{
|
||||
tag: ['@macos', '@windows'],
|
||||
},
|
||||
() => {
|
||||
test(
|
||||
'simulate network down and network little widget',
|
||||
{ tag: '@skipLocalEngine' },
|
||||
@ -186,7 +189,9 @@ test.describe('Test network and connection issues', {
|
||||
await toolbar.editSketch()
|
||||
|
||||
// Click the line tool
|
||||
await page.getByRole('button', { name: 'line Line', exact: true }).click()
|
||||
await page
|
||||
.getByRole('button', { name: 'line Line', exact: true })
|
||||
.click()
|
||||
|
||||
await page.waitForTimeout(150)
|
||||
|
||||
@ -256,4 +261,5 @@ profile001 = startProfileAt([12.34, -12.34], sketch001)
|
||||
).not.toBeVisible()
|
||||
}
|
||||
)
|
||||
})
|
||||
}
|
||||
)
|
||||
|
@ -4,7 +4,7 @@ import { uuidv4 } from '@src/lib/utils'
|
||||
import { getUtils, orRunWhenFullSuiteEnabled } from '@e2e/playwright/test-utils'
|
||||
import { expect, test } from '@e2e/playwright/zoo-test'
|
||||
|
||||
test.describe('Testing Camera Movement', { tag: ['@skipWin'] }, () => {
|
||||
test.describe('Testing Camera Movement', () => {
|
||||
test('Can move camera reliably', async ({
|
||||
page,
|
||||
context,
|
||||
|
@ -10,7 +10,7 @@ import {
|
||||
} from '@e2e/playwright/test-utils'
|
||||
import { expect, test } from '@e2e/playwright/zoo-test'
|
||||
|
||||
test.describe('Testing constraints', { tag: ['@skipWin'] }, () => {
|
||||
test.describe('Testing constraints', () => {
|
||||
test('Can constrain line length', async ({ page, homePage }) => {
|
||||
await page.addInitScript(async () => {
|
||||
localStorage.setItem(
|
||||
|
@ -4,7 +4,7 @@ import { TEST_CODE_GIZMO } from '@e2e/playwright/storageStates'
|
||||
import { getUtils } from '@e2e/playwright/test-utils'
|
||||
import { expect, test } from '@e2e/playwright/zoo-test'
|
||||
|
||||
test.describe('Testing Gizmo', { tag: ['@skipWin'] }, () => {
|
||||
test.describe('Testing Gizmo', () => {
|
||||
const cases = [
|
||||
{
|
||||
testDescription: 'top view',
|
||||
|
@ -11,7 +11,7 @@ import {
|
||||
} from '@e2e/playwright/test-utils'
|
||||
import { expect, test } from '@e2e/playwright/zoo-test'
|
||||
|
||||
test.describe('Testing segment overlays', { tag: ['@skipWin'] }, () => {
|
||||
test.describe('Testing segment overlays', () => {
|
||||
test('Hover over a segment should show its overlay, hovering over the input overlays should show its popover, clicking the input overlay should constrain/unconstrain it:\nfor the following segments', () => {
|
||||
// TODO: fix this test on mac after the electron migration
|
||||
test.fixme(orRunWhenFullSuiteEnabled())
|
||||
|
@ -9,7 +9,7 @@ import {
|
||||
} from '@e2e/playwright/test-utils'
|
||||
import { expect, test } from '@e2e/playwright/zoo-test'
|
||||
|
||||
test.describe('Testing selections', { tag: ['@skipWin'] }, () => {
|
||||
test.describe('Testing selections', () => {
|
||||
test.setTimeout(90_000)
|
||||
test('Selections work on fresh and edited sketch', async ({
|
||||
page,
|
||||
|
@ -29,7 +29,7 @@ import { expect, test } from '@e2e/playwright/zoo-test'
|
||||
test.describe(
|
||||
'Testing settings',
|
||||
{
|
||||
tag: ['@macOS'],
|
||||
tag: ['@macos', '@windows'],
|
||||
},
|
||||
() => {
|
||||
test('Stored settings are validated and fall back to defaults', async ({
|
||||
@ -281,7 +281,7 @@ test.describe(
|
||||
|
||||
test(
|
||||
`Project settings override user settings on desktop`,
|
||||
{ tag: ['@electron', '@skipWin'] },
|
||||
{ tag: ['@electron'] },
|
||||
async ({ context, page }, testInfo) => {
|
||||
test.fixme(orRunWhenFullSuiteEnabled())
|
||||
const projectName = 'bracket'
|
||||
|
@ -9,7 +9,7 @@ import {
|
||||
} from '@e2e/playwright/test-utils'
|
||||
import { expect, test } from '@e2e/playwright/zoo-test'
|
||||
|
||||
test.describe('Text-to-CAD tests', { tag: ['@skipWin'] }, () => {
|
||||
test.describe('Text-to-CAD tests', () => {
|
||||
test('basic lego happy case', async ({ page, homePage }) => {
|
||||
const u = await getUtils(page)
|
||||
|
||||
@ -436,10 +436,10 @@ test.describe('Text-to-CAD tests', { tag: ['@skipWin'] }, () => {
|
||||
})
|
||||
|
||||
// This will be fine once greg makes prompt at top of file deterministic
|
||||
test(
|
||||
'can do many at once and get many prompts back, and interact with many',
|
||||
{ tag: ['@skipWin'] },
|
||||
async ({ page, homePage }) => {
|
||||
test('can do many at once and get many prompts back, and interact with many', async ({
|
||||
page,
|
||||
homePage,
|
||||
}) => {
|
||||
test.fixme(orRunWhenFullSuiteEnabled())
|
||||
// Let this test run longer since we've seen it timeout.
|
||||
test.setTimeout(180_000)
|
||||
@ -521,8 +521,7 @@ test.describe('Text-to-CAD tests', { tag: ['@skipWin'] }, () => {
|
||||
// Expect the code to be pasted.
|
||||
const code2x4 = await page.locator('.cm-content').innerText()
|
||||
await expect(code2x4.length).toBeGreaterThan(249)
|
||||
}
|
||||
)
|
||||
})
|
||||
|
||||
test('can do many at once with errors, clicking dismiss error does not dismiss all', async ({
|
||||
page,
|
||||
|
20
package.json
20
package.json
@ -126,7 +126,7 @@
|
||||
"generate:machine-api": "npx openapi-typescript ./openapi/machine-api.json -o src/lib/machine-api.d.ts",
|
||||
"generate:samples-manifest": "cd public/kcl-samples && node generate-manifest.js",
|
||||
"tron:start": "electron-forge start",
|
||||
"chrome:test": "PLATFORM=web NODE_ENV=development playwright test --config=playwright.config.ts --project='Google Chrome' --grep-invert='@snapshot'",
|
||||
"chrome:test": "PLATFORM=web NODE_ENV=development playwright test --config=playwright.config.ts --project='Google Chrome' --grep-invert=@snapshot",
|
||||
"tronb:vite:dev": "vite build -c vite.main.config.ts -m development && vite build -c vite.preload.config.ts -m development && vite build -c vite.renderer.config.ts -m development",
|
||||
"tronb:vite:prod": "vite build -c vite.main.config.ts && vite build -c vite.preload.config.ts && vite build -c vite.renderer.config.ts",
|
||||
"tronb:package:dev": "npm run tronb:vite:dev && electron-builder --config electron-builder.yml",
|
||||
@ -136,15 +136,15 @@
|
||||
"test:snapshots": "PLATFORM=web NODE_ENV=development playwright test --config=playwright.config.ts --grep=@snapshot --trace=on --shard=1/1",
|
||||
"test:unit": "vitest run --mode development --exclude **/kclSamples.test.ts",
|
||||
"test:unit:kcl-samples": "vitest run --mode development ./src/lang/kclSamples.test.ts",
|
||||
"test:playwright:electron": "playwright test --config=playwright.electron.config.ts --grep-invert='@snapshot'",
|
||||
"test:playwright:electron:windows": "playwright test --config=playwright.electron.config.ts --grep-invert=\"@skipWin|@snapshot\" --quiet",
|
||||
"test:playwright:electron:macos": "playwright test --config=playwright.electron.config.ts --grep='@macOS' --quiet",
|
||||
"test:playwright:electron:ubuntu": "playwright test --config=playwright.electron.config.ts --grep-invert='@skipLinux|@snapshot' --quiet",
|
||||
"test:playwright:electron:local": "npm run tronb:vite:dev && NODE_ENV=development playwright test --config=playwright.electron.config.ts --grep-invert='@snapshot'",
|
||||
"test:playwright:electron:windows:local": "npm run tronb:vite:dev && set NODE_ENV='development' && playwright test --config=playwright.electron.config.ts --grep-invert=\"@skipWin|@snapshot\"",
|
||||
"test:playwright:electron:macos:local": "npm run tronb:vite:dev && NODE_ENV=development playwright test --config=playwright.electron.config.ts --grep-invert='@skipMacos|@snapshot'",
|
||||
"test:playwright:electron:ubuntu:local": "npm run tronb:vite:dev && NODE_ENV=development playwright test --config=playwright.electron.config.ts --grep-invert='@skipLinux|@snapshot'",
|
||||
"test:playwright:electron:ubuntu:engine:local": "npm run tronb:vite:dev && NODE_ENV=development playwright test --config=playwright.electron.config.ts --grep-invert='@skipLinux|@snapshot|@skipLocalEngine'",
|
||||
"test:playwright:electron": "playwright test --config=playwright.electron.config.ts --grep-invert=@snapshot",
|
||||
"test:playwright:electron:windows": "playwright test --config=playwright.electron.config.ts --grep=@windows --quiet",
|
||||
"test:playwright:electron:macos": "playwright test --config=playwright.electron.config.ts --grep=@macos --quiet",
|
||||
"test:playwright:electron:ubuntu": "playwright test --config=playwright.electron.config.ts --grep-invert=@snapshot --quiet",
|
||||
"test:playwright:electron:local": "npm run tronb:vite:dev && NODE_ENV=development playwright test --config=playwright.electron.config.ts --grep-invert=@snapshot",
|
||||
"test:playwright:electron:windows:local": "npm run tronb:vite:dev && set NODE_ENV='development' && playwright test --config=playwright.electron.config.ts --grep-invert=@snapshot",
|
||||
"test:playwright:electron:macos:local": "npm run tronb:vite:dev && NODE_ENV=development playwright test --config=playwright.electron.config.ts --grep-invert=@snapshot",
|
||||
"test:playwright:electron:ubuntu:local": "npm run tronb:vite:dev && NODE_ENV=development playwright test --config=playwright.electron.config.ts --grep-invert=@snapshot",
|
||||
"test:playwright:electron:ubuntu:engine:local": "npm run tronb:vite:dev && NODE_ENV=development playwright test --config=playwright.electron.config.ts --grep-invert=@snapshot|@skipLocalEngine",
|
||||
"test:unit:local": "npm run simpleserver:bg && npm run test:unit; kill-port 3000",
|
||||
"test:unit:kcl-samples:local": "npm run simpleserver:bg && npm run test:unit:kcl-samples; kill-port 3000"
|
||||
},
|
||||
|
Reference in New Issue
Block a user