diff --git a/packages/frontend-shared/src/gql-components/HeaderBarContent.cy.tsx b/packages/frontend-shared/src/gql-components/HeaderBarContent.cy.tsx
index 6506ca26f7..60ac66dad2 100644
--- a/packages/frontend-shared/src/gql-components/HeaderBarContent.cy.tsx
+++ b/packages/frontend-shared/src/gql-components/HeaderBarContent.cy.tsx
@@ -370,7 +370,11 @@ describe('', { viewportWidth: 1000, viewportHeight: 750 }, (
...(options?.state ?? {}),
}
- result.currentProject.projectId = options?.projectId ?? null
+ const projectId = result.currentProject.config.find((item: {field: string, value: string}) => item.field = 'projectId')
+
+ if (projectId) {
+ projectId.value = options?.projectId
+ }
},
render: (gqlVal) =>
,
})
diff --git a/packages/frontend-shared/src/gql-components/HeaderBarContent.vue b/packages/frontend-shared/src/gql-components/HeaderBarContent.vue
index 5efe3bb72a..fb166ea083 100644
--- a/packages/frontend-shared/src/gql-components/HeaderBarContent.vue
+++ b/packages/frontend-shared/src/gql-components/HeaderBarContent.vue
@@ -157,7 +157,7 @@
v-model="isLoginOpen"
:gql="props.gql"
utm-medium="Nav"
- :show-connect-button-after-login="isApp && !props.gql?.currentProject?.projectId"
+ :show-connect-button-after-login="isApp && !cloudProjectId"
@connect-project="handleConnectProject"
/>
@@ -234,7 +234,6 @@ fragment HeaderBar_HeaderBarContent on Query {
savedState
currentTestingType
branch
- projectId
}
isGlobalMode
...TopNav
@@ -251,6 +250,10 @@ const savedState = computed(() => {
return props.gql?.currentProject?.savedState
})
+const cloudProjectId = computed(() => {
+ return props.gql?.currentProject?.config?.find((item: { field: string }) => item.field === 'projectId')?.value
+})
+
const currentProject = computed(() => props.gql.currentProject)
const isLoginOpen = ref(false)
@@ -336,7 +339,7 @@ function shouldShowPrompt (prompt: { slug: string, noProjectId: boolean, interva
// if prompt requires no project id,
// check if project id exists
- if (prompt.noProjectId && props.gql?.currentProject?.projectId) {
+ if (prompt.noProjectId && cloudProjectId.value) {
return false
}