Overview
Until #3455898: Connect client & server, with zero changes to client (UI): rough working endpoints that mimic the UI's mocks, the client and server side were independently developed.
Since that, #3455728: FieldType: Support storing component *trees* instead of *lists* changed something on the server side without the necessary corresponding change in SdcController::preview(), which resulted in broken previews. #3452512: Add component instance edit form to contextual panel is fixing that, but is not yet introducing end-to-end tests that actually test the integration of the client side with the server side.
\Drupal\Tests\experience_builder\Functional\EndToEndDemoIntegrationTest was added >1 month ago in e #3452497: [MR Only] Edit any component prop, powered by a new FieldForComponentSuggester service, which will power the JS UI but tests only the throwaway TwoTerribleTextAreasWidget, but as of #3455728: FieldType: Support storing component *trees* instead of *lists* we're now getting closer to being able to get rid of TwoTerribleTextAreasWidget 👍 (first step: #3461422: Evolve component instance edit form to become simpler: generate a Field Widget directly).
Proposed resolution
Update tests/src/Cypress/cypress/e2e/xb-general.cy.js to actually test both the client and server, with the client actually talking to the server. Until now, xb-general.js was talking to the mock server!
User interface changes
Zero.
Issue fork experience_builder-3461435
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
wim leersThis would've prevented @lauriii from having to file #3461430: TypeError on a clean installation. He marked that as , so that helps justify this issue's priority 👍
Comment #4
wim leers#3452512: Add component instance edit form to contextual panel landed! This can now be worked on. 👍
Comment #5
bnjmnmMR I'm pushing up is built on top of #3461101: Remove dependency on sdc_test as the changes there make it unnecessary to manually add components.
Comment #6
wim leers#5: #3461435: End-to-end test that tests both the client (UI) and server is in 👍
Comment #7
wim leersAFAICT #3461809: Cypress teardown should check for dbUrl truthiness, not length and #3461584: <Viewport> hard codes ids, leading to multiple. were discovered while working on this?
Also: #3452585: CI: Cypress test infrastructure clean-up: split in `cypress E2E` +`cypress unit` CI jobs landed, so updating the issue summary :)
Comment #9
wim leersFound the root cause for the
phpcsfailures: #3462143: CI: phpcs job failing due to upstream changes in Drupal core: unused variables in catch statements now disallowed.Comment #12
bnjmnmComment #13
wim leersLooks great! Just one major question about
appConfiguration(introduced in #3452582) vsdrupalSettings, and I have a concrete proposal that AFAICT should work fine: https://git.drupalcode.org/project/experience_builder/-/merge_requests/1...If @jessebaker could review it from the front-end perspective, then @bnjmnm can address our feedback and we can land this important milestone later today! 😊
Comment #14
jessebaker commentedBack to @bnjmnm - comments on MR
Comment #15
bnjmnmI think it just needs @Wim Leers signoff on the MR and we're good.
Comment #16
wim leersJust one remark about how both
main.ts(to populateappConfiguration) anddummyPropsFormneeded to interact withdrupalSettings, but holding off merging this super important (because very stabilizing) MR on that makes no sense.See https://git.drupalcode.org/project/experience_builder/-/merge_requests/1....
@hooroomoo is out today and is the owner for
/submodules/xb_vite/. But the change being made to that is more Drupal-back-end-related than it is hot module reloading related, so I'm bypassing the need for their approval.Comment #18
wim leersNow we're properly off to the races! 🐎 😄