Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Add test coverage for Olivero. We can use Drupal\FunctionalTests\Theme\BartikTest
as an example for this.
Comment | File | Size | Author |
---|---|---|---|
#16 | interdiff-3135511-15-16.txt | 468 bytes | brianperry |
#16 | 3135511-16.patch | 4.31 KB | brianperry |
#15 | interdiff-3135511-5-11.txt | 2 KB | brianperry |
#15 | 3135511-15.patch | 4.29 KB | brianperry |
#11 | 3135511-11.patch | 4.56 KB | brianperry |
Comments
Comment #2
JayKandari* Created a basic functional test which checks if Olivero theme is installed correctly & checks if base.css is loaded or not.
* This also required updating the schema.yml file.
* Test required enabling of additional modules.
* Olivero module is installed in setup phase.
A sample local run in core 8.9.x :
Attached the patch. Kindly Review.
Comment #3
proeung@JayKandari Thanks for creating this issue and submitting a patch. I tested this patch on core 8.9.x and it works. Now we just need to test this against Core 9.0.0 to make sure the test runs correctly.
Comment #4
msuthars@JayKandari Thanks for the patch. Tested with Drupal Core 9.0.0 and found a depreciation issue.
Working on this depreciation issue.
Comment #5
msutharsUpdated the patch. The depreciation issue is fixed.
Comment #6
brianperryRunning this on 9.0 I get the following error:
Tried a few things but can't seem to figure out the cause.
Comment #7
msuthars@brianperry I run the test case with Drupal 9 and it works as expected.
I'm using ddev and sometimes I get that test case issue (#6) when my ddev stops. So I have to start it again and it works for me.
Comment #8
steinmb CreditAttribution: steinmb as a volunteer commentedTests are always good :) Have not run the test though we should make sure we are testing against latest version. Is there a reason there is no dev. release to lock issues to so we don't have to chase versions inside issues?
Comment #9
mherchelThis is documented as a must have in #3111409: Add new Olivero frontend theme to Drupal 9.1 core as beta
Comment #10
brianperryMy previous issues running this test were related to my VM configuration. All good now.
Grabbing this one and am working on adding some additional test coverage. First off I'm borrowing select tests from or inspired by the tests for Bartik (which the original patch covers) and Claro.
Beyond that, is there anything Olivero specific that we want to make sure we're testing? I'm sure there are a number of things we could add here, but we'll also need to be mindful of making sure the tests don't take too long to run.
Expect to have a patch for review in advance of the Monday meeting.
Comment #11
brianperryAttached a patch that adds some more test coverage. Still a little new to PHPUnit browser tests, so open to any feedback.
Based on the tests that these were modeled after, this file probably has to move to core/tests/Drupal/FunctionalTests/Theme when Olivero makes it into core.
Comment #12
brianperryI'm also working on some Nightwatch tests as well. Don't quite have a patch ready to share, but thinking it might make sense for it to be a separate issue anyway so we can separate our testing tech stack concerns.
Example of what I think would be useful as a Nightwatch test: testing mobile menu visibility.
Comment #14
steinmb CreditAttribution: steinmb as a volunteer commentedComment #15
brianperryUpdated tests to reference new css location and remove image style test. Also addressed the formatting things codesniffer was complaining about.
Comment #16
brianperryHey look - the tests passed :)
Attaching one more patch to address the coding standards issues mentioned in the CI results.
Comment #17
mherchelThis looks great! Thanks for all of the hard work on this!
Comment #19
mherchelCommitted. Thanks!