test(e2e): pass the catalog owner to the remaining catalog fetches and creates (#27338)

* test(e2e): pass the catalog owner to the remaining project-group and folder fetches

* test(e2e): pass the owner to folder-workspace and project-group creates

---------

Co-authored-by: m4air <m4air@Mac.localdomain>
This commit is contained in:
OrcaWin
2026-10-10 17:49:32 -07:00
committed by GitHub
co-authored by m4air
parent 91f9744d3a
commit 43fbd2389f
9 changed files with 55 additions and 38 deletions
+9 -6
View File
@@ -129,12 +129,15 @@ test.describe('PDF in a folder workspace', () => {
parentPath: folderPath,
createdFrom: 'folder-scan'
})
await state.fetchProjectGroups()
const folder = await state.createFolderWorkspace({
projectGroupId: group.id,
name: 'PDF documents',
folderPath
})
await state.fetchProjectGroups({ runtimeEnvironmentId: null })
const folder = await state.createFolderWorkspace(
{
projectGroupId: group.id,
name: 'PDF documents',
folderPath
},
{ runtimeEnvironmentId: null }
)
if (!folder) {
throw new Error('Missing fixture folder')
}
@@ -563,8 +563,8 @@ async function runSelectedRuntimeAddJourney(
if (!store) {
throw new Error('Renderer store unavailable')
}
await store.getState().fetchProjectGroups()
await store.getState().fetchFolderWorkspaces()
await store.getState().fetchProjectGroups({ runtimeEnvironmentId: null })
await store.getState().fetchFolderWorkspaces({ runtimeEnvironmentId: null })
return {
folderWorkspaces: store.getState().folderWorkspaces,
projectGroups: store.getState().projectGroups
@@ -87,7 +87,7 @@ for (const delayCreateResponse of [false, true]) {
})
}
const creation = orcaPage.evaluate(() =>
window.__store!.getState().createProjectGroup('Crowded group')
window.__store!.getState().createProjectGroup('Crowded group', 'local')
)
if (delayCreateResponse) {
try {
@@ -163,7 +163,9 @@ for (const delayCreateResponse of [false, true]) {
}
}
await expect(group).toHaveCount(1)
await orcaPage.evaluate(() => window.__store!.getState().fetchProjectGroups())
await orcaPage.evaluate(() =>
window.__store!.getState().fetchProjectGroups({ runtimeEnvironmentId: null })
)
await expect(group).toHaveCount(1)
await group.click()
for (const repo of groupedRepos) {
+2 -2
View File
@@ -92,7 +92,7 @@ async function seedProjectHeaderSortScenario(
let repos = findSeededRepos()
const deadline = Date.now() + 10_000
while (repos.some((repo) => !repo) && Date.now() < deadline) {
await state.fetchRepos()
await state.fetchRepos({ runtimeEnvironmentId: null })
repos = findSeededRepos()
if (repos.every((repo) => repo)) {
break
@@ -136,7 +136,7 @@ async function seedDuplicateTabOrderProjectGroups(
const groups = []
for (const name of groupNames) {
const created = await state.createProjectGroup(name)
const created = await state.createProjectGroup(name, 'local')
if (!created) {
throw new Error(`Failed to create Project Group: ${name}`)
}
@@ -31,14 +31,17 @@ for (const theme of ['dark', 'light'] as const) {
parentPath: folder.folderPath,
createdFrom: 'folder-scan'
})
await state.fetchProjectGroups()
await state.fetchProjectGroups({ runtimeEnvironmentId: null })
if (!group) {
throw new Error('Could not create project group')
}
const workspace = await state.createFolderWorkspace({
projectGroupId: group.id,
...folder
})
const workspace = await state.createFolderWorkspace(
{
projectGroupId: group.id,
...folder
},
{ runtimeEnvironmentId: null }
)
if (!workspace) {
throw new Error('Could not create folder workspace')
}
@@ -93,15 +96,18 @@ test('names a folder terminal recovered from the daemon after restart without an
parentPath: folderPath,
createdFrom: 'folder-scan'
})
await state.fetchProjectGroups()
await state.fetchProjectGroups({ runtimeEnvironmentId: null })
if (!group) {
throw new Error('Could not create project group')
}
const folder = await state.createFolderWorkspace({
projectGroupId: group.id,
name: 'Recovered notes',
folderPath
})
const folder = await state.createFolderWorkspace(
{
projectGroupId: group.id,
name: 'Recovered notes',
folderPath
},
{ runtimeEnvironmentId: null }
)
if (!folder) {
throw new Error('Could not create folder workspace')
}
@@ -23,12 +23,15 @@ test('cycles visible folder workspaces with shortcuts and focused list arrows',
parentPath,
createdFrom: 'folder-scan'
})
await store.getState().fetchProjectGroups()
const folder = await store.getState().createFolderWorkspace({
projectGroupId: group.id,
name: 'Folder workspace',
folderPath: parentPath
})
await store.getState().fetchProjectGroups({ runtimeEnvironmentId: null })
const folder = await store.getState().createFolderWorkspace(
{
projectGroupId: group.id,
name: 'Folder workspace',
folderPath: parentPath
},
{ runtimeEnvironmentId: null }
)
const repo = store.getState().repos[0]
const [first, last] = repo ? (store.getState().worktreesByRepo[repo.id] ?? []) : []
if (!folder || !repo || !first || !last) {
@@ -123,7 +123,7 @@ test('keeps a collapsed group visible when an idle card below it grows', async (
if (!member || !collapsed || !expanded) {
throw new Error('Expected three fixture repos')
}
const group = await store.getState().createProjectGroup('Research gang')
const group = await store.getState().createProjectGroup('Research gang', 'local')
if (!group) {
throw new Error('Fixture group was not created')
}
+10 -7
View File
@@ -136,13 +136,16 @@ async function connectFolderOnlyTarget(
parentPath: folderPath,
connectionId: added.target.id
})
await store.getState().fetchProjectGroups()
const workspace = await store.getState().createFolderWorkspace({
projectGroupId: group.id,
name: 'Layout oracle SSH folder',
folderPath,
connectionId: added.target.id
})
await store.getState().fetchProjectGroups({ runtimeEnvironmentId: null })
const workspace = await store.getState().createFolderWorkspace(
{
projectGroupId: group.id,
name: 'Layout oracle SSH folder',
folderPath,
connectionId: added.target.id
},
{ runtimeEnvironmentId: null }
)
if (!workspace) {
throw new Error('Folder workspace was not created')
}
@@ -27,7 +27,7 @@ test('locally controlled project-group modal keeps child-toggle input', async ({
if (!parent) {
throw new Error('Missing parent')
}
const group = await store.getState().createProjectGroup('Shortcut dialog group')
const group = await store.getState().createProjectGroup('Shortcut dialog group', 'local')
if (!group) {
throw new Error('Missing project group')
}