Fix group node bookmarking (#950)

* Resolves #926 group node bookmark

* Remove expect outside scope of test

* Update unit tests

* Update group node manager path separators

* Update group node path sepator in fixture
This commit is contained in:
bymyself
2024-09-24 00:26:02 -07:00
committed by GitHub
parent b21c0f59f9
commit 6b9c1b70ba
5 changed files with 77 additions and 32 deletions

View File

@@ -46,7 +46,7 @@ describe('group node', () => {
expect(n.isRemoved).toBeTruthy()
}
expect(groupNode.type).toEqual('workflow/' + name)
expect(groupNode.type).toEqual('workflow>' + name)
return graph.find(groupNode)
}
@@ -520,7 +520,7 @@ describe('group node', () => {
group1.menu.Clone.call()
expect(app.graph.nodes).toHaveLength(4)
const group2 = graph.find(app.graph.nodes[3])
expect(group2.node.type).toEqual('workflow/test')
expect(group2.node.type).toEqual('workflow>test')
expect(group2.id).not.toEqual(group1.id)
group1.outputs.VAE.connectTo(group2.inputs.VAE)
@@ -681,7 +681,7 @@ describe('group node', () => {
group1.menu.Clone.call()
expect(app.graph.nodes).toHaveLength(3)
const group2 = graph.find(app.graph.nodes[2])
expect(group2.node.type).toEqual('workflow/test')
expect(group2.node.type).toEqual('workflow>test')
expect(group2.id).not.toEqual(group1.id)
// Reconnect ckpt
@@ -741,7 +741,7 @@ describe('group node', () => {
resetEnv: true
}))
// Ensure the node isnt registered
expect(() => ez['workflow/test']).toThrow()
expect(() => ez['workflow>test']).toThrow()
// Reload the workflow
await app.loadGraphData(JSON.parse(workflow))
@@ -768,7 +768,7 @@ describe('group node', () => {
nodes: [
{
id: 3,
type: 'workflow/testerror'
type: 'workflow>testerror'
}
],
links: [],
@@ -796,7 +796,7 @@ describe('group node', () => {
expect(call).toContain('the following node types were not found')
expect(call).toContain('NotKSampler')
expect(call).toContain('NotVAEDecode')
expect(call).toContain('workflow/testerror')
expect(call).toContain('workflow>testerror')
})
test('maintains widget inputs on conversion back to nodes', async () => {
const { ez, graph, app } = await start()