lint + move focus
This commit is contained in:
4
.github/workflows/playwright.yml
vendored
4
.github/workflows/playwright.yml
vendored
@ -157,7 +157,7 @@ jobs:
|
||||
id: retry
|
||||
if: always()
|
||||
run: |
|
||||
yarn playwright test --project="Google Chrome" --workers=1 --grep=@focus --repeat-each=3
|
||||
yarn playwright test --project="Google Chrome" --workers=1 --grep=@focus --repeat-each=13
|
||||
# if [[ ! -f "test-results/.last-run.json" ]]; then
|
||||
# # if no last run artifact, than run plawright normally
|
||||
# echo "run playwright normally"
|
||||
@ -277,7 +277,7 @@ jobs:
|
||||
id: retry
|
||||
if: always()
|
||||
run: |
|
||||
yarn playwright test --project="webkit" --workers=1 --grep=@focus --repeat-each=3
|
||||
yarn playwright test --project="webkit" --workers=1 --grep=@focus --repeat-each=13
|
||||
# if [[ ! -f "test-results/.last-run.json" ]]; then
|
||||
# # if no last run artifact, than run plawright normally
|
||||
# echo "run playwright normally"
|
||||
|
||||
@ -5948,10 +5948,9 @@ test.describe('Testing segment overlays', () => {
|
||||
await expect(page.locator('.cm-content')).toContainText(expectFinal)
|
||||
}
|
||||
test.setTimeout(120000)
|
||||
test(
|
||||
'for segments [line, angledLine, lineTo, xLineTo]',
|
||||
{ tag: '@focus' },
|
||||
async ({ page }, testInfo) => {
|
||||
test('for segments [line, angledLine, lineTo, xLineTo]', async ({
|
||||
page,
|
||||
}, testInfo) => {
|
||||
await page.addInitScript(async () => {
|
||||
localStorage.setItem(
|
||||
'persistCode',
|
||||
@ -6052,8 +6051,7 @@ test.describe('Testing segment overlays', () => {
|
||||
constraintType: 'angle',
|
||||
expectBeforeUnconstrained:
|
||||
'angledLine({ angle: 3 + 0, length: 32 + 0 }, %)',
|
||||
expectAfterUnconstrained:
|
||||
'angledLine({ angle: 3, length: 32 + 0 }, %)',
|
||||
expectAfterUnconstrained: 'angledLine({ angle: 3, length: 32 + 0 }, %)',
|
||||
expectFinal: 'angledLine({ angle: angle001, length: 32 + 0 }, %)',
|
||||
ang: ang + 180,
|
||||
locator: '[data-overlay-toolbar-index="1"]',
|
||||
@ -6112,12 +6110,8 @@ test.describe('Testing segment overlays', () => {
|
||||
steps: 8,
|
||||
locator: '[data-overlay-toolbar-index="3"]',
|
||||
})
|
||||
}
|
||||
)
|
||||
test(
|
||||
'for segments [yLineTo, xLine]',
|
||||
{ tag: '@focus' },
|
||||
async ({ page }) => {
|
||||
})
|
||||
test('for segments [yLineTo, xLine]', async ({ page }) => {
|
||||
await page.addInitScript(async () => {
|
||||
localStorage.setItem(
|
||||
'persistCode',
|
||||
@ -6191,12 +6185,10 @@ const part001 = startSketchOn('XZ')
|
||||
ang: ang + 180,
|
||||
locator: '[data-overlay-toolbar-index="5"]',
|
||||
})
|
||||
}
|
||||
)
|
||||
test(
|
||||
'for segments [yLine, angledLineOfXLength, angledLineOfYLength]',
|
||||
{ tag: '@focus' },
|
||||
async ({ page }) => {
|
||||
})
|
||||
test('for segments [yLine, angledLineOfXLength, angledLineOfYLength]', async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.addInitScript(async () => {
|
||||
localStorage.setItem(
|
||||
'persistCode',
|
||||
@ -6316,18 +6308,15 @@ const part001 = startSketchOn('XZ')
|
||||
'angledLineOfYLength({ angle: -91, length: 19 + 0 }, %)',
|
||||
expectAfterUnconstrained:
|
||||
'angledLineOfYLength({ angle: -91, length: 19 }, %)',
|
||||
expectFinal:
|
||||
'angledLineOfYLength({ angle: -91, length: yRel002 }, %)',
|
||||
expectFinal: 'angledLineOfYLength({ angle: -91, length: yRel002 }, %)',
|
||||
ang: ang + 180,
|
||||
steps: 7,
|
||||
locator: '[data-overlay-toolbar-index="8"]',
|
||||
})
|
||||
}
|
||||
)
|
||||
test(
|
||||
'for segments [angledLineToX, angledLineToY, angledLineThatIntersects]',
|
||||
{ tag: '@focus' },
|
||||
async ({ page }) => {
|
||||
})
|
||||
test('for segments [angledLineToX, angledLineToY, angledLineThatIntersects]', async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.addInitScript(async () => {
|
||||
localStorage.setItem(
|
||||
'persistCode',
|
||||
@ -6382,8 +6371,7 @@ const part001 = startSketchOn('XZ')
|
||||
await clickConstrained({
|
||||
hoverPos: { x: angledLineToX.x, y: angledLineToX.y },
|
||||
constraintType: 'angle',
|
||||
expectBeforeUnconstrained:
|
||||
'angledLineToX({ angle: 3 + 0, to: 26 }, %)',
|
||||
expectBeforeUnconstrained: 'angledLineToX({ angle: 3 + 0, to: 26 }, %)',
|
||||
expectAfterUnconstrained: 'angledLineToX({ angle: 3, to: 26 }, %)',
|
||||
expectFinal: 'angledLineToX({ angle: angle001, to: 26 }, %)',
|
||||
ang: ang + 180,
|
||||
@ -6402,9 +6390,7 @@ const part001 = startSketchOn('XZ')
|
||||
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({
|
||||
@ -6485,12 +6471,8 @@ const part001 = startSketchOn('XZ')
|
||||
ang: ang + 180,
|
||||
locator: '[data-overlay-toolbar-index="11"]',
|
||||
})
|
||||
}
|
||||
)
|
||||
test(
|
||||
'for segment [tangentialArcTo]',
|
||||
{ tag: '@focus' },
|
||||
async ({ page }) => {
|
||||
})
|
||||
test('for segment [tangentialArcTo]', async ({ page }) => {
|
||||
await page.addInitScript(async () => {
|
||||
localStorage.setItem(
|
||||
'persistCode',
|
||||
@ -6563,8 +6545,7 @@ const part001 = startSketchOn('XZ')
|
||||
steps: 10,
|
||||
locator: '[data-overlay-toolbar-index="12"]',
|
||||
})
|
||||
}
|
||||
)
|
||||
})
|
||||
})
|
||||
test.describe('Testing deleting a segment', () => {
|
||||
const _deleteSegmentSequence =
|
||||
@ -6604,7 +6585,7 @@ const part001 = startSketchOn('XZ')
|
||||
codeToBeDeleted
|
||||
)
|
||||
}
|
||||
test('all segment types', { tag: '@focus' }, async ({ page }) => {
|
||||
test('all segment types', async ({ page }) => {
|
||||
await page.addInitScript(async () => {
|
||||
localStorage.setItem(
|
||||
'persistCode',
|
||||
@ -6837,12 +6818,9 @@ const part001 = startSketchOn('XZ')
|
||||
for (const doesHaveTagOutsideSketch of [true, false]) {
|
||||
for (const lineOfInterest of cases) {
|
||||
const isObj = lineOfInterest.includes('{ angle: 3,')
|
||||
test(
|
||||
`${lineOfInterest.split('(')[0]}${isObj ? '-[obj-input]' : ''}${
|
||||
test(`${lineOfInterest.split('(')[0]}${isObj ? '-[obj-input]' : ''}${
|
||||
doesHaveTagOutsideSketch ? '-[tagOutsideSketch]' : ''
|
||||
}`,
|
||||
{ tag: '@focus' },
|
||||
async ({ page }) => {
|
||||
}`, async ({ page }) => {
|
||||
await page.addInitScript(
|
||||
async ({ lineToBeDeleted, extraLine }) => {
|
||||
localStorage.setItem(
|
||||
@ -6931,12 +6909,9 @@ ${extraLine ? 'const myVar = segLen(seg01)' : ''}`
|
||||
lineOfInterest
|
||||
)
|
||||
// eslint-disable-next-line jest/no-conditional-expect
|
||||
await expect(page.locator('.cm-content')).not.toContainText(
|
||||
'seg01'
|
||||
)
|
||||
await expect(page.locator('.cm-content')).not.toContainText('seg01')
|
||||
}
|
||||
}
|
||||
)
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
@ -7003,10 +6978,9 @@ ${extraLine ? 'const myVar = segLen(seg01)' : ''}`
|
||||
|
||||
for (const { before, after } of cases) {
|
||||
const isObj = before.includes('{ angle: 3')
|
||||
test(
|
||||
`${before.split('(')[0]}${isObj ? '-[obj-input]' : ''}`,
|
||||
{ tag: '@focus' },
|
||||
async ({ page }) => {
|
||||
test(`${before.split('(')[0]}${isObj ? '-[obj-input]' : ''}`, async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.addInitScript(
|
||||
async ({ lineToBeDeleted }) => {
|
||||
localStorage.setItem(
|
||||
@ -7069,8 +7043,7 @@ ${extraLine ? 'const myVar = segLen(seg01)' : ''}`
|
||||
// check the cursor was left in the correct place after transform
|
||||
await expect(page.locator('.cm-activeLine')).toHaveText('|> ' + after)
|
||||
await expect(page.getByTestId('segment-overlay')).toHaveCount(3)
|
||||
}
|
||||
)
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user