This repository has been archived by the owner on Feb 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fecdc01
commit 076a5f9
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
describe('Graph layout', () => { | ||
it('layout should not fail with self transitions on machine node', () => { | ||
// Plant a fake entry in localStorage | ||
cy.setLocalStorage( | ||
'xstate_viz_raw_source|no_source', | ||
JSON.stringify({ | ||
date: new Date(), | ||
sourceRawContent: ` | ||
import { createMachine } from 'xstate'; | ||
const machine = createMachine({ | ||
on: { | ||
// These will now display as expected | ||
LOAD: {}, | ||
UPDATE: {}, | ||
}, | ||
states: { | ||
something: {}, | ||
}, | ||
}); | ||
`, | ||
}), | ||
); | ||
|
||
cy.visit('/viz'); | ||
|
||
// Will time out if visualization fails | ||
cy.getCanvas(); | ||
}); | ||
}); |