- Issue created by @justafish
- Merge request !1186Issue #3532130: Add a test verifying the component loading is broken β (Merged) created by justafish
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
Adding π Move `PropSourceEndpointTest` into new `XbConfigEntityHttpApiTest::testComponent()` Active where we plan to just remove this from that API
Given the whack-a-mole this creates with tests, going to be bold and just remove it here. We can add the new API in π Move `PropSourceEndpointTest` into new `XbConfigEntityHttpApiTest::testComponent()` Active - π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
This looks ready to me and fixes HEAD
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Agreed with @larowlan that basically doing a subset of π Move `PropSourceEndpointTest` into new `XbConfigEntityHttpApiTest::testComponent()` Active here to make CI green again is a good idea.
But there's 2 things I don't understand:
- why
xb_test_sdc
can't be installed as part of the recipe: https://git.drupalcode.org/project/experience_builder/-/merge_requests/1... - why most functionality was moved out of the test recipe that the Playwright CI job uses, and into the test
- why
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
I couldn't find MR comments, d.o comments nor commit messages explaining why we need to strip down
tests/fixtures/recipes/test_site/recipe.yml
so much. Trying to restore it, piece-by-piece. - π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
From failing hard like
The configuration 'experience_builder.component.js.xb_test_code_components_ using_imports' exists already and does not match the recipe's configuration
β https://git.drupalcode.org/project/experience_builder/-/jobs/5666583
to partially like
- Expected - 1 + Received + 0 @@ -6,11 +6,10 @@ - heading "meow!" [level=1] - paragraph: this is a hero - link "View": - /url: https://drupal.org - button "Click" - - text: Component With props, Hello Kitty, 50 years old.
β https://git.drupalcode.org/project/experience_builder/-/jobs/5666899
Feels like I'm tantalizingly close.
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Some demo content seems to not be getting created:
- Expected - 14 + Received + 2 - - heading "Homepage" [level=1] - - heading "Welcome to the site!" [level=1] - - paragraph: - - text: Example value for - - strong: the_body - - text: slot in - - strong: prop-slots - - text: component. - - text: Example value for <strong>the_footer</strong>. - - link "Home": - - /url: / - - img "Home" - - link "Drupal": - - /url: / + - heading "Page not found" [level=1] + - text: The requested page could not be found.
But this makes little sense: this is a default
Page
content entity; how could that not have been created?!So, added explicit test coverage for it to
\Drupal\Tests\experience_builder\Kernel\EventSubscriber\RecipeSubscriberTest
. - π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
I tried to bring back as much of @phenaproxima's β¨ To support site templates, ensure component definitions are rebuilt while applying recipes Active as I could.
In doing so:
- I made the
test_site
recipe more explicit, and added comments that I believe will be helpful for maintaining this recipe going forward - duplicated what
\xb_dev_standard_install()
does into the recipe itself, to hopefully eventually drop that hook (and thexb_dev_standard
module altogether β created π Remove the `xb_dev_standard` module, instead recommend using XB's `test_site` recipe for development Active for this) - expanded the
RecipeSubscriberTest
test coverage to assert that a number of things that the Playwright tests failed on along the way, do in fact work β¦ just not when done through Drush (which is what Playwright uses) π€ͺ β see #8 + #9
For the bits I could not figure out in a reasonable amount of time in #6 + #7 + #8 + #9, I opened π XB's `test_site` recipe fails to install its default content through Drush in Playwright Active and assigned to @phenaproxima.
Note that this is not a recent regression, but an assumption that's been present for about a year (back when we still had a
ApiComponentsController
)! It made it impossible to use XB if there was >=1 enabledsdc
-sourcedComponent
and noarticle
node type π (Which makes sense: for the first many months of XB's existence, we were hardcoding the installing of an XB field into the article node type!) - I made the
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Argh,
JsComponentTest::testRenderComponentLive()
now fails because it needed those UUIDs to be set to ensure predictable generated JS files on disk. Only possible solution:strict: false
, because this is a bug in Recipes. - π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Created upstream bug report at π \Drupal\Core\Recipe\ConfigConfigurator unsets the uuid of active configuration, but it should only do that if the recipe data does not contain a UUID Active .
-
wim leers β
committed b253cf70 on 0.x authored by
justafish β
Issue #3532130 by wim leers, justafish, larowlan: `/xb/api/v0/config/...
-
wim leers β
committed b253cf70 on 0.x authored by
justafish β
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Great find, @justafish! ππ