Go back to fix up sketch-tests test

This commit is contained in:
49lf
2024-11-21 12:00:32 -05:00
parent 765e27c02b
commit a9b78fb2a4
5 changed files with 1807 additions and 1893 deletions

View File

@ -416,6 +416,10 @@ export async function getUtils(page: Page, test_?: typeof test) {
.boundingBox({ timeout: 5_000 })
.then((box) => ({ ...box, x: box?.x || 0, y: box?.y || 0 })),
codeLocator: page.locator('.cm-content'),
crushKclCodeIntoOneLineAndThenMaybeSome: async () => {
const code = await page.locator('.cm-content').innerText()
return code.replaceAll(' ', '').replaceAll("\n", '')
},
normalisedEditorCode: async () => {
const code = await page.locator('.cm-content').innerText()
return normaliseKclNumbers(code)