don't allow edit on sketches with no variable declaration (#3292)
don't allow edit on sketches with no variable decleration
This commit is contained in:
@ -791,6 +791,7 @@ export function isSingleCursorInPipe(
|
|||||||
const pathToNode = getNodePathFromSourceRange(ast, selection.range)
|
const pathToNode = getNodePathFromSourceRange(ast, selection.range)
|
||||||
const nodeTypes = pathToNode.map(([, type]) => type)
|
const nodeTypes = pathToNode.map(([, type]) => type)
|
||||||
if (nodeTypes.includes('FunctionExpression')) return false
|
if (nodeTypes.includes('FunctionExpression')) return false
|
||||||
|
if (!nodeTypes.includes('VariableDeclaration')) return false
|
||||||
if (nodeTypes.includes('PipeExpression')) return true
|
if (nodeTypes.includes('PipeExpression')) return true
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
@ -458,6 +458,9 @@ async function GraphTheGraph(
|
|||||||
await page.waitForSelector('#plotly-graph')
|
await page.waitForSelector('#plotly-graph')
|
||||||
const element = await page.$('#plotly-graph')
|
const element = await page.$('#plotly-graph')
|
||||||
|
|
||||||
|
// wait an extra bit for things to settle
|
||||||
|
await new Promise((resolve) => setTimeout(resolve, 500))
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
await element.screenshot({
|
await element.screenshot({
|
||||||
path: `./e2e/playwright/temp3.png`,
|
path: `./e2e/playwright/temp3.png`,
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 183 KiB After Width: | Height: | Size: 182 KiB |
Reference in New Issue
Block a user