Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

chore: Fix the local studio tests (#32836)

Ivan Vasilovbf49d8ab7deb
diff --git a/apps/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.tsx b/apps/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.tsx
index b7a426be08d..17cfc2ff933 100644
--- a/apps/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.tsx
+++ b/apps/studio/components/layouts/ProjectLayout/NavigationBar/NavigationBar.tsx
@@ -60,10 +60,12 @@ const NavigationBar = () => {
const [userDropdownOpen, setUserDropdownOpenState] = useState(false)
- const [allowNavPanelToExpand] = useLocalStorageQuery(
+ const [storedAllowNavPanel] = useLocalStorageQuery(
LOCAL_STORAGE_KEYS.EXPAND_NAVIGATION_PANEL,
true
)
+ // Don't allow the nav panel to expand in playwright tests
+ const allowNavPanelToExpand = process.env.NEXT_PUBLIC_NODE_ENV !== 'test' && storedAllowNavPanel
return (
<div className="w-14 h-full hidden md:flex flex-col">
@@ -100,10 +102,12 @@ export const NavContent = () => {
const isNewAPIDocsEnabled = useIsAPIDocsSidePanelEnabled()
const [userDropdownOpen, setUserDropdownOpenState] = useState(false)
- const [allowNavPanelToExpand] = useLocalStorageQuery(
+ const [storedAllowNavPanel] = useLocalStorageQuery(
LOCAL_STORAGE_KEYS.EXPAND_NAVIGATION_PANEL,
true
)
+ // Don't allow the nav panel to expand in playwright tests
+ const allowNavPanelToExpand = process.env.NEXT_PUBLIC_NODE_ENV !== 'test' && storedAllowNavPanel
const {
projectAuthAll: authEnabled,
diff --git a/apps/studio/components/layouts/ProjectLayout/NavigationBar/NavigationIconLink.tsx b/apps/studio/components/layouts/ProjectLayout/NavigationBar/NavigationIconLink.tsx
index 10b58a17030..76ef56f4be1 100644
--- a/apps/studio/components/layouts/ProjectLayout/NavigationBar/NavigationIconLink.tsx
+++ b/apps/studio/components/layouts/ProjectLayout/NavigationBar/NavigationIconLink.tsx
@@ -23,10 +23,13 @@ const NavigationIconLink = forwardRef<HTMLAnchorElement, NavigationIconButtonPro
({ route, isActive = false, onClick = noop, ...props }, ref) => {
const snap = useAppStateSnapshot()
- const [allowNavPanelToExpand] = useLocalStorageQuery(
+ const [storedAllowNavPanel] = useLocalStorageQuery(
LOCAL_STORAGE_KEYS.EXPAND_NAVIGATION_PANEL,
true
)
+ // Don't allow the nav panel to expand in playwright tests
+ const allowNavPanelToExpand = process.env.NEXT_PUBLIC_NODE_ENV !== 'test' && storedAllowNavPanel
+
const iconClasses = [
'absolute left-0 top-0 flex rounded items-center h-10 w-10 items-center justify-center text-foreground-lighter', // Layout
'group-hover/item:text-foreground-light',
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index fc0fee2bbb4..9d4957b36be 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -76,10 +76,10 @@ importers:
version: 1.2.0
next:
specifier: 'catalog:'
next-contentlayer2:
specifier: 0.4.6
next-themes:
specifier: ^0.3.0
@@ -329,7 +329,7 @@ importers:
version: 1.0.1
next:
specifier: 'catalog:'
next-mdx-remote:
specifier: ^4.4.1
@@ -338,13 +338,13 @@ importers:
version: 1.0.1
next-seo:
specifier: ^6.5.0
next-themes:
specifier: ^0.3.0
nuqs:
specifier: ^1.19.1
openai:
specifier: ^4.20.1
@@ -549,7 +549,7 @@ importers:
'@sentry/nextjs':
specifier: ^8.34.0
'@stripe/react-stripe-js':
specifier: ^3.1.1
@@ -588,7 +588,7 @@ importers:
version: 10.3.1([email protected])
'@vercel/flags':
specifier: ^2.6.0
'@vitejs/plugin-react':
specifier: ^4.2.1
@@ -681,13 +681,13 @@ importers:
version: 0.33.0
next:
specifier: 'catalog:'
next-themes:
specifier: ^0.3.0
nuqs:
specifier: ^1.17.8
openai:
specifier: ^4.20.1
@@ -958,7 +958,7 @@ importers:
version: 2.4.11([email protected])
next-router-mock:
specifier: ^0.9.13
postcss:
specifier: ^8.4.31
version: 8.4.38
@@ -1069,16 +1069,16 @@ importers:
version: 1.2.0
next:
specifier: 'catalog:'
next-contentlayer2:
specifier: 0.5.3
next-mdx-remote:
specifier: ^4.4.1
next-seo:
specifier: ^6.5.0
next-themes:
specifier: ^0.3.0
@@ -1326,7 +1326,7 @@ importers:
version: 0.7.12
'@vercel/flags':
specifier: ^2.6.0
api-types:
specifier: workspace:*
version: link:../api-types
@@ -1341,7 +1341,7 @@ importers:
version: 4.17.21
next:
specifier: 'catalog:'
next-themes:
specifier: ^0.3.0
@@ -1610,7 +1610,7 @@ importers:
version: 0.436.0([email protected])
next:
specifier: 'catalog:'
next-themes:
specifier: ^0.3.0
@@ -1812,7 +1812,7 @@ importers:
version: 0.33.0
next:
specifier: 'catalog:'
next-themes:
specifier: '*'
@@ -1909,7 +1909,7 @@ importers:
version: link:../api-types
next-router-mock:
specifier: ^0.9.13
typescript:
specifier: ~5.5.0
version: 5.5.2
@@ -1920,8 +1920,8 @@ importers:
tests/local-studio-tests:
devDependencies:
'@playwright/test':
- specifier: ^1.41.2
- version: 1.41.2
+ specifier: ^1.49.0
+ version: 1.49.1
packages:
@@ -3575,9 +3575,9 @@ packages:
resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==}
engines: {node: '>=14'}
- '@playwright/[email protected]':
- resolution: {integrity: sha512-qQB9h7KbibJzrDpkXkYvsmiDJK14FULCCZgEcoe2AvFAS64oCirWTwzTlAYEbKaRxWs5TFesE1Na6izMv3HfGg==}
- engines: {node: '>=16'}
+ '@playwright/[email protected]':
+ resolution: {integrity: sha512-Ky+BVzPz8pL6PQxHqNRW1k3mIyv933LML7HktS8uik0bUXNCdPhoS/kLihiO1tMf/egaJb4IutXd7UywvXEW+g==}
+ engines: {node: '>=18'}
hasBin: true
@@ -9970,14 +9970,14 @@ packages:
resolution: {integrity: sha512-+ifYuSSqOQ8CqP4MbZA5hDpb97n3E8SVWdJe+Wms9kj745lmd3b7EZJiqvmLwAlmRfjrI7Hi5z3kdBJ93lFNPA==}
- resolution: {integrity: sha512-VaTvwCA4Y8kxEe+kfm2+uUUw5Lubf38RxF7FpBxLPmGe5sdNkSg5e3ChEigaGrX7qdqT3pt2m/98LiyvU2x6CA==}
- engines: {node: '>=16'}
+ resolution: {integrity: sha512-BzmpVcs4kE2CH15rWfzpjzVGhWERJfmnXmniSyKeRZUs9Ws65m+RGIi7mjJK/euCegfn3i7jvqWeWyHe9y3Vgg==}
+ engines: {node: '>=18'}
hasBin: true
- resolution: {integrity: sha512-v0bOa6H2GJChDL8pAeLa/LZC4feoAMbSQm1/jF/ySsWWoaNItvrMP7GEkvEEFyCTUYKMxjQKaTSg5up7nR6/8A==}
- engines: {node: '>=16'}
+ resolution: {integrity: sha512-VYL8zLoNTBxVOrJBbDuRgDWa3i+mfQgDTrL8Ah9QXZ7ax4Dsj0MSq5bYgytRnDVVe+njoKnfsYkH3HzqVj5UZA==}
+ engines: {node: '>=18'}
hasBin: true
@@ -14671,9 +14671,9 @@ snapshots:
optional: true
- '@playwright/[email protected]':
+ '@playwright/[email protected]':
dependencies:
- playwright: 1.41.2
+ playwright: 1.49.1
'@polka/[email protected]': {}
@@ -15857,7 +15857,7 @@ snapshots:
'@sentry/types': 8.34.0
'@sentry/utils': 8.34.0
dependencies:
'@opentelemetry/instrumentation-http': 0.53.0(@opentelemetry/[email protected])([email protected])
'@opentelemetry/semantic-conventions': 1.27.0
@@ -15872,7 +15872,7 @@ snapshots:
'@sentry/vercel-edge': 8.34.0
'@sentry/webpack-plugin': 2.22.3([email protected])([email protected])([email protected])
chalk: 3.0.0
resolve: 1.22.8
rollup: 3.29.5
stacktrace-parser: 0.1.10
@@ -17066,11 +17066,11 @@ snapshots:
'@use-gesture/core': 10.3.1
react: 18.2.0
dependencies:
jose: 5.2.1
optionalDependencies:
react: 18.2.0
react-dom: 18.2.0([email protected])
@@ -22304,12 +22304,12 @@ snapshots:
dependencies:
'@contentlayer2/utils': 0.4.3
react: 18.2.0
react-dom: 18.2.0([email protected])
transitivePeerDependencies:
@@ -22318,12 +22318,12 @@ snapshots:
- markdown-wasm
- supports-color
dependencies:
'@contentlayer2/utils': 0.5.3
react: 18.2.0
react-dom: 18.2.0([email protected])
transitivePeerDependencies:
@@ -22347,14 +22347,14 @@ snapshots:
dependencies:
js-yaml-loader: 1.2.2
dependencies:
react: 18.2.0
dependencies:
react: 18.2.0
react-dom: 18.2.0([email protected])
@@ -22363,7 +22363,7 @@ snapshots:
react: 18.2.0
react-dom: 18.2.0([email protected])
dependencies:
'@next/env': 14.2.21
'@swc/helpers': 0.5.5
@@ -22385,7 +22385,7 @@ snapshots:
'@next/swc-win32-ia32-msvc': 14.2.21
'@next/swc-win32-x64-msvc': 14.2.21
'@opentelemetry/api': 1.9.0
- '@playwright/test': 1.41.2
+ '@playwright/test': 1.49.1
sass: 1.72.0
transitivePeerDependencies:
- '@babel/core'
@@ -22537,10 +22537,10 @@ snapshots:
dependencies:
mitt: 3.0.1
optional: true
@@ -22940,11 +22940,11 @@ snapshots:
mlly: 1.7.1
pathe: 1.1.2
dependencies:
- playwright-core: 1.41.2
+ playwright-core: 1.49.1
optionalDependencies:
fsevents: 2.3.2
diff --git a/tests/local-studio-tests/package.json b/tests/local-studio-tests/package.json
index 74671d01b25..99cd16f1586 100644
--- a/tests/local-studio-tests/package.json
+++ b/tests/local-studio-tests/package.json
@@ -17,6 +17,6 @@
"author": "",
"license": "ISC",
"devDependencies": {
- "@playwright/test": "^1.41.2"
+ "@playwright/test": "^1.49.0"
}
}