diff options
Diffstat (limited to 'packages/cli/src/ui/App.test.tsx')
| -rw-r--r-- | packages/cli/src/ui/App.test.tsx | 90 |
1 files changed, 47 insertions, 43 deletions
diff --git a/packages/cli/src/ui/App.test.tsx b/packages/cli/src/ui/App.test.tsx index 6a019ab6..2547714c 100644 --- a/packages/cli/src/ui/App.test.tsx +++ b/packages/cli/src/ui/App.test.tsx @@ -278,6 +278,7 @@ describe('App UI', () => { user?: Partial<Settings>; workspace?: Partial<Settings>; } = {}, + isTrusted = true, ): LoadedSettings => { const systemSettingsFile: SettingsFile = { path: '/system/settings.json', @@ -296,6 +297,7 @@ describe('App UI', () => { userSettingsFile, workspaceSettingsFile, [], + isTrusted, ); }; @@ -377,9 +379,9 @@ describe('App UI', () => { const { unmount } = renderWithProviders( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, + mockSettings, ); currentUnmount = unmount; @@ -403,9 +405,9 @@ describe('App UI', () => { const { lastFrame, unmount } = renderWithProviders( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, + mockSettings, ); currentUnmount = unmount; @@ -433,9 +435,9 @@ describe('App UI', () => { const { lastFrame, unmount } = renderWithProviders( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, + mockSettings, ); currentUnmount = unmount; @@ -463,9 +465,9 @@ describe('App UI', () => { const { lastFrame, unmount } = renderWithProviders( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, + mockSettings, ); currentUnmount = unmount; @@ -497,9 +499,9 @@ describe('App UI', () => { const { unmount } = renderWithProviders( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, + mockSettings, ); currentUnmount = unmount; @@ -526,9 +528,9 @@ describe('App UI', () => { const { lastFrame, unmount } = renderWithProviders( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, + mockSettings, ); currentUnmount = unmount; await Promise.resolve(); @@ -545,9 +547,9 @@ describe('App UI', () => { const { lastFrame, unmount } = renderWithProviders( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, + mockSettings, ); currentUnmount = unmount; await Promise.resolve(); @@ -581,9 +583,9 @@ describe('App UI', () => { const { lastFrame, unmount } = renderWithProviders( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, + mockSettings, ); currentUnmount = unmount; await Promise.resolve(); @@ -609,9 +611,9 @@ describe('App UI', () => { const { lastFrame, unmount } = renderWithProviders( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, + mockSettings, ); currentUnmount = unmount; await Promise.resolve(); @@ -630,9 +632,9 @@ describe('App UI', () => { const { lastFrame, unmount } = renderWithProviders( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, + mockSettings, ); currentUnmount = unmount; await Promise.resolve(); // Wait for any async updates @@ -651,9 +653,9 @@ describe('App UI', () => { const { lastFrame, unmount } = renderWithProviders( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, + mockSettings, ); currentUnmount = unmount; await Promise.resolve(); @@ -672,9 +674,9 @@ describe('App UI', () => { const { lastFrame, unmount } = renderWithProviders( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, + mockSettings, ); currentUnmount = unmount; await Promise.resolve(); @@ -699,9 +701,9 @@ describe('App UI', () => { const { lastFrame, unmount } = renderWithProviders( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, + mockSettings, ); currentUnmount = unmount; await Promise.resolve(); @@ -724,9 +726,9 @@ describe('App UI', () => { const { lastFrame, unmount } = renderWithProviders( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, + mockSettings, ); currentUnmount = unmount; await Promise.resolve(); @@ -745,9 +747,9 @@ describe('App UI', () => { const { lastFrame, unmount } = renderWithProviders( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, + mockSettings, ); currentUnmount = unmount; await Promise.resolve(); @@ -769,9 +771,9 @@ describe('App UI', () => { const { lastFrame, unmount } = renderWithProviders( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, + mockSettings, ); currentUnmount = unmount; await Promise.resolve(); @@ -791,9 +793,9 @@ describe('App UI', () => { const { lastFrame, unmount } = renderWithProviders( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, + mockSettings, ); currentUnmount = unmount; await Promise.resolve(); @@ -804,9 +806,9 @@ describe('App UI', () => { const { unmount } = renderWithProviders( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, + mockSettings, ); currentUnmount = unmount; await Promise.resolve(); @@ -814,18 +816,21 @@ describe('App UI', () => { }); it('should not display Tips component when hideTips is true', async () => { - mockSettings = createMockSettings({ - workspace: { - hideTips: true, + mockSettings = createMockSettings( + { + workspace: { + hideTips: true, + }, }, - }); + true, + ); const { unmount } = renderWithProviders( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, + mockSettings, ); currentUnmount = unmount; await Promise.resolve(); @@ -837,9 +842,9 @@ describe('App UI', () => { const { unmount } = renderWithProviders( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, + mockSettings, ); currentUnmount = unmount; await Promise.resolve(); @@ -855,9 +860,9 @@ describe('App UI', () => { const { unmount } = renderWithProviders( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, + mockSettings, ); currentUnmount = unmount; await Promise.resolve(); @@ -868,9 +873,9 @@ describe('App UI', () => { const { lastFrame, unmount } = renderWithProviders( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, + mockSettings, ); currentUnmount = unmount; await Promise.resolve(); @@ -906,9 +911,9 @@ describe('App UI', () => { const { lastFrame, unmount } = renderWithProviders( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, + mockSettings, ); currentUnmount = unmount; await Promise.resolve(); @@ -926,9 +931,9 @@ describe('App UI', () => { const { unmount } = renderWithProviders( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, + mockSettings, ); currentUnmount = unmount; await Promise.resolve(); @@ -956,9 +961,9 @@ describe('App UI', () => { const { lastFrame, unmount } = renderWithProviders( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, + mockSettings, ); currentUnmount = unmount; @@ -971,9 +976,9 @@ describe('App UI', () => { const { lastFrame, unmount } = renderWithProviders( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, + mockSettings, ); currentUnmount = unmount; @@ -986,9 +991,9 @@ describe('App UI', () => { const { lastFrame, unmount } = renderWithProviders( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, + mockSettings, ); currentUnmount = unmount; expect(lastFrame()).toMatchSnapshot(); @@ -1006,9 +1011,9 @@ describe('App UI', () => { const { lastFrame, unmount } = renderWithProviders( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, + mockSettings, ); currentUnmount = unmount; expect(lastFrame()).toMatchSnapshot(); @@ -1036,9 +1041,9 @@ describe('App UI', () => { const { unmount, rerender } = renderWithProviders( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, + mockSettings, ); currentUnmount = unmount; @@ -1046,7 +1051,6 @@ describe('App UI', () => { rerender( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, ); @@ -1078,9 +1082,9 @@ describe('App UI', () => { const { lastFrame, unmount } = renderWithProviders( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, + mockSettings, ); currentUnmount = unmount; await Promise.resolve(); @@ -1104,9 +1108,9 @@ describe('App UI', () => { const { unmount } = renderWithProviders( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, + mockSettings, ); currentUnmount = unmount; @@ -1126,9 +1130,9 @@ describe('App UI', () => { const { unmount } = renderWithProviders( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, + mockSettings, ); currentUnmount = unmount; @@ -1146,9 +1150,9 @@ describe('App UI', () => { const { lastFrame, unmount } = renderWithProviders( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, + mockSettings, ); currentUnmount = unmount; expect(lastFrame()).toMatchSnapshot(); @@ -1172,9 +1176,9 @@ describe('App UI', () => { const { lastFrame, unmount } = renderWithProviders( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, + mockSettings, ); currentUnmount = unmount; @@ -1194,9 +1198,9 @@ describe('App UI', () => { const { lastFrame, unmount } = renderWithProviders( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, + mockSettings, ); currentUnmount = unmount; await Promise.resolve(); @@ -1214,9 +1218,9 @@ describe('App UI', () => { const { lastFrame, unmount } = renderWithProviders( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, + mockSettings, ); currentUnmount = unmount; await Promise.resolve(); @@ -1234,9 +1238,9 @@ describe('App UI', () => { const { lastFrame, unmount } = renderWithProviders( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, + mockSettings, ); currentUnmount = unmount; await Promise.resolve(); @@ -1483,9 +1487,9 @@ describe('App UI', () => { const { lastFrame, unmount } = renderWithProviders( <App config={mockConfig as unknown as ServerConfig} - settings={mockSettings} version={mockVersion} />, + mockSettings, ); currentUnmount = unmount; |
