diff --git a/src/Explorer/Controls/Notebook/NotebookTerminalComponent.test.tsx b/src/Explorer/Controls/Notebook/NotebookTerminalComponent.test.tsx index fdc93adea..bd816ac31 100644 --- a/src/Explorer/Controls/Notebook/NotebookTerminalComponent.test.tsx +++ b/src/Explorer/Controls/Notebook/NotebookTerminalComponent.test.tsx @@ -32,6 +32,20 @@ const testCassandraAccount: DataModels.DatabaseAccount = { }, }; +const testPostgresAccount: DataModels.DatabaseAccount = { + ...testAccount, + properties: { + postgresqlEndpoint: "https://testPostgresEndpoint.azure.com/", + }, +}; + +const testVCoreMongoAccount: DataModels.DatabaseAccount = { + ...testAccount, + properties: { + vcoreMongoEndpoint: "https://testVCoreMongoEndpoint.azure.com/", + }, +}; + const testNotebookServerInfo: DataModels.NotebookWorkspaceConnectionInfo = { authToken: "authToken", notebookServerEndpoint: "https://testNotebookServerEndpoint.azure.com", @@ -50,6 +64,18 @@ const testCassandraNotebookServerInfo: DataModels.NotebookWorkspaceConnectionInf forwardingId: "Id", }; +const testPostgresNotebookServerInfo: DataModels.NotebookWorkspaceConnectionInfo = { + authToken: "authToken", + notebookServerEndpoint: "https://testNotebookServerEndpoint.azure.com/postgresql", + forwardingId: "Id", +}; + +const testVCoreMongoNotebookServerInfo: DataModels.NotebookWorkspaceConnectionInfo = { + authToken: "authToken", + notebookServerEndpoint: "https://testNotebookServerEndpoint.azure.com/mongovcore", + forwardingId: "Id", +}; + describe("NotebookTerminalComponent", () => { it("renders terminal", () => { const props: NotebookTerminalComponentProps = { @@ -94,4 +120,27 @@ describe("NotebookTerminalComponent", () => { const wrapper = shallow(); expect(wrapper).toMatchSnapshot(); }); + + it("renders Postgres shell", () => { + const props: NotebookTerminalComponentProps = { + databaseAccount: testPostgresAccount, + notebookServerInfo: testPostgresNotebookServerInfo, + tabId: undefined, + }; + + const wrapper = shallow(); + expect(wrapper).toMatchSnapshot(); + }); + + it("renders vCore Mongo shell", () => { + const props: NotebookTerminalComponentProps = { + databaseAccount: testVCoreMongoAccount, + notebookServerInfo: testVCoreMongoNotebookServerInfo, + tabId: undefined, + username: "username", + }; + + const wrapper = shallow(); + expect(wrapper).toMatchSnapshot(); + }); }); diff --git a/src/Explorer/Controls/Notebook/__snapshots__/NotebookTerminalComponent.test.tsx.snap b/src/Explorer/Controls/Notebook/__snapshots__/NotebookTerminalComponent.test.tsx.snap index a87a1c96d..440579141 100644 --- a/src/Explorer/Controls/Notebook/__snapshots__/NotebookTerminalComponent.test.tsx.snap +++ b/src/Explorer/Controls/Notebook/__snapshots__/NotebookTerminalComponent.test.tsx.snap @@ -1,5 +1,17 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`NotebookTerminalComponent renders Postgres shell 1`] = ` +
+