Add test coverage for InstagramBlockBlock
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | interdiff-11-13.txt | 2.79 KB | yanniboi |
| #13 | add_test_coverage_for-2795183-13.patch | 5.15 KB | yanniboi |
Add test coverage for InstagramBlockBlock
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | interdiff-11-13.txt | 2.79 KB | yanniboi |
| #13 | add_test_coverage_for-2795183-13.patch | 5.15 KB | yanniboi |
Comments
Comment #2
yanniboi commentedSo it turns out that there is missing schema for instagram block settings (ie. count, width, height, etc).
This is a test that should fail because of missing schema.
Comment #3
yanniboi commentedI've added the schema for this patch so it should pass.
Comment #4
yanniboi commentedNormally I would want a separate issue for the schema fix, but since we are playing catchup with test coverage, I will be leaving it in this issue.
Comment #6
naveenvalechaWe don't need this schema
We need to do this test for all core themes.
// Test availability of block in the admin 'Place blocks' list.
\Drupal::service('theme_handler')->install(['bartik', 'seven', 'stark']);
$theme_settings = $this->config('system.theme');
foreach (['bartik', 'seven', 'stark'] as $theme) {
....
}
See reference how its done in sharethis module http://cgit.drupalcode.org/sharethis/tree/src/Tests/SharethisBlockTest.p...
Comment #7
yanniboi commentedTrust me, I have spent a lot of time on core schema bugs. We need this. If nothing else the fact that it fixes the test fail proves that.
Comment #8
yanniboi commentedAdded test for checking 'instagram block' is a option in the 'place block' selection listings for core themes.
Comment #9
naveenvalechaI'll cross check this later tonightEdit : I have cross checked it its needed :) I was about to sleep that time, mind sucks sometime
Comment #10
yanniboi commentedNo problem, here is some more reference:
This is how the aggregator module adds block settings schema in aggregator.links.menu.yml:
AggregatorFeedBlock.php
And also some screenshots of the output from config_inspector module with and without patch:
Comment #11
yanniboi commentedRe-roll needed after commit of #2778667: Move User id settings from global settings on block specific settings.
Comment #13
yanniboi commentedComment #14
naveenvalechaupdate the description here as the user has more administrative permisssions
We also need to place the blocks for these theme and check on the homepage/other node page that whether the block is showing/not
Comment #15
yanniboi commentedI don't think we can test actual rendering...
I am (obviously) not using actual instagram account user id and access token, so there is no actual response from instagram and it does not render the block in the test.
Comment #16
naveenvalechaLet;s add a separate issue to discuss how can we test the rendering. Let's get this in
Comment #18
yanniboi commentedComment #19
yanniboi commentedFollow up issue for render testing #2796971: Add test coverage for Instagram Block rendering