less flaky point and click
This commit is contained in:
@ -74,8 +74,6 @@ test.describe('Point-and-click tests', () => {
|
|||||||
|
|
||||||
await test.step('do extrude flow and check extrude code is added to editor', async () => {
|
await test.step('do extrude flow and check extrude code is added to editor', async () => {
|
||||||
await toolbar.extrudeButton.click()
|
await toolbar.extrudeButton.click()
|
||||||
await expect(page.getByText('Please select one or more face')).toBeVisible()
|
|
||||||
|
|
||||||
await cmdBar.expectState({
|
await cmdBar.expectState({
|
||||||
stage: 'arguments',
|
stage: 'arguments',
|
||||||
currentArgKey: 'distance',
|
currentArgKey: 'distance',
|
||||||
@ -1031,7 +1029,7 @@ openSketch = startSketchOn(XY)
|
|||||||
})
|
})
|
||||||
await test.step(`Go through the command bar flow`, async () => {
|
await test.step(`Go through the command bar flow`, async () => {
|
||||||
await toolbar.offsetPlaneButton.click()
|
await toolbar.offsetPlaneButton.click()
|
||||||
await expect(page.getByText('Please select one')).toBeVisible()
|
await expect.poll(() => page.getByText('Please select one').count()).toBe(2)
|
||||||
await cmdBar.expectState({
|
await cmdBar.expectState({
|
||||||
stage: 'arguments',
|
stage: 'arguments',
|
||||||
currentArgKey: 'plane',
|
currentArgKey: 'plane',
|
||||||
@ -1258,7 +1256,7 @@ openSketch = startSketchOn(XY)
|
|||||||
commandName: 'Helix',
|
commandName: 'Helix',
|
||||||
})
|
})
|
||||||
await cmdBar.selectOption({ name: 'Edge' }).click()
|
await cmdBar.selectOption({ name: 'Edge' }).click()
|
||||||
await expect(page.getByText('Please select one')).toBeVisible()
|
await expect.poll(() => page.getByText('Please select one').count()).toBe(1)
|
||||||
await clickOnEdge()
|
await clickOnEdge()
|
||||||
await page.waitForTimeout(1000)
|
await page.waitForTimeout(1000)
|
||||||
await cmdBar.progressCmdBar()
|
await cmdBar.progressCmdBar()
|
||||||
@ -1545,7 +1543,7 @@ extrude001 = extrude(profile001, length = 100)
|
|||||||
if (!shouldPreselect) {
|
if (!shouldPreselect) {
|
||||||
await test.step(`Go through the command bar flow without preselected sketches`, async () => {
|
await test.step(`Go through the command bar flow without preselected sketches`, async () => {
|
||||||
await toolbar.loftButton.click()
|
await toolbar.loftButton.click()
|
||||||
await expect(page.getByText('Please select one')).toBeVisible()
|
await expect.poll(() => page.getByText('Please select one').count()).toBe(2)
|
||||||
await cmdBar.expectState({
|
await cmdBar.expectState({
|
||||||
stage: 'arguments',
|
stage: 'arguments',
|
||||||
currentArgKey: 'selection',
|
currentArgKey: 'selection',
|
||||||
@ -1564,7 +1562,6 @@ extrude001 = extrude(profile001, length = 100)
|
|||||||
|
|
||||||
await test.step(`Go through the command bar flow with preselected sketches`, async () => {
|
await test.step(`Go through the command bar flow with preselected sketches`, async () => {
|
||||||
await toolbar.loftButton.click()
|
await toolbar.loftButton.click()
|
||||||
await expect(page.getByText('Please select one')).toBeVisible()
|
|
||||||
await cmdBar.progressCmdBar()
|
await cmdBar.progressCmdBar()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -1725,7 +1722,7 @@ sketch002 = startSketchOn(XZ)
|
|||||||
|
|
||||||
await test.step(`Go through the command bar flow`, async () => {
|
await test.step(`Go through the command bar flow`, async () => {
|
||||||
await toolbar.sweepButton.click()
|
await toolbar.sweepButton.click()
|
||||||
await expect(page.getByText('Please select one')).toBeVisible()
|
await expect.poll(() => page.getByText('Please select one').count()).toBe(2)
|
||||||
await cmdBar.expectState({
|
await cmdBar.expectState({
|
||||||
commandName: 'Sweep',
|
commandName: 'Sweep',
|
||||||
currentArgKey: 'target',
|
currentArgKey: 'target',
|
||||||
@ -1862,7 +1859,7 @@ sketch002 = startSketchOn(XZ)
|
|||||||
|
|
||||||
await test.step(`Go through the command bar flow and fail validation with a toast`, async () => {
|
await test.step(`Go through the command bar flow and fail validation with a toast`, async () => {
|
||||||
await toolbar.sweepButton.click()
|
await toolbar.sweepButton.click()
|
||||||
await expect(page.getByText('Please select one')).toBeVisible()
|
await expect.poll(() => page.getByText('Please select one').count()).toBe(2)
|
||||||
await cmdBar.expectState({
|
await cmdBar.expectState({
|
||||||
commandName: 'Sweep',
|
commandName: 'Sweep',
|
||||||
currentArgKey: 'target',
|
currentArgKey: 'target',
|
||||||
@ -1979,7 +1976,6 @@ extrude001 = extrude(sketch001, length = -12)
|
|||||||
await test.step(`Apply fillet to the preselected edge`, async () => {
|
await test.step(`Apply fillet to the preselected edge`, async () => {
|
||||||
await page.waitForTimeout(100)
|
await page.waitForTimeout(100)
|
||||||
await toolbar.filletButton.click()
|
await toolbar.filletButton.click()
|
||||||
await expect(page.getByText('Please select one')).toBeVisible()
|
|
||||||
await cmdBar.expectState({
|
await cmdBar.expectState({
|
||||||
commandName: 'Fillet',
|
commandName: 'Fillet',
|
||||||
highlightedHeaderArg: 'selection',
|
highlightedHeaderArg: 'selection',
|
||||||
@ -2080,7 +2076,7 @@ extrude001 = extrude(sketch001, length = -12)
|
|||||||
await test.step(`Open fillet UI without selecting edges`, async () => {
|
await test.step(`Open fillet UI without selecting edges`, async () => {
|
||||||
await page.waitForTimeout(100)
|
await page.waitForTimeout(100)
|
||||||
await toolbar.filletButton.click()
|
await toolbar.filletButton.click()
|
||||||
await expect(page.getByText('Please select one')).toBeVisible()
|
await expect.poll(() => page.getByText('Please select one').count()).toBe(2)
|
||||||
await cmdBar.expectState({
|
await cmdBar.expectState({
|
||||||
stage: 'arguments',
|
stage: 'arguments',
|
||||||
currentArgKey: 'selection',
|
currentArgKey: 'selection',
|
||||||
@ -2448,7 +2444,6 @@ extrude001 = extrude(profile001, length = 5)
|
|||||||
await test.step(`Apply fillet`, async () => {
|
await test.step(`Apply fillet`, async () => {
|
||||||
await page.waitForTimeout(100)
|
await page.waitForTimeout(100)
|
||||||
await toolbar.filletButton.click()
|
await toolbar.filletButton.click()
|
||||||
await expect(page.getByText('Please select one')).toBeVisible()
|
|
||||||
await cmdBar.expectState({
|
await cmdBar.expectState({
|
||||||
commandName: 'Fillet',
|
commandName: 'Fillet',
|
||||||
highlightedHeaderArg: 'selection',
|
highlightedHeaderArg: 'selection',
|
||||||
@ -2566,7 +2561,6 @@ extrude001 = extrude(sketch001, length = -12)
|
|||||||
await test.step(`Apply chamfer to the preselected edge`, async () => {
|
await test.step(`Apply chamfer to the preselected edge`, async () => {
|
||||||
await page.waitForTimeout(100)
|
await page.waitForTimeout(100)
|
||||||
await toolbar.chamferButton.click()
|
await toolbar.chamferButton.click()
|
||||||
await expect(page.getByText('Please select one')).toBeVisible()
|
|
||||||
await cmdBar.expectState({
|
await cmdBar.expectState({
|
||||||
commandName: 'Chamfer',
|
commandName: 'Chamfer',
|
||||||
highlightedHeaderArg: 'selection',
|
highlightedHeaderArg: 'selection',
|
||||||
@ -2674,7 +2668,7 @@ extrude001 = extrude(sketch001, length = -12)
|
|||||||
await test.step(`Open chamfer UI without selecting edges`, async () => {
|
await test.step(`Open chamfer UI without selecting edges`, async () => {
|
||||||
await page.waitForTimeout(100)
|
await page.waitForTimeout(100)
|
||||||
await toolbar.chamferButton.click()
|
await toolbar.chamferButton.click()
|
||||||
await expect(page.getByText('Please select one')).toBeVisible()
|
await expect.poll(() => page.getByText('Please select one').count()).toBe(2)
|
||||||
await cmdBar.expectState({
|
await cmdBar.expectState({
|
||||||
stage: 'arguments',
|
stage: 'arguments',
|
||||||
currentArgKey: 'selection',
|
currentArgKey: 'selection',
|
||||||
@ -2984,7 +2978,7 @@ extrude001 = extrude(sketch001, length = 30)
|
|||||||
if (!shouldPreselect) {
|
if (!shouldPreselect) {
|
||||||
await test.step(`Go through the command bar flow without preselected faces`, async () => {
|
await test.step(`Go through the command bar flow without preselected faces`, async () => {
|
||||||
await toolbar.shellButton.click()
|
await toolbar.shellButton.click()
|
||||||
await expect(page.getByText('Please select one')).toBeVisible()
|
await expect.poll(() => page.getByText('Please select one').count()).toBe(2)
|
||||||
await cmdBar.expectState({
|
await cmdBar.expectState({
|
||||||
stage: 'arguments',
|
stage: 'arguments',
|
||||||
currentArgKey: 'selection',
|
currentArgKey: 'selection',
|
||||||
@ -3019,7 +3013,6 @@ extrude001 = extrude(sketch001, length = 30)
|
|||||||
|
|
||||||
await test.step(`Go through the command bar flow with a preselected face (cap)`, async () => {
|
await test.step(`Go through the command bar flow with a preselected face (cap)`, async () => {
|
||||||
await toolbar.shellButton.click()
|
await toolbar.shellButton.click()
|
||||||
await expect(page.getByText('Please select one')).toBeVisible()
|
|
||||||
await cmdBar.progressCmdBar()
|
await cmdBar.progressCmdBar()
|
||||||
await page.waitForTimeout(500)
|
await page.waitForTimeout(500)
|
||||||
await cmdBar.progressCmdBar()
|
await cmdBar.progressCmdBar()
|
||||||
@ -3126,7 +3119,7 @@ extrude001 = extrude(sketch001, length = 40)
|
|||||||
|
|
||||||
await test.step(`Go through the command bar flow, selecting a wall and keeping default thickness`, async () => {
|
await test.step(`Go through the command bar flow, selecting a wall and keeping default thickness`, async () => {
|
||||||
await toolbar.shellButton.click()
|
await toolbar.shellButton.click()
|
||||||
await expect(page.getByText('Please select one')).toBeVisible()
|
await expect.poll(() => page.getByText('Please select one').count()).toBe(2)
|
||||||
await cmdBar.expectState({
|
await cmdBar.expectState({
|
||||||
stage: 'arguments',
|
stage: 'arguments',
|
||||||
currentArgKey: 'selection',
|
currentArgKey: 'selection',
|
||||||
@ -3138,9 +3131,7 @@ extrude001 = extrude(sketch001, length = 40)
|
|||||||
highlightedHeaderArg: 'selection',
|
highlightedHeaderArg: 'selection',
|
||||||
commandName: 'Shell',
|
commandName: 'Shell',
|
||||||
})
|
})
|
||||||
await expect(
|
await expect.poll(() => page.getByText('Please select one').count()).toBe(2)
|
||||||
page.getByText('Please select one or more face')
|
|
||||||
).toBeVisible()
|
|
||||||
await clickOnCap()
|
await clickOnCap()
|
||||||
await page.keyboard.down('Shift')
|
await page.keyboard.down('Shift')
|
||||||
await clickOnWall()
|
await clickOnWall()
|
||||||
@ -3267,7 +3258,6 @@ extrude002 = extrude(sketch002, length = 50)
|
|||||||
|
|
||||||
await test.step(`Go through the command bar flow, selecting a cap and keeping default thickness`, async () => {
|
await test.step(`Go through the command bar flow, selecting a cap and keeping default thickness`, async () => {
|
||||||
await toolbar.shellButton.click()
|
await toolbar.shellButton.click()
|
||||||
await expect(page.getByText('Please select one')).toBeVisible()
|
|
||||||
await cmdBar.expectState({
|
await cmdBar.expectState({
|
||||||
stage: 'arguments',
|
stage: 'arguments',
|
||||||
currentArgKey: 'selection',
|
currentArgKey: 'selection',
|
||||||
@ -3279,9 +3269,7 @@ extrude002 = extrude(sketch002, length = 50)
|
|||||||
highlightedHeaderArg: 'selection',
|
highlightedHeaderArg: 'selection',
|
||||||
commandName: 'Shell',
|
commandName: 'Shell',
|
||||||
})
|
})
|
||||||
await expect(
|
await expect.poll(() => page.getByText('Please select one').count()).toBe(1)
|
||||||
page.getByText('Please select one or more face')
|
|
||||||
).toBeVisible()
|
|
||||||
await clickOnCap()
|
await clickOnCap()
|
||||||
await page.waitForTimeout(500)
|
await page.waitForTimeout(500)
|
||||||
await cmdBar.progressCmdBar()
|
await cmdBar.progressCmdBar()
|
||||||
@ -3438,7 +3426,7 @@ sweep001 = sweep(sketch001, path = sketch002)
|
|||||||
|
|
||||||
await test.step(`Go through the Shell flow and fail validation with a toast`, async () => {
|
await test.step(`Go through the Shell flow and fail validation with a toast`, async () => {
|
||||||
await toolbar.shellButton.click()
|
await toolbar.shellButton.click()
|
||||||
await expect(page.getByText('Please select one')).toBeVisible()
|
await expect.poll(() => page.getByText('Please select one').count()).toBe(2)
|
||||||
await cmdBar.expectState({
|
await cmdBar.expectState({
|
||||||
stage: 'arguments',
|
stage: 'arguments',
|
||||||
currentArgKey: 'selection',
|
currentArgKey: 'selection',
|
||||||
@ -3507,9 +3495,9 @@ segAng(rectangleSegmentA002),
|
|||||||
// select line of code
|
// select line of code
|
||||||
const codeToSelection = `segAng(rectangleSegmentA002) - 90,`
|
const codeToSelection = `segAng(rectangleSegmentA002) - 90,`
|
||||||
// revolve
|
// revolve
|
||||||
|
await editor.scrollToText(codeToSelection)
|
||||||
await page.getByText(codeToSelection).click()
|
await page.getByText(codeToSelection).click()
|
||||||
await toolbar.revolveButton.click()
|
await toolbar.revolveButton.click()
|
||||||
await expect(page.getByText('Please select one')).toBeVisible()
|
|
||||||
await cmdBar.progressCmdBar()
|
await cmdBar.progressCmdBar()
|
||||||
await cmdBar.progressCmdBar()
|
await cmdBar.progressCmdBar()
|
||||||
await cmdBar.progressCmdBar()
|
await cmdBar.progressCmdBar()
|
||||||
@ -3682,7 +3670,7 @@ sketch003 = startSketchOn(extrude001, 'START')
|
|||||||
await page.waitForTimeout(1000)
|
await page.waitForTimeout(1000)
|
||||||
await editor.scrollToText(codeToSelection)
|
await editor.scrollToText(codeToSelection)
|
||||||
await page.getByText(codeToSelection).click()
|
await page.getByText(codeToSelection).click()
|
||||||
await expect(page.getByText('AxisOrEdge', { exact: true })).toBeVisible()
|
await expect.poll(() => page.getByText('AxisOrEdge').count()).toBe(2)
|
||||||
await page.getByText('Edge', { exact: true }).click()
|
await page.getByText('Edge', { exact: true }).click()
|
||||||
const lineCodeToSelection = `length = 2.6`
|
const lineCodeToSelection = `length = 2.6`
|
||||||
await editor.scrollToText(lineCodeToSelection)
|
await editor.scrollToText(lineCodeToSelection)
|
||||||
|
Reference in New Issue
Block a user