Skip to content

A full-featured download manager.

test(renderer): await async graph nodes and geoip options (#2232)

Dr_rOot014d4d7641eb
diff --git a/src/renderer/routes/plugins/plugin-diagnostics-page.test.tsx b/src/renderer/routes/plugins/plugin-diagnostics-page.test.tsx
index f5c4ba86..a858cfe0 100644
--- a/src/renderer/routes/plugins/plugin-diagnostics-page.test.tsx
+++ b/src/renderer/routes/plugins/plugin-diagnostics-page.test.tsx
@@ -730,7 +730,8 @@ describe('PluginDiagnosticsPage', () => {
it('shows current node and edge selections in the Graph inspector', async () => {
await renderSuccess()
- fireEvent.click(screen.getByTestId('flow-node-plugin.alpha'))
+ // The canvas mounts before the asynchronous layout supplies its nodes.
+ fireEvent.click(await screen.findByTestId('flow-node-plugin.alpha'))
const inspector = screen.getByRole('complementary', {
name: 'Call graph selection details',
})
diff --git a/src/renderer/routes/settings/cards/bt-peer-geo-section.test.tsx b/src/renderer/routes/settings/cards/bt-peer-geo-section.test.tsx
index 1a21a0e6..baa9cdde 100644
--- a/src/renderer/routes/settings/cards/bt-peer-geo-section.test.tsx
+++ b/src/renderer/routes/settings/cards/bt-peer-geo-section.test.tsx
@@ -69,7 +69,7 @@ it('keeps preference changes in the outer draft and blocks Update until saved',
await user.click(
screen.getByRole('combobox', { name: 'Location data source' })
)
- await user.click(screen.getByRole('option', { name: 'Custom URL' }))
+ await user.click(await screen.findByRole('option', { name: 'Custom URL' }))
expect(
screen.getByRole('textbox', { name: 'Custom download URL' })
).toBeEnabled()