- Issue created by @wim leers
- ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
๐ Introduce unit test coverage for both ComponentSource plugins (Block + SDC) Active is in!
That added
ComponentSourceTestBase::testRenderComponentLive()
.This issue's summary proposed
/** * @dataProvider providerRenderComponent */ public function testRenderComponent(array $inputs, string $componentUuid, bool $isPreview = FALSE, ?\Exception $expected_exception, string $expected_output): { }
That signature was not viable in #3501290, because that issue aimed to test all discovered components of the tested
ComponentSource
.Do you have a proposal, @f.mazeikis? Perhaps what we want is a
testRenderComponentFailure()
instead with that signature? ๐ค - Merge request !899Draft: Resolve #3517966 "Pp 1 failing kernel" โ (Open) created by Unnamed author
- ๐ฌ๐งUnited Kingdom f.mazeikis Brighton
Well, I've used the signature you've suggested as a suggestion and made some changes. I also renamed the method to
testRenderComponentFailure()
.I have added SDC and Block Plugin that fails by default by intentionally throwing exceptions when passed
TRUE
as value for "crash" prop/input. By default, the value isTRUE
. These new component sources are currently part ofxb_test_block
andxb_test_sdc
test modules.At the moment this causes failures of Functional tests for a bunch of endpoints and the recently introduced
testRenderComponentLive()
in SDC and Block tests. By the way, what does "Live" part oftestRenderComponentLive()
refers to? Don't think I've seen this term used before in XB Components context.I am not sure if that was what @wim-leers expected? I could move them into some sort of "xb_test_failures" submodules and somewhat "limit the damage". Or is the intent is to go the other way around and make even more breakage, so we can spot all the potential issues?
- ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
By the way, what does "Live" part of
testRenderComponentLive()
refers to? Don't think I've seen this term used before in XB Components context.It refers to it using
isPreview: FALSE
. I didn't like the name, but needed to unblock this ๐ Suggestions VERY welcome! ๐At the moment this causes failures of Functional tests for a bunch of endpoints a
That's because
xb_test_sdc
is installed by a bunch of tests; we shouldn't default to crashing โ that immediately fixes those widespread failures!I am not sure if that was what @wim-leers expected?
This is definitely looking like the direction I asked for!
But this was not yet proving
used as a component instance in an XB component tree does NOT make the rest of the component tree unusable
. See review feedback, and partial implementation.