- Issue created by @wim leers
- πΊπΈUnited States bnjmnm Ann Arbor, MI
wim leers β credited bnjmnm β .
- πΊπΈUnited States tedbow Ithaca, NY, USA
wim leers β credited tedbow β .
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
This is really on the XB infrastructure side, but not getting this right makes components of a specific (or all)
ComponentSource
plugins behave oddly and will be perceived as bugs in the affected components of those sources.So: putting this under π± [META] Production-ready ComponentSource plugins Active .
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
- Merge request !999#3521128 change XBTestSetup to aggregate css and js β (Merged) created by tedbow
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
@tedbow: Please:
- also enable CSS + JS aggregation for
\Drupal\Tests\experience_builder\Functional\XbPageVariantTest
to ensure we have pure BE test coverage (because I doubt the end-to-end tests test the live site, they AFAIK only test the XB editing UX) - do a final round of manual testing with a code component that has an auto-save entry, and verify that this also works as the anonymous user.
- also enable CSS + JS aggregation for
- πΊπΈUnited States tedbow Ithaca, NY, USA
re #8
also enable CSS + JS aggregation for \Drupal\Tests\experience_builder\Functional\XbPageVariantTest
Since
XbPageVariantTest extends FunctionalTestBase
enabled it in FunctionalTestBase so we don't write functional tests that only work aggregation off. But if there is fail I can switch toXbPageVariantTest
is needed.Doing the manual testing now
- πΊπΈUnited States tedbow Ithaca, NY, USA
-
re #12
Instead of enabling aggregation for
XbPageVariantTest
I enabled aggregation in\Drupal\Tests\experience_builder\Functional\FunctionalTestBase::setUp
which is the base test thatXbPageVariantTest
extends. This way all our functional tests will run with CSS aggregation on not justXbPageVariantTest
.I since found the only test that fails in this situation is
\Drupal\Tests\experience_builder\Functional\AssetLibraryAttachmentTest
because we are checking for CSS and JS file paths in the HTML, so I disabled aggregation just for this test - During manual testing I was finding weird behavior where the code component do not look like do in the editor preview. This affects user 1 also with aggregation off. I have tried testing on 0.x and still see the problem. so I am investigating that.
-
re #12
- πΊπΈUnited States tedbow Ithaca, NY, USA
re #13.2 that seems to be known side effect of π Compile Tailwind CSS globally for code components Active . It will be fixed by π Global AssetLibrary should render with its auto-saved state (if any) when rendered in the XB UI Active
Postponing on #3508937 because it will be easier to test after that
- πΊπΈUnited States tedbow Ithaca, NY, USA
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Trivial conflict resolution.
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Legitimate failure:
Tried to find [href*="components/my-hero/my-hero.css"] in <head>
Due to this test assuming non-aggregation:
// Confirm that the iframe loads the SDC CSS. cy.getIframe( '[data-xb-preview="lg"][data-test-xb-content-initialized="true"][data-xb-swap-active="true"]', ) .its('head') .should('not.be.undefined') .then((head) => { expect( head.querySelector( 'link[rel="stylesheet"][href*="components/my-hero/my-hero.css"]', ), `Tried to find [href*="components/my-hero/my-hero.css"] in <head> ${head.innerHTML}`, ).to.exist; });
- πΊπΈUnited States tedbow Ithaca, NY, USA
working on the fix. I think for now we should allow e2e test to opt of aggregation
- πΊπΈUnited States bnjmnm Ann Arbor, MI
Requested a few changes in the MR.
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
For @tedbow's question on the MR.
- πΊπΈUnited States tedbow Ithaca, NY, USA
@bnjmnm thanks for the review. I implemented your suggestions, though one in slightly different way, see MR comments.
Let me know
the phpunit test failures is from π JavaScriptComponentValidationTest::testInvalidSlotIdentifiedByConfigSchema fails Active , so unrelated
- πΊπΈUnited States bnjmnm Ann Arbor, MI
Clarified in MR what I was requesting with the new
describe()
- πΊπΈUnited States tedbow Ithaca, NY, USA
component-operations.cy.js is failing on 1 test but it does fail randomly on CI. Checked locally and it passes for me
- πΊπΈUnited States bnjmnm Ann Arbor, MI
Yep the component-operations.cy.js fail is something I've seen elsewhere and unlikely to be related to the changes here.
-
wim leers β
committed 95761a75 on 0.x authored by
tedbow β
Issue #3521128 by tedbow, wim leers, bnjmnm: Ensure XB works with CSS +...
-
wim leers β
committed 95761a75 on 0.x authored by
tedbow β
Automatically closed - issue fixed for 2 weeks with no activity.