StateNode atoms (#2213)
This PR extracts some improvements from #2198 into a separate PR. ### Release Notes - adds computed `StateNode.getPath` - adds computed StateNode.getCurrent` - adds computed StateNode.getIsActive` - adds computed `Editor.getPath()` - makes transition's second property optional ### Change Type - [x] `minor` — New feature ### Test Plan - [x] Unit Tests - [x] End to end tests
This commit is contained in:
parent
6f872c796a
commit
7186368f0d
60 changed files with 562 additions and 468 deletions
|
@ -5,18 +5,6 @@ export function sleep(ms: number) {
|
|||
return new Promise((resolve) => setTimeout(resolve, ms))
|
||||
}
|
||||
|
||||
// export async function expectPathToBe(page: Page, path: string) {
|
||||
// expect(await page.evaluate(() => editor.root.path.value)).toBe(path)
|
||||
// }
|
||||
|
||||
// export async function expectToHaveNShapes(page: Page, numberOfShapes: number) {
|
||||
// expect(await page.evaluate(() => editor.currentPageShapes.length)).toBe(numberOfShapes)
|
||||
// }
|
||||
|
||||
// export async function expectToHaveNSelectedShapes(page: Page, numberOfSelectedShapes: number) {
|
||||
// expect(await page.evaluate(() => editor.selectedShapeIds.length)).toBe(numberOfSelectedShapes)
|
||||
// }
|
||||
|
||||
declare const editor: Editor
|
||||
|
||||
export async function setup({ page }: PlaywrightTestArgs & PlaywrightWorkerArgs) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue