Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"dependencies": {
"@babel/core": "^7.22.9",
"@codemirror/lang-json": "^6.0.0",
"@conduction/nextcloud-vue": "^2.19.0",
"@conduction/nextcloud-vue": "^2.21.0",
"@nextcloud/auth": "^2.6.0",
"@nextcloud/axios": "^2.5.0",
"@nextcloud/capabilities": "^1.2.1",
Expand Down
8 changes: 4 additions & 4 deletions src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -831,15 +831,15 @@
{
"id": "Flows",
"route": "/flows",
"type": "flows",
"type": "index",
"title": "Flows",
"config": { "app": "stackiq" },
"_note": "ADR-110 Decision 4: a flow is app-specific, so the authoring surface lives here rather than behind a deep link to another app's list. Rendered by the shared CnFlowsPage page type over OpenRegister's one native flow store (ADR-065), scoped to this app."
"config": { "entitySource": "flows", "app": "stackiq" },
"_note": "ADR-110 Decision 4: a flow is app-specific, so the authoring surface lives here rather than behind a deep link to another app's list. An ordinary index over the named `flows` source (config.entitySource) rather than the deprecated `flows` page type, reading OpenRegister's one native flow store (ADR-065), scoped to this app by config.app."
},
{
"id": "FlowDetail",
"route": "/flows/:id",
"type": "flow-detail",
"type": "flow",
"title": "Flow",
"config": { "app": "stackiq" },
"_note": "The shared CnFlowDetail canvas over the same single engine. Controls render in the NC app sidebar so the canvas keeps full width."
Expand Down
40 changes: 36 additions & 4 deletions tests/e2e/workflows/crud-persistence.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,40 @@ import {
type VoorzieningenConfig,
} from './_fixtures'

/**
* Wait for the edit dialog after an `Edit` row action, wherever it opens.
*
* Since nextcloud-vue 2.21 (#806) a record whose schema has a same-schema
* DETAIL page is edited on that page, not in a modal launched from the table:
* the modal renders only the schema's flat scalars and cannot express a record
* whose related rows live elsewhere. `CnPageRenderer` sets `editOpensDetail`
* from `detailPageByRegisterSchema`.
*
* Which route applies is a property of the SCHEMA, so this branches instead of
* assuming. Either way it returns a real, visible edit dialog — the assertion
* is not weakened, only its route.
*
* @param page The Playwright page.
* @return The visible edit dialog locator.
*/
async function editDialogAfterEdit(page: import('@playwright/test').Page) {
const dialog = page.locator('[role="dialog"], .modal-container').first()
const direct = await dialog
.waitFor({ state: 'visible', timeout: 5000 })
.then(() => true)
.catch(() => false)
if (!direct) {
const headerEdit = page.getByRole('button', { name: /^Edit$/ }).first()
await expect(
headerEdit,
'detail page header Edit button visible',
).toBeVisible({ timeout: 15000 })
await headerEdit.click()
await dialog.waitFor({ state: 'visible', timeout: 15000 })
}
return dialog
}

let apiCtx: APIRequestContext
let cfg: VoorzieningenConfig

Expand Down Expand Up @@ -204,8 +238,7 @@ test.describe('Contactpersoon CRUD-persistence', () => {

await openRowActions(page, contactsUid)
await clickAction(page, 'Edit')
const editDialog = page.locator('[role="dialog"], .modal-container').first()
await editDialog.waitFor({ state: 'visible', timeout: 15000 })
const editDialog = await editDialogAfterEdit(page)

// The editor is populated from the persisted row — the values we created
// read back into the form (detail read-back persistence).
Expand All @@ -231,8 +264,7 @@ test.describe('Contactpersoon CRUD-persistence', () => {
await openRowActions(page, contactsUid)
await clickAction(page, 'Edit')

const editDialog = page.locator('[role="dialog"], .modal-container').first()
await editDialog.waitFor({ state: 'visible', timeout: 15000 })
const editDialog = await editDialogAfterEdit(page)
// The edit form is pre-filled with the existing UID — proves the row
// loaded into the editor (read-back persistence).
await expect(
Expand Down
Loading