test: empty drafts list shows the create button with no ?tab (DataSpaceFrontend #471) - #137
Merged
Merged
Conversation
saqibmanan
marked this pull request as ready for review
September 25, 2026 14:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Source: CivicDataLab/DataSpaceFrontend#471 (merge
b6e9d8bf, merged todev2026-09-22). Base:CI.The merge's own dev deploy failed and rolled back. The later dev deploy of
8b5ac961(#476), which contains #471, succeeded, so dev is running this change.What changed (from the diff)
The Use Cases, Collaboratives and Datasets dashboard lists read their drafts/published tab from
?tab=. With no?tabin the URL the tab started asnull, and an effect set it todraftsonly after the first render. On Use Cases and Collaboratives, the empty-list branch shows "You have not added any … yet." plus the Add New … button only when the tab is'drafts'. Otherwise it shows "No Published … yet." with no button. An org with no drafts therefore had no way to start a create flow (thetest_prv_011timeouts). #471 makesdraftsthe default (parseAsString.withDefault('drafts')).Datasets is not covered: its empty state (
<Content>) shows Add New Dataset on either tab, so #471 did not change what it renders.What this adds
test_prv_015_empty_drafts_list_shows_create_button[usecases|collaboratives](smoke): logs in, opens an org's list page without?tab, and asserts the Drafts empty state (with its Add New button) rendered.canAddorgs with zero drafts of that kind (GraphQL,organizationheader). None → skip with the reason. It never creates anything to force the empty state. If a concurrent create flow adds a draft mid-test, it skips rather than going red.BasePage.list_view_state()returnsdrafts_empty/published_empty/rows, used by the newview_state()onUseCasesListPageandCollaborativesListPage. Locators live in their locator files.smokeso it runs on PRs inprovider-smoke, which already hasAPI_BASE_URLandKEYCLOAK_*. Read-only, but not markedreadonly: the provider suite never runs on prod.Proof (local, against dev, account 1)
Collected under CI's filter:
Green:
Red: loading
?tab=published, the same non-drafts branch the oldnulltab rendered:Reverted to the exact file of the green run above.
Gaps
/dashboard/self/…) lists are not covered; account 1 has drafts in all of them.