diff --git a/packages/browser-tests/cypress/integration/console/panel.spec.js b/packages/browser-tests/cypress/integration/console/panel.spec.js
new file mode 100644
index 000000000..512fe8db9
--- /dev/null
+++ b/packages/browser-tests/cypress/integration/console/panel.spec.js
@@ -0,0 +1,27 @@
+///
+
+const baseUrl = "http://localhost:9999";
+
+describe("URL deep linking", () => {
+ it("should show import panel", () => {
+ cy.visit(`${baseUrl}/?bottomPanel=p2`);
+ cy.get('[data-hook="import-dropbox"]').should("be.visible");
+ cy.matchImageSnapshot();
+ });
+
+ it("should show news panel", () => {
+ cy.visit(`${baseUrl}/?sidebar=p1`);
+ cy.get('[data-hook="news-content"]').should("be.visible");
+ cy.get('[data-hook="news-panel-button"]').click();
+ cy.url().should("not.contain", "sidebar=news");
+ cy.matchImageSnapshot();
+ });
+
+ it("should show create table panel", () => {
+ cy.visit(`${baseUrl}/?sidebar=p2`);
+ cy.get('[data-hook="schema-content"]').should("be.visible");
+ cy.get('[data-hook="create-table-panel-button"]').click();
+ cy.url().should("not.contain", "sidebar=create");
+ cy.matchImageSnapshot();
+ });
+});
diff --git a/packages/web-console/src/components/CreateTableDialog/index.tsx b/packages/web-console/src/components/CreateTableDialog/index.tsx
index 2644c43f8..a2ccb5420 100644
--- a/packages/web-console/src/components/CreateTableDialog/index.tsx
+++ b/packages/web-console/src/components/CreateTableDialog/index.tsx
@@ -38,12 +38,12 @@ export const CreateTableDialog = () => {
}
useEffect(() => {
- setAddTableDialogOpen(activeSidebar === "create" ? "add" : undefined)
+ setAddTableDialogOpen(activeSidebar === "p2" ? "add" : undefined)
}, [activeSidebar])
useEffect(() => {
if (addTableDialogOpen !== undefined) {
- dispatch(actions.console.setActiveSidebar("create"))
+ dispatch(actions.console.setActiveSidebar("p2"))
}
}, [addTableDialogOpen])
@@ -72,7 +72,7 @@ export const CreateTableDialog = () => {
onClick: () => {
dispatch(
actions.console.setActiveSidebar(
- addTableDialogOpen ? undefined : "create",
+ addTableDialogOpen ? undefined : "p2",
),
)
},
diff --git a/packages/web-console/src/components/TableSchemaDialog/dialog.tsx b/packages/web-console/src/components/TableSchemaDialog/dialog.tsx
index f61fb51eb..09ba480ac 100644
--- a/packages/web-console/src/components/TableSchemaDialog/dialog.tsx
+++ b/packages/web-console/src/components/TableSchemaDialog/dialog.tsx
@@ -193,13 +193,14 @@ export const Dialog = ({
}}
onOpenChange={(isOpen) => {
if (isOpen && action === "add") {
- dispatch(
- actions.console.setActiveSidebar(isOpen ? "create" : undefined),
- )
+ dispatch(actions.console.setActiveSidebar(isOpen ? "p2" : undefined))
}
}}
>
-
+