- Issue created by @traviscarden
- πΊπΈUnited States traviscarden
I've added a WIP branch to show the current state of my work while I attend to another priority. I've got a basic framework (that can probably be extracted for more generalized use later). It's going well, but
wse
seems to break Core's workspace test utilities, since they work until I enable it:TypeError : Drupal\Tests\wse_config\Functional\WseSimpleConfigTest::createAndActivateWorkspaceThroughUi(): Return value must be of type Drupal\workspaces\WorkspaceInterface, null returned /var/www/html/web/core/modules/workspaces/tests/src/Functional/WorkspaceTestUtilities.php:73 /var/www/html/web/modules/contrib/wse/modules/wse_config/tests/src/Functional/WseSimpleConfigTest.php:99
That's where I'll pick up when I get back.
- π·π΄Romania amateescu
I think the test case laid out in the IS is an excellent starting point, thanks for working on this!
The error from #2 is caused by
wse_workspace_presave()
, which overrides the workspace ID with its UUID before saving. This is needed because core's assumption that workspace IDs should be reused after publishing doesn't match the expected content editor experience on most sites.Until this is fixed in core, you should use
\Drupal\Tests\wse\Functional\WseTestUtilities::wseCreateAndActivateWorkspaceThroughUi()
instead of the core trait. - πΊπΈUnited States traviscarden
Thank you, @amateescu; that was an important piece of knowledge.
When I created this issue, I thought simple config staging was supposed to already be supported, so I'm changing this to a feature request, and I'm presuming to mark it "Major" since it's in the critical path for Experience Builder.
The draft MR I created above adds failing tests that are basically complete for the happy path. They should be enough to prove that the basic functionality works. Then we can proceed to add tests for secondary functionality, edge cases, and error-handling, etc.
I'm going to move on to writing tests for other functionality in the meantime.