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
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
@published-relation-template @mode:serial
Feature: Published database templates preserve relations
This scenario reuses the `pdf_db_relation@appflowy.io` fixture documented in
`AppFlowy-Cloud-Premium/backup/README.md`. Its `New Database` Grid has a
Relation field that points to `Related DB`, whose row title is
`Related DB content`. The matching server regression fixture is documented in
`tests/workspace/publish/duplication_test.rs` by
`publishing_only_database_with_relation_includes_related_database_in_template`.

Background:
Given the seeded relation template fixture exists

Scenario: Another account starts with a published database that has a relation
Given I sign in as the relation template fixture publisher
And the seeded relation cell resolves before publishing
When I publish only the seeded source database as a template
And another account opens the published relation template
Then the published relation cell shows "Related DB content"
When that account starts with the relation template in "General"
Then the destination space request uses depth 2
And the relation template duplication contains 2 database mappings
And the duplicated relation database is named "Related DB"
And the duplicated relation cell shows "Related DB content"
And the duplicated relation cell does not show "No access"
When I clear the duplication mappings and reload the duplicated relation template
Then the duplicated relation cell shows "Related DB content"
And the duplicated relation cell does not show "No access"
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
@published-document-template-dependencies @mode:serial
Feature: Published document templates preserve referenced content
These scenarios reuse the `duplicate@appflowy.io` fixture documented by
`AppFlowy-Cloud-Premium/tests/workspace/page_view/duplication_test.rs`.
Its `DB 1` database contains `db 1 row 1`, while `DB 2` contains the rows
`Row with linked database` and `Row with inline database`; each DB 2 row page
contains the corresponding nested database kind. Temporary source documents
are created in that fixture workspace and removed during teardown.

Every scenario publishes only the temporary root document. A newly registered,
different account then opens the public page, clicks "Start with this template",
adds it to General, and validates the resulting private workspace copy.

Background:
Given I sign in as the seeded document dependency publisher

Scenario: A document template deep-copies a referenced database view
Given a temporary document template contains a referenced view of database "DB 1"
And the source referenced database shows "db 1 row 1"
When I publish only the temporary document template
And a different account starts with the published document template in "General"
Then the duplicated referenced database shows "db 1 row 1"
And the duplicated referenced database remains available after reload

Scenario: A document template deep-copies an inline database view
Given a temporary document template contains an inline database with identifiable row data
When I publish only the temporary document template
And a different account starts with the published document template in "General"
Then the duplicated inline database has an independent database identity
And the duplicated inline database row remains available after reload

Scenario: A document template deep-copies a referenced page
Given a temporary document template contains a reference to another temporary page
When I publish only the temporary document template
And a different account starts with the published document template in "General"
Then the duplicated page reference points to a new accessible page copy

Scenario: A referenced database preserves a nested referenced database in a row page
Given a temporary document template contains a referenced view of nested fixture database "DB 2"
And the source referenced database contains nested rows "Row with linked database" and "Row with inline database"
When I publish only the temporary document template
And a different account starts with the published document template in "General"
Then the duplicated referenced database contains nested rows "Row with linked database" and "Row with inline database"
And row "Row with linked database" has an available nested referenced database
And the nested database in row "Row with linked database" remains available after reload

Scenario: A referenced database preserves a nested inline database in a row page
Given a temporary document template contains a referenced view of nested fixture database "DB 2"
And the source referenced database contains nested rows "Row with linked database" and "Row with inline database"
When I publish only the temporary document template
And a different account starts with the published document template in "General"
Then the duplicated referenced database contains nested rows "Row with linked database" and "Row with inline database"
And row "Row with inline database" has an available nested inline database
And the nested database in row "Row with inline database" remains available after reload
Loading
Loading