Fixed more e2e tests
This commit is contained in:
committed by
Nick Cameron
parent
5191013db2
commit
729a34efed
@ -79,8 +79,8 @@ test.describe('Code pane and errors', () => {
|
|||||||
|
|
||||||
// Delete a character to break the KCL
|
// Delete a character to break the KCL
|
||||||
await editor.openPane()
|
await editor.openPane()
|
||||||
await editor.scrollToText('thickness, bracketLeg1Sketch)')
|
await editor.scrollToText('bracketLeg1Sketch, length = thickness)')
|
||||||
await page.getByText('extrude(thickness, bracketLeg1Sketch)').click()
|
await page.getByText('extrude(bracketLeg1Sketch, length = thickness)').click()
|
||||||
await page.keyboard.press('Backspace')
|
await page.keyboard.press('Backspace')
|
||||||
|
|
||||||
// Ensure that a badge appears on the button
|
// Ensure that a badge appears on the button
|
||||||
@ -107,7 +107,7 @@ test.describe('Code pane and errors', () => {
|
|||||||
await editor.openPane()
|
await editor.openPane()
|
||||||
|
|
||||||
// Go to our problematic code again (missing closing paren!)
|
// Go to our problematic code again (missing closing paren!)
|
||||||
await editor.scrollToText('extrude(thickness, bracketLeg1Sketch')
|
await editor.scrollToText('extrude(bracketLeg1Sketch, length = thickness')
|
||||||
|
|
||||||
// Ensure that a badge appears on the button
|
// Ensure that a badge appears on the button
|
||||||
await expect(codePaneButtonHolder).toContainText('notification')
|
await expect(codePaneButtonHolder).toContainText('notification')
|
||||||
|
@ -1098,7 +1098,7 @@ test(`Fillet point-and-click`, async ({
|
|||||||
|> line([0, 12], %)
|
|> line([0, 12], %)
|
||||||
|> line([24, 0], %)
|
|> line([24, 0], %)
|
||||||
|> line([0, -12], %)
|
|> line([0, -12], %)
|
||||||
|> lineTo([profileStartX(%), profileStartY(%)], %)
|
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||||
|> close(%)
|
|> close(%)
|
||||||
extrude001 = extrude(-12, sketch001)
|
extrude001 = extrude(-12, sketch001)
|
||||||
`
|
`
|
||||||
|
@ -1140,28 +1140,28 @@ test.describe('Sketch tests', () => {
|
|||||||
-railTop / 2,
|
-railTop / 2,
|
||||||
railClampable + railBaseLength
|
railClampable + railBaseLength
|
||||||
], %)
|
], %)
|
||||||
|> lineTo([
|
|> line(endAbsolute = [
|
||||||
railTop / 2,
|
railTop / 2,
|
||||||
railClampable + railBaseLength
|
railClampable + railBaseLength
|
||||||
], %)
|
])
|
||||||
|> lineTo([
|
|> line(endAbsolute = [
|
||||||
railWideWidth / 2,
|
railWideWidth / 2,
|
||||||
railClampable / 2 + railBaseLength
|
railClampable / 2 + railBaseLength
|
||||||
], %, $seg01)
|
], $seg01)
|
||||||
|> line(endAbsolute = [railTop / 2, railBaseLength])
|
|> line(endAbsolute = [railTop / 2, railBaseLength])
|
||||||
|> line(endAbsolute = [railBaseWidth / 2, railBaseLength])
|
|> line(endAbsolute = [railBaseWidth / 2, railBaseLength])
|
||||||
|> line(endAbsolute = [railBaseWidth / 2, 0])
|
|> line(endAbsolute = [railBaseWidth / 2, 0])
|
||||||
|> line(endAbsolute = [-railBaseWidth / 2, 0])
|
|> line(endAbsolute = [-railBaseWidth / 2, 0])
|
||||||
|> line(endAbsolute = [-railBaseWidth / 2, railBaseLength])
|
|> line(endAbsolute = [-railBaseWidth / 2, railBaseLength])
|
||||||
|> line(endAbsolute = [-railTop / 2, railBaseLength])
|
|> line(endAbsolute = [-railTop / 2, railBaseLength])
|
||||||
|> lineTo([
|
|> line(endAbsolute = [
|
||||||
-railWideWidth / 2,
|
-railWideWidth / 2,
|
||||||
railClampable / 2 + railBaseLength
|
railClampable / 2 + railBaseLength
|
||||||
], %)
|
])
|
||||||
|> lineTo([
|
|> line(endAbsolute = [
|
||||||
-railTop / 2,
|
-railTop / 2,
|
||||||
railClampable + railBaseLength
|
railClampable + railBaseLength
|
||||||
], %)
|
])
|
||||||
|> close(%)
|
|> close(%)
|
||||||
|> extrude(length = in2mm(2))`
|
|> extrude(length = in2mm(2))`
|
||||||
)
|
)
|
||||||
@ -1250,7 +1250,7 @@ test.describe('Sketch mode should be toleratant to syntax errors', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
await test.step('Make typo and check the segments have Disappeared and there is a syntax error', async () => {
|
await test.step('Make typo and check the segments have Disappeared and there is a syntax error', async () => {
|
||||||
await editor.replaceCode('lineTo([pro', 'badBadBadFn([pro')
|
await editor.replaceCode('line(endAbsolute = [pro', 'badBadBadFn([pro')
|
||||||
await editor.expectState({
|
await editor.expectState({
|
||||||
activeLines: [],
|
activeLines: [],
|
||||||
diagnostics: ['memoryitemkey`badBadBadFn`isnotdefined'],
|
diagnostics: ['memoryitemkey`badBadBadFn`isnotdefined'],
|
||||||
@ -1261,7 +1261,7 @@ test.describe('Sketch mode should be toleratant to syntax errors', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
await test.step('', async () => {
|
await test.step('', async () => {
|
||||||
await editor.replaceCode('badBadBadFn([pro', 'lineTo([pro')
|
await editor.replaceCode('badBadBadFn([pro', 'line(endAbsolute = [pro')
|
||||||
await editor.expectState({
|
await editor.expectState({
|
||||||
activeLines: [],
|
activeLines: [],
|
||||||
diagnostics: [],
|
diagnostics: [],
|
||||||
|
@ -332,9 +332,9 @@ test.describe('Testing segment overlays', () => {
|
|||||||
await clickConstrained({
|
await clickConstrained({
|
||||||
hoverPos: { x: lineTo.x, y: lineTo.y },
|
hoverPos: { x: lineTo.x, y: lineTo.y },
|
||||||
constraintType: 'yAbsolute',
|
constraintType: 'yAbsolute',
|
||||||
expectBeforeUnconstrained: 'lineTo([5 + 33, 20 + 11.5 + 0], %)',
|
expectBeforeUnconstrained: 'line(endAbsolute = [5 + 33, 20 + 11.5 + 0])',
|
||||||
expectAfterUnconstrained: 'lineTo([5 + 33, 31.5], %)',
|
expectAfterUnconstrained: 'line(endAbsolute = [5 + 33, 31.5], %)',
|
||||||
expectFinal: 'lineTo([5 + 33, yAbs001], %)',
|
expectFinal: 'line(endAbsolute = [5 + 33, yAbs001])',
|
||||||
steps: 8,
|
steps: 8,
|
||||||
ang: ang + 180,
|
ang: ang + 180,
|
||||||
locator: '[data-overlay-toolbar-index="2"]',
|
locator: '[data-overlay-toolbar-index="2"]',
|
||||||
@ -343,9 +343,9 @@ test.describe('Testing segment overlays', () => {
|
|||||||
await clickConstrained({
|
await clickConstrained({
|
||||||
hoverPos: { x: lineTo.x, y: lineTo.y },
|
hoverPos: { x: lineTo.x, y: lineTo.y },
|
||||||
constraintType: 'xAbsolute',
|
constraintType: 'xAbsolute',
|
||||||
expectBeforeUnconstrained: 'lineTo([5 + 33, yAbs001], %)',
|
expectBeforeUnconstrained: 'line(endAbsolute = [5 + 33, yAbs001])',
|
||||||
expectAfterUnconstrained: 'lineTo([38, yAbs001], %)',
|
expectAfterUnconstrained: 'line(endAbsolute = [38, yAbs001])',
|
||||||
expectFinal: 'lineTo([xAbs001, yAbs001], %)',
|
expectFinal: 'line(endAbsolute = [xAbs001, yAbs001])',
|
||||||
steps: 8,
|
steps: 8,
|
||||||
ang: ang + 180,
|
ang: ang + 180,
|
||||||
locator: '[data-overlay-toolbar-index="2"]',
|
locator: '[data-overlay-toolbar-index="2"]',
|
||||||
@ -1110,7 +1110,7 @@ test.describe('Testing segment overlays', () => {
|
|||||||
)
|
)
|
||||||
await page.mouse.move(hoverPos.x, hoverPos.y)
|
await page.mouse.move(hoverPos.x, hoverPos.y)
|
||||||
|
|
||||||
const codeToBeDeleted = 'lineTo([33, 11.5 + 0], %)'
|
const codeToBeDeleted = 'lineTo(endAbsolute = [33, 11.5 + 0])'
|
||||||
await editor.expectEditor.toContain(codeToBeDeleted, {
|
await editor.expectEditor.toContain(codeToBeDeleted, {
|
||||||
shouldNormalise: true,
|
shouldNormalise: true,
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user