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.

Command icon 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

Wim Leers created an issue. See original summary.

Wim Leers credited lauriii.

wim leers’s picture

This would've prevented @lauriii from having to file #3461430: TypeError on a clean installation. He marked that as Critical, so that helps justify this issue's priority 👍

wim leers’s picture

Title: [PP-1] End-to-end test that tests both the client (UI) and server » End-to-end test that tests both the client (UI) and server
bnjmnm’s picture

MR 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.

wim leers’s picture

wim leers’s picture

bnjmnm’s picture

Assigned: bnjmnm » Unassigned
Status: Active » Needs review
wim leers’s picture

Looks great! Just one major question about appConfiguration (introduced in #3452582) vs drupalSettings, 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! 😊

jessebaker’s picture

Assigned: jessebaker » bnjmnm

Back to @bnjmnm - comments on MR

bnjmnm’s picture

Assigned: bnjmnm » wim leers

I think it just needs @Wim Leers signoff on the MR and we're good.

wim leers’s picture

Assigned: wim leers » Unassigned
Status: Needs review » Reviewed & tested by the community

Just one remark about how both main.ts (to populate appConfiguration) and dummyPropsForm needed to interact with drupalSettings, 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.

  • Wim Leers committed d19b05b1 on 0.x authored by bnjmnm
    Issue #3461435 by bnjmnm, Wim Leers, lauriii, jessebaker: End-to-end...
wim leers’s picture

Status: Reviewed & tested by the community » Fixed

Now we're properly off to the races! 🐎 😄

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.