Add skipWin to a large set of playwright tests (#5254)
* WIP: disable more tests * Fix lint and add 2 windows skips * A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores) * Two more skips on win * A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores) * More skips * A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores) * More skips * A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores) * More skips * A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores) * One more skip * A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores) * More skips * A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores) * Replace many win32 skips with tag @skipWin * More clean upp --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@ -144,7 +144,7 @@ async function doBasicSketch(
|
||||
|> xLine(-segLen(seg01), %)`)
|
||||
}
|
||||
|
||||
test.describe('Basic sketch', () => {
|
||||
test.describe('Basic sketch', { tag: ['@skipWin'] }, () => {
|
||||
test.fixme('code pane open at start', async ({ page, homePage }) => {
|
||||
await doBasicSketch(page, homePage, ['code'])
|
||||
})
|
||||
|
@ -4,7 +4,10 @@ import { getUtils } from './test-utils'
|
||||
import { EngineCommand } from 'lang/std/artifactGraph'
|
||||
import { uuidv4 } from 'lib/utils'
|
||||
|
||||
test.describe('Can create sketches on all planes and their back sides', () => {
|
||||
test.describe(
|
||||
'Can create sketches on all planes and their back sides',
|
||||
{ tag: ['@skipWin'] },
|
||||
() => {
|
||||
const sketchOnPlaneAndBackSideTest = async (
|
||||
page: Page,
|
||||
homePage: HomePageFixture,
|
||||
@ -88,11 +91,17 @@ test.describe('Can create sketches on all planes and their back sides', () => {
|
||||
})
|
||||
|
||||
test('YZ', async ({ page, homePage }) => {
|
||||
await sketchOnPlaneAndBackSideTest(page, homePage, 'YZ', { x: 700, y: 250 }) // green plane
|
||||
await sketchOnPlaneAndBackSideTest(page, homePage, 'YZ', {
|
||||
x: 700,
|
||||
y: 250,
|
||||
}) // green plane
|
||||
})
|
||||
|
||||
test('XZ', async ({ page, homePage }) => {
|
||||
await sketchOnPlaneAndBackSideTest(page, homePage, '-XZ', { x: 700, y: 80 }) // blue plane
|
||||
await sketchOnPlaneAndBackSideTest(page, homePage, '-XZ', {
|
||||
x: 700,
|
||||
y: 80,
|
||||
}) // blue plane
|
||||
})
|
||||
|
||||
test('-XY', async ({ page, homePage }) => {
|
||||
@ -110,6 +119,10 @@ test.describe('Can create sketches on all planes and their back sides', () => {
|
||||
})
|
||||
|
||||
test('-XZ', async ({ page, homePage }) => {
|
||||
await sketchOnPlaneAndBackSideTest(page, homePage, 'XZ', { x: 700, y: 427 }) // back of blue plane
|
||||
})
|
||||
await sketchOnPlaneAndBackSideTest(page, homePage, 'XZ', {
|
||||
x: 700,
|
||||
y: 427,
|
||||
}) // back of blue plane
|
||||
})
|
||||
}
|
||||
)
|
||||
|
@ -6,7 +6,7 @@ import { bracket } from 'lib/exampleKcl'
|
||||
import { TEST_CODE_LONG_WITH_ERROR_OUT_OF_VIEW } from './storageStates'
|
||||
import fsp from 'fs/promises'
|
||||
|
||||
test.describe('Code pane and errors', () => {
|
||||
test.describe('Code pane and errors', { tag: ['@skipWin'] }, () => {
|
||||
test('Typing KCL errors induces a badge on the code pane button', async ({
|
||||
page,
|
||||
homePage,
|
||||
|
@ -4,7 +4,7 @@ import { executorInputPath, getUtils } from './test-utils'
|
||||
import { KCL_DEFAULT_LENGTH } from 'lib/constants'
|
||||
import path from 'path'
|
||||
|
||||
test.describe('Command bar tests', () => {
|
||||
test.describe('Command bar tests', { tag: ['@skipWin'] }, () => {
|
||||
test('Extrude from command bar selects extrude line after', async ({
|
||||
page,
|
||||
homePage,
|
||||
|
@ -10,7 +10,7 @@ import {
|
||||
|
||||
import { join } from 'path'
|
||||
|
||||
test.describe('Editor tests', () => {
|
||||
test.describe('Editor tests', { tag: ['@skipWin'] }, () => {
|
||||
test('can comment out code with ctrl+/', async ({ page, homePage }) => {
|
||||
const u = await getUtils(page)
|
||||
await page.setBodyDimensions({ width: 1000, height: 500 })
|
||||
|
@ -8,6 +8,7 @@ import { getUtils } from './test-utils'
|
||||
|
||||
// test file is for testing point an click code gen functionality that's not sketch mode related
|
||||
|
||||
test.describe('Point-and-click tests', { tag: ['@skipWin'] }, () => {
|
||||
test('verify extruding circle works', async ({
|
||||
context,
|
||||
homePage,
|
||||
@ -16,8 +17,6 @@ test('verify extruding circle works', async ({
|
||||
toolbar,
|
||||
scene,
|
||||
}) => {
|
||||
// TODO: fix this test on windows after the electron migration
|
||||
test.skip(process.platform === 'win32', 'Skip on windows')
|
||||
const file = await fs.readFile(
|
||||
path.resolve(
|
||||
__dirname,
|
||||
@ -97,8 +96,6 @@ test('verify extruding circle works', async ({
|
||||
})
|
||||
|
||||
test.describe('verify sketch on chamfer works', () => {
|
||||
// TODO: fix this test on windows after the electron migration
|
||||
test.skip(process.platform === 'win32', 'Skip on windows')
|
||||
const _sketchOnAChamfer =
|
||||
(
|
||||
page: Page,
|
||||
@ -217,7 +214,8 @@ test.describe('verify sketch on chamfer works', () => {
|
||||
getOppositeEdge(seg01)
|
||||
]}, %)`,
|
||||
|
||||
afterChamferSelectSnippet: 'sketch002 = startSketchOn(extrude001, seg03)',
|
||||
afterChamferSelectSnippet:
|
||||
'sketch002 = startSketchOn(extrude001, seg03)',
|
||||
afterRectangle1stClickSnippet: 'startProfileAt([205.96, 254.59], %)',
|
||||
afterRectangle2ndClickSnippet: `angledLine([0, 11.39], %, $rectangleSegmentA002)
|
||||
|> angledLine([
|
||||
@ -248,7 +246,8 @@ test.describe('verify sketch on chamfer works', () => {
|
||||
]
|
||||
}, %)`,
|
||||
|
||||
afterChamferSelectSnippet: 'sketch003 = startSketchOn(extrude001, seg04)',
|
||||
afterChamferSelectSnippet:
|
||||
'sketch003 = startSketchOn(extrude001, seg04)',
|
||||
afterRectangle1stClickSnippet: 'startProfileAt([-209.64, 255.28], %)',
|
||||
afterRectangle2ndClickSnippet: `angledLine([0, 11.56], %, $rectangleSegmentA003)
|
||||
|> angledLine([
|
||||
@ -273,7 +272,8 @@ test.describe('verify sketch on chamfer works', () => {
|
||||
getNextAdjacentEdge(seg02)
|
||||
]
|
||||
}, %)`,
|
||||
afterChamferSelectSnippet: 'sketch003 = startSketchOn(extrude001, seg04)',
|
||||
afterChamferSelectSnippet:
|
||||
'sketch003 = startSketchOn(extrude001, seg04)',
|
||||
afterRectangle1stClickSnippet: 'startProfileAt([75.8, 317.2], %)',
|
||||
afterRectangle2ndClickSnippet: `angledLine([0, 11.56], %, $rectangleSegmentA003)
|
||||
|> angledLine([
|
||||
@ -296,7 +296,8 @@ test.describe('verify sketch on chamfer works', () => {
|
||||
length = 30,
|
||||
tags = [getNextAdjacentEdge(yo)]
|
||||
}, %)`,
|
||||
afterChamferSelectSnippet: 'sketch005 = startSketchOn(extrude001, seg06)',
|
||||
afterChamferSelectSnippet:
|
||||
'sketch005 = startSketchOn(extrude001, seg06)',
|
||||
afterRectangle1stClickSnippet: 'startProfileAt([-23.43, 19.69], %)',
|
||||
afterRectangle2ndClickSnippet: `angledLine([0, 9.1], %, $rectangleSegmentA005)
|
||||
|
||||
@ -436,7 +437,8 @@ test.describe('verify sketch on chamfer works', () => {
|
||||
getOppositeEdge(seg01)
|
||||
]}, extrude001)`,
|
||||
beforeChamferSnippetEnd: '}, extrude001)',
|
||||
afterChamferSelectSnippet: 'sketch002 = startSketchOn(extrude001, seg03)',
|
||||
afterChamferSelectSnippet:
|
||||
'sketch002 = startSketchOn(extrude001, seg03)',
|
||||
afterRectangle1stClickSnippet: 'startProfileAt([205.96, 254.59], %)',
|
||||
afterRectangle2ndClickSnippet: `angledLine([0, 11.39], %, $rectangleSegmentA002)
|
||||
|> angledLine([
|
||||
@ -690,7 +692,11 @@ openSketch = startSketchOn('XY')
|
||||
|
||||
await test.step(`Double-click on the open sketch`, async () => {
|
||||
await moveToOpenPath()
|
||||
await scene.expectPixelColor([250, 250, 250], pointOnPathAfterSketching, 15)
|
||||
await scene.expectPixelColor(
|
||||
[250, 250, 250],
|
||||
pointOnPathAfterSketching,
|
||||
15
|
||||
)
|
||||
// There is a full execution after exiting sketch that clears the scene.
|
||||
await page.waitForTimeout(500)
|
||||
await dblClickOpenPath()
|
||||
@ -885,7 +891,10 @@ loft001 = loft([sketch001, sketch002])
|
||||
// One dumb hardcoded screen pixel value
|
||||
const testPoint = { x: 575, y: 200 }
|
||||
const [clickOnSketch1] = scene.makeMouseHelpers(testPoint.x, testPoint.y)
|
||||
const [clickOnSketch2] = scene.makeMouseHelpers(testPoint.x, testPoint.y + 80)
|
||||
const [clickOnSketch2] = scene.makeMouseHelpers(
|
||||
testPoint.x,
|
||||
testPoint.y + 80
|
||||
)
|
||||
|
||||
await test.step(`Delete loft`, async () => {
|
||||
// Check for loft
|
||||
@ -951,7 +960,10 @@ sketch002 = startSketchOn('XZ')
|
||||
// One dumb hardcoded screen pixel value
|
||||
const testPoint = { x: 700, y: 250 }
|
||||
const [clickOnSketch1] = scene.makeMouseHelpers(testPoint.x, testPoint.y)
|
||||
const [clickOnSketch2] = scene.makeMouseHelpers(testPoint.x - 50, testPoint.y)
|
||||
const [clickOnSketch2] = scene.makeMouseHelpers(
|
||||
testPoint.x - 50,
|
||||
testPoint.y
|
||||
)
|
||||
const sweepDeclaration = 'sweep001 = sweep({ path = sketch002 }, sketch001)'
|
||||
|
||||
await test.step(`Look for sketch001`, async () => {
|
||||
@ -1042,7 +1054,10 @@ sketch002 = startSketchOn('XZ')
|
||||
// One dumb hardcoded screen pixel value
|
||||
const testPoint = { x: 700, y: 250 }
|
||||
const [clickOnSketch1] = scene.makeMouseHelpers(testPoint.x, testPoint.y)
|
||||
const [clickOnSketch2] = scene.makeMouseHelpers(testPoint.x - 50, testPoint.y)
|
||||
const [clickOnSketch2] = scene.makeMouseHelpers(
|
||||
testPoint.x - 50,
|
||||
testPoint.y
|
||||
)
|
||||
|
||||
await test.step(`Look for sketch001`, async () => {
|
||||
await toolbar.closePane('code')
|
||||
@ -1305,7 +1320,10 @@ extrude001 = extrude(sketch001, length = -12)
|
||||
})
|
||||
await test.step('Delete fillet via feature tree selection', async () => {
|
||||
await editor.expectEditor.toContain(secondFilletDeclaration)
|
||||
const operationButton = await toolbar.getFeatureTreeOperation('Fillet', 1)
|
||||
const operationButton = await toolbar.getFeatureTreeOperation(
|
||||
'Fillet',
|
||||
1
|
||||
)
|
||||
await operationButton.click({ button: 'left' })
|
||||
await page.keyboard.press('Backspace')
|
||||
await page.waitForTimeout(500)
|
||||
@ -1586,7 +1604,11 @@ extrude001 = extrude(sketch001, length = -12)
|
||||
})
|
||||
|
||||
await test.step(`Confirm scene has changed`, async () => {
|
||||
await scene.expectPixelColor(chamferColor, firstEdgeLocation, lowTolerance)
|
||||
await scene.expectPixelColor(
|
||||
chamferColor,
|
||||
firstEdgeLocation,
|
||||
lowTolerance
|
||||
)
|
||||
})
|
||||
|
||||
// Test 2: Command bar flow without preselected edges
|
||||
@ -1679,7 +1701,10 @@ extrude001 = extrude(sketch001, length = -12)
|
||||
await page.waitForTimeout(500)
|
||||
})
|
||||
await test.step('Delete chamfer via feature tree selection', async () => {
|
||||
const operationButton = await toolbar.getFeatureTreeOperation('Chamfer', 1)
|
||||
const operationButton = await toolbar.getFeatureTreeOperation(
|
||||
'Chamfer',
|
||||
1
|
||||
)
|
||||
await operationButton.click({ button: 'left' })
|
||||
await page.keyboard.press('Backspace')
|
||||
await page.waitForTimeout(500)
|
||||
@ -1762,7 +1787,9 @@ chamfer04 = chamfer({ length = 5, tags = [getOppositeEdge(seg02)]}, extrude001
|
||||
await editor.expectEditor.toContain(pipedChamferDeclaration)
|
||||
await editor.expectEditor.toContain(secondPipedChamferDeclaration)
|
||||
await editor.expectEditor.toContain(standaloneChamferDeclaration)
|
||||
await editor.expectEditor.toContain(secondStandaloneChamferDeclaration)
|
||||
await editor.expectEditor.toContain(
|
||||
secondStandaloneChamferDeclaration
|
||||
)
|
||||
})
|
||||
await test.step('Verify test chamfers are present in the scene', async () => {
|
||||
await scene.expectPixelColor(
|
||||
@ -1789,7 +1816,9 @@ chamfer04 = chamfer({ length = 5, tags = [getOppositeEdge(seg02)]}, extrude001
|
||||
await editor.expectEditor.not.toContain(pipedChamferDeclaration)
|
||||
await editor.expectEditor.toContain(secondPipedChamferDeclaration)
|
||||
await editor.expectEditor.toContain(standaloneChamferDeclaration)
|
||||
await editor.expectEditor.toContain(secondStandaloneChamferDeclaration)
|
||||
await editor.expectEditor.toContain(
|
||||
secondStandaloneChamferDeclaration
|
||||
)
|
||||
})
|
||||
await test.step('Verify piped chamfer is deleted but non-piped is not (in the scene)', async () => {
|
||||
await scene.expectPixelColor(
|
||||
@ -1818,7 +1847,9 @@ chamfer04 = chamfer({ length = 5, tags = [getOppositeEdge(seg02)]}, extrude001
|
||||
await test.step('Verify non-piped chamfer is deleted but other two chamfers are not (in the editor)', async () => {
|
||||
await editor.expectEditor.toContain(secondPipedChamferDeclaration)
|
||||
await editor.expectEditor.not.toContain(standaloneChamferDeclaration)
|
||||
await editor.expectEditor.toContain(secondStandaloneChamferDeclaration)
|
||||
await editor.expectEditor.toContain(
|
||||
secondStandaloneChamferDeclaration
|
||||
)
|
||||
})
|
||||
await test.step('Verify non-piped chamfer is deleted but piped is not (in the scene)', async () => {
|
||||
await scene.expectPixelColor(
|
||||
@ -1845,8 +1876,6 @@ shellPointAndClickCapCases.forEach(({ shouldPreselect }) => {
|
||||
toolbar,
|
||||
cmdBar,
|
||||
}) => {
|
||||
// TODO: fix this test on windows after the electron migration
|
||||
test.skip(process.platform === 'win32', 'Skip on windows')
|
||||
const initialCode = `sketch001 = startSketchOn('XZ')
|
||||
|> circle({ center = [0, 0], radius = 30 }, %)
|
||||
extrude001 = extrude(sketch001, length = 30)
|
||||
@ -2329,3 +2358,4 @@ radius = 8.69
|
||||
expect(editor.expectEditor.toContain(newCodeToFind)).toBeTruthy()
|
||||
})
|
||||
})
|
||||
})
|
||||
|
@ -134,7 +134,7 @@ test.fixme('Check the happy path, for basic changing color', () => {
|
||||
}
|
||||
})
|
||||
|
||||
test.describe('bad path', () => {
|
||||
test.describe('bad path', { tag: ['@skipWin'] }, () => {
|
||||
test(`bad edit prompt`, async ({
|
||||
context,
|
||||
homePage,
|
||||
|
@ -5,7 +5,7 @@ import { getUtils, executorInputPath } from './test-utils'
|
||||
import { TEST_CODE_TRIGGER_ENGINE_EXPORT_ERROR } from './storageStates'
|
||||
import { bracket } from 'lib/exampleKcl'
|
||||
|
||||
test.describe('Regression tests', () => {
|
||||
test.describe('Regression tests', { tag: ['@skipWin'] }, () => {
|
||||
// bugs we found that don't fit neatly into other categories
|
||||
test('bad model has inline error #3251', async ({
|
||||
context,
|
||||
@ -239,12 +239,6 @@ extrude001 = extrude(sketch001, length = 50)
|
||||
'Position _ Is Out Of Range... regression test',
|
||||
{ tag: ['@skipWin'] },
|
||||
async ({ context, page, homePage }) => {
|
||||
// SKip on windows, its being weird.
|
||||
test.skip(
|
||||
process.platform === 'win32',
|
||||
'This test is being weird on windows'
|
||||
)
|
||||
|
||||
const u = await getUtils(page)
|
||||
// const PUR = 400 / 37.5 //pixeltoUnitRatio
|
||||
await page.setBodyDimensions({ width: 1200, height: 500 })
|
||||
@ -425,13 +419,6 @@ extrude001 = extrude(sketch001, length = 50)
|
||||
'ensure you can not export while an export is already going',
|
||||
{ tag: ['@skipLinux', '@skipWin'] },
|
||||
async ({ page, homePage }) => {
|
||||
// This is being weird on ubuntu and windows.
|
||||
test.skip(
|
||||
// eslint-disable-next-line jest/valid-title
|
||||
process.platform === 'linux' || process.platform === 'win32',
|
||||
'This test is being weird on ubuntu'
|
||||
)
|
||||
|
||||
const u = await getUtils(page)
|
||||
await test.step('Set up the code and durations', async () => {
|
||||
await page.addInitScript(
|
||||
@ -560,8 +547,6 @@ extrude001 = extrude(sketch001, length = 50)
|
||||
page,
|
||||
homePage,
|
||||
}) => {
|
||||
// TODO: fix this test on windows after the electron migration
|
||||
test.skip(process.platform === 'win32', 'Skip on windows')
|
||||
const u = await getUtils(page)
|
||||
|
||||
// Constants and locators
|
||||
|
@ -10,7 +10,7 @@ import {
|
||||
} from './test-utils'
|
||||
import { uuidv4, roundOff } from 'lib/utils'
|
||||
|
||||
test.describe('Sketch tests', () => {
|
||||
test.describe('Sketch tests', { tag: ['@skipWin'] }, () => {
|
||||
test('multi-sketch file shows multiple Edit Sketch buttons', async ({
|
||||
page,
|
||||
context,
|
||||
@ -644,8 +644,6 @@ test.describe('Sketch tests', () => {
|
||||
|> revolve({ axis = "X" }, %)`)
|
||||
})
|
||||
test('Can add multiple sketches', async ({ page, homePage }) => {
|
||||
// TODO: fix this test on windows after the electron migration
|
||||
test.skip(process.platform === 'win32', 'Skip on windows')
|
||||
const u = await getUtils(page)
|
||||
|
||||
const viewportSize = { width: 1200, height: 500 }
|
||||
@ -843,8 +841,6 @@ test.describe('Sketch tests', () => {
|
||||
page,
|
||||
homePage,
|
||||
}) => {
|
||||
// TODO: fix this test on windows after the electron migration
|
||||
test.skip(process.platform === 'win32', 'Skip on windows')
|
||||
// this was a regression https://github.com/KittyCAD/modeling-app/issues/2832
|
||||
await page.addInitScript(async () => {
|
||||
localStorage.setItem(
|
||||
|
@ -55,13 +55,6 @@ test.skip(
|
||||
'exports of each format should work',
|
||||
{ tag: ['@snapshot', '@skipWin', '@skipMacos'] },
|
||||
async ({ page, context }) => {
|
||||
// skip on macos and windows.
|
||||
test.skip(
|
||||
// eslint-disable-next-line jest/valid-title
|
||||
process.platform === 'darwin' || process.platform === 'win32',
|
||||
'Skip on macos and windows'
|
||||
)
|
||||
|
||||
// FYI this test doesn't work with only engine running locally
|
||||
// And you will need to have the KittyCAD CLI installed
|
||||
const u = await getUtils(page)
|
||||
|
@ -3,13 +3,8 @@ import { EngineCommand } from 'lang/std/artifactGraph'
|
||||
import { uuidv4 } from 'lib/utils'
|
||||
import { getUtils } from './test-utils'
|
||||
|
||||
test.describe('Testing Camera Movement', () => {
|
||||
test.describe('Testing Camera Movement', { tag: ['@skipWin'] }, () => {
|
||||
test('Can move camera reliably', async ({ page, context, homePage }) => {
|
||||
// TODO: fix this test on windows too after the electron migration
|
||||
const winOrMac =
|
||||
process.platform === 'win32' || process.platform === 'darwin'
|
||||
// eslint-disable-next-line
|
||||
test.skip(winOrMac, 'Skip on windows')
|
||||
const u = await getUtils(page)
|
||||
await page.setBodyDimensions({ width: 1200, height: 500 })
|
||||
|
||||
@ -347,8 +342,6 @@ test.describe('Testing Camera Movement', () => {
|
||||
homePage,
|
||||
page,
|
||||
}) => {
|
||||
// TODO: fix this test on windows after the electron migration
|
||||
test.skip(process.platform === 'win32', 'Skip on windows')
|
||||
/**
|
||||
* Currently we only allow zooming by scroll when no other camera movement is happening,
|
||||
* set within cameraMouseDragGuards in cameraControls.ts,
|
||||
|
@ -9,7 +9,7 @@ import {
|
||||
import { XOR } from 'lib/utils'
|
||||
import path from 'node:path'
|
||||
|
||||
test.describe('Testing constraints', () => {
|
||||
test.describe('Testing constraints', { tag: ['@skipWin'] }, () => {
|
||||
test('Can constrain line length', async ({ page, homePage }) => {
|
||||
await page.addInitScript(async () => {
|
||||
localStorage.setItem(
|
||||
@ -129,8 +129,6 @@ test.describe('Testing constraints', () => {
|
||||
await expect(page.getByTestId('segment-overlay')).toHaveCount(4)
|
||||
})
|
||||
test.describe('Test perpendicular distance constraint', () => {
|
||||
// TODO: fix this test on windows after the electron migration
|
||||
test.skip(process.platform === 'win32', 'Skip on windows')
|
||||
const cases = [
|
||||
{
|
||||
testName: 'Add variable',
|
||||
@ -251,8 +249,6 @@ test.describe('Testing constraints', () => {
|
||||
}
|
||||
})
|
||||
test.describe('Test distance between constraint', () => {
|
||||
// TODO: fix this test on windows after the electron migration
|
||||
test.skip(process.platform === 'win32', 'Skip on windows')
|
||||
const cases = [
|
||||
{
|
||||
testName: 'Add variable',
|
||||
@ -472,8 +468,6 @@ test.describe('Testing constraints', () => {
|
||||
}
|
||||
})
|
||||
test.describe('Test Angle constraint double segment selection', () => {
|
||||
// TODO: fix this test on windows after the electron migration
|
||||
test.skip(process.platform === 'win32', 'Skip on windows')
|
||||
const cases = [
|
||||
{
|
||||
testName: 'Add variable',
|
||||
@ -664,8 +658,6 @@ test.describe('Testing constraints', () => {
|
||||
}
|
||||
})
|
||||
test.describe('Test Length constraint single selection', () => {
|
||||
// TODO: fix this test on windows after the electron migration
|
||||
test.skip(process.platform === 'win32', 'Skip on windows')
|
||||
const cases = [
|
||||
{
|
||||
testName: 'Length - Add variable',
|
||||
@ -851,8 +843,6 @@ part002 = startSketchOn('XZ')
|
||||
}
|
||||
})
|
||||
test.describe('Two segment - no modal constraints', () => {
|
||||
// TODO: fix this test on windows after the electron migration
|
||||
test.skip(process.platform === 'win32', 'Skip on windows')
|
||||
const cases = [
|
||||
{
|
||||
codeAfter: `|> angledLine([83, segLen(seg01)], %)`,
|
||||
|
@ -3,9 +3,7 @@ import { getUtils } from './test-utils'
|
||||
import { uuidv4 } from 'lib/utils'
|
||||
import { TEST_CODE_GIZMO } from './storageStates'
|
||||
|
||||
test.describe('Testing Gizmo', () => {
|
||||
// TODO: fix this test on windows after the electron migration
|
||||
test.skip(process.platform === 'win32', 'Skip on windows')
|
||||
test.describe('Testing Gizmo', { tag: ['@skipWin'] }, () => {
|
||||
const cases = [
|
||||
{
|
||||
testDescription: 'top view',
|
||||
|
@ -5,10 +5,10 @@ import { LineInputsType } from 'lang/std/sketchcombos'
|
||||
import { uuidv4 } from 'lib/utils'
|
||||
import { EditorFixture } from './fixtures/editorFixture'
|
||||
|
||||
test.describe('Testing segment overlays', () => {
|
||||
// TODO: fix this test on windows after the electron migration
|
||||
test.skip(process.platform === 'win32', 'Skip on windows')
|
||||
test.describe('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', () => {
|
||||
test.describe('Testing segment overlays', { tag: ['@skipWin'] }, () => {
|
||||
test.fixme(
|
||||
'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.skip(process.platform === 'darwin', 'Skip on mac')
|
||||
/**
|
||||
@ -557,7 +557,8 @@ test.describe('Testing segment overlays', () => {
|
||||
'angledLineOfYLength({ angle = -91, length = 19 + 0 }, %)',
|
||||
expectAfterUnconstrained:
|
||||
'angledLineOfYLength({ angle = angle002, length = 19 + 0 }, %)',
|
||||
expectFinal: 'angledLineOfYLength({ angle = -91, length = 19 + 0 }, %)',
|
||||
expectFinal:
|
||||
'angledLineOfYLength({ angle = -91, length = 19 + 0 }, %)',
|
||||
ang: ang + 180,
|
||||
steps: 6,
|
||||
locator: '[data-overlay-toolbar-index="8"]',
|
||||
@ -656,7 +657,9 @@ test.describe('Testing segment overlays', () => {
|
||||
locator: '[data-overlay-toolbar-index="9"]',
|
||||
})
|
||||
|
||||
const angledLineToY = await u.getBoundingBox(`[data-overlay-index="10"]`)
|
||||
const angledLineToY = await u.getBoundingBox(
|
||||
`[data-overlay-index="10"]`
|
||||
)
|
||||
ang = await u.getAngle(`[data-overlay-index="10"]`)
|
||||
console.log('angledLineToY')
|
||||
await clickUnconstrained({
|
||||
@ -677,7 +680,8 @@ test.describe('Testing segment overlays', () => {
|
||||
constraintType: 'yAbsolute',
|
||||
expectBeforeUnconstrained:
|
||||
'angledLineToY({ angle = 89, to = 9.14 + 0 }, %)',
|
||||
expectAfterUnconstrained: 'angledLineToY({ angle = 89, to = 9.14 }, %)',
|
||||
expectAfterUnconstrained:
|
||||
'angledLineToY({ angle = 89, to = 9.14 }, %)',
|
||||
expectFinal: 'angledLineToY({ angle = 89, to = yAbs001 }, %)',
|
||||
ang: ang + 180,
|
||||
locator: '[data-overlay-toolbar-index="10"]',
|
||||
@ -857,7 +861,8 @@ test.describe('Testing segment overlays', () => {
|
||||
constraintType: 'xAbsolute',
|
||||
expectBeforeUnconstrained:
|
||||
'circle({ center = [1 + 0, 0], radius = 8 }, %)',
|
||||
expectAfterUnconstrained: 'circle({ center = [1, 0], radius = 8 }, %)',
|
||||
expectAfterUnconstrained:
|
||||
'circle({ center = [1, 0], radius = 8 }, %)',
|
||||
expectFinal: 'circle({ center = [xAbs001, 0], radius = 8 }, %)',
|
||||
ang: ang + 105,
|
||||
steps: 6,
|
||||
@ -890,7 +895,8 @@ test.describe('Testing segment overlays', () => {
|
||||
locator: '[data-overlay-toolbar-index="0"]',
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
)
|
||||
test.describe('Testing deleting a segment', () => {
|
||||
const _deleteSegmentSequence =
|
||||
(page: Page, editor: EditorFixture) =>
|
||||
|
@ -5,15 +5,12 @@ import { Coords2d } from 'lang/std/sketch'
|
||||
import { KCL_DEFAULT_LENGTH } from 'lib/constants'
|
||||
import { uuidv4 } from 'lib/utils'
|
||||
|
||||
test.describe('Testing selections', () => {
|
||||
test.describe('Testing selections', { tag: ['@skipWin'] }, () => {
|
||||
test.setTimeout(90_000)
|
||||
test(
|
||||
'Selections work on fresh and edited sketch',
|
||||
{ tag: ['@skipWin'] },
|
||||
async ({ page, homePage }) => {
|
||||
// Skip on windows its being weird.
|
||||
test.skip(process.platform === 'win32', 'Skip on windows')
|
||||
|
||||
test('Selections work on fresh and edited sketch', async ({
|
||||
page,
|
||||
homePage,
|
||||
}) => {
|
||||
// tests mapping works on fresh sketch and edited sketch
|
||||
// tests using hovers which is the same as selections, because if
|
||||
// source ranges are wrong, hovers won't work
|
||||
@ -160,9 +157,7 @@ test.describe('Testing selections', () => {
|
||||
|
||||
// check the same selection again by putting cursor in code first then selecting axis
|
||||
await test.step(`Same selection but code selection then axis`, async () => {
|
||||
await page
|
||||
.getByText(` |> xLine(${commonPoints.num2 * -1}, %)`)
|
||||
.click()
|
||||
await page.getByText(` |> xLine(${commonPoints.num2 * -1}, %)`).click()
|
||||
await page.keyboard.down('Shift')
|
||||
await constrainButton.click()
|
||||
await expect(absXButton).toBeDisabled()
|
||||
@ -190,9 +185,7 @@ test.describe('Testing selections', () => {
|
||||
|
||||
await expect(page.locator('.cm-cursor')).toHaveCount(2)
|
||||
await page.waitForTimeout(500)
|
||||
await page.keyboard.up(
|
||||
process.platform === 'linux' ? 'Control' : 'Meta'
|
||||
)
|
||||
await page.keyboard.up(process.platform === 'linux' ? 'Control' : 'Meta')
|
||||
|
||||
// clear selection by clicking on nothing
|
||||
await emptySpaceClick()
|
||||
@ -253,8 +246,7 @@ test.describe('Testing selections', () => {
|
||||
await test.step(`Test hovering and selecting on edited sketch`, async () => {
|
||||
await selectionSequence()
|
||||
})
|
||||
}
|
||||
)
|
||||
})
|
||||
|
||||
test('Solids should be select and deletable', async ({ page, homePage }) => {
|
||||
test.setTimeout(90_000)
|
||||
@ -492,8 +484,6 @@ test.describe('Testing selections', () => {
|
||||
page,
|
||||
homePage,
|
||||
}) => {
|
||||
// TODO: fix this test on windows after the electron migration
|
||||
test.skip(process.platform === 'win32', 'Skip on windows')
|
||||
const u = await getUtils(page)
|
||||
await page.addInitScript(async (KCL_DEFAULT_LENGTH) => {
|
||||
localStorage.setItem(
|
||||
|
@ -435,11 +435,6 @@ test.describe('Text-to-CAD tests', () => {
|
||||
async ({ page, homePage }) => {
|
||||
// Let this test run longer since we've seen it timeout.
|
||||
test.setTimeout(180_000)
|
||||
// skip on windows
|
||||
test.skip(
|
||||
process.platform === 'win32',
|
||||
'This test is flaky, skipping for now'
|
||||
)
|
||||
|
||||
const u = await getUtils(page)
|
||||
|
||||
|
Reference in New Issue
Block a user