- Issue created by @junkuncz
- 🇭🇺Hungary junkuncz Budapest
Do not use the patch file, there is a MR instead of that.
- Issue was unassigned.
- Status changed to Needs review
12 months ago 8:18am 22 December 2023 - Status changed to Needs work
12 months ago 5:06pm 24 December 2023 - 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU
Not only metatag v2, also schema_metetag v3.
I didn't know the (schema_)metatag code yet so I had a look. My impression:
- For testing metatag, it feels fine to me to test only one tag (title, in your case the 'title' tag. (Multiple tags don't really test multiple pieces of code- and/or that's metatag's job,)
- (lupus_decoupled_)schema_metatag does exercise different code so you should add a basic test for that too. That is:
- enable lupus_decoupled_schema_metatag, which changes the JSON structure (adds "jsonld" subsection)
- configure at least one schema_metatag. for instance: enable schema_web_page and enable a schema metatag for "Content" e.g. set Breadcrumb to Yes, or configure a Description. (Again, I think it doesn't really matter what or which value/token - if you test one tag, we can assume the setup works. But you have to test it shows up in the right place.
- If you want to see how the configuration works, check config/import examples in the LDP distribution and/or the configuration screen for metatag (after enabling e.g. schema_web_page)
- 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU
Oh and I expect that then, you can't really depend on the neat order of properties anymore -- so you may as well JSON-decode all the metatags for testing -- including the title in your current test...
- Status changed to Needs review
12 months ago 5:20pm 1 January 2024 - 🇭🇺Hungary junkuncz Budapest
Hey @roderik,
Thank you for the nice, detailed review first.
Changes have been added based on that.- -
setUp()
method is tuned to be able to create a node with schema data ("schema_web_page_description") - - I separated the logic of the metag and schema tag to different methods
- - json response is currently converted to and associative array and it's asserted by conditions (maybe there's a better approach but I think for now it should be ok)
I look forward to your comments.
- -
- Status changed to Needs work
12 months ago 8:01am 3 January 2024 - 🇭🇺Hungary junkuncz Budapest
Okay keep hold on until https://www.drupal.org/project/lupus_decoupled/issues/3409409 🐛 Respect installations with base paths Needs review is completed. Currently we are in "dark" in the CI. (tests are green locally).
- Status changed to Needs review
12 months ago 11:58am 9 January 2024 - 🇭🇺Hungary junkuncz Budapest
Bruhh I made some mess here.. anyways the tests are working and I also added changes by Roderik's remarks.
Ready for review now: https://git.drupalcode.org/project/lupus_decoupled/-/merge_requests/72 -
fago →
committed 7fcbe135 on 1.x authored by
junkuncz →
Issue #3410175 by junkuncz, roderik: Add test coverage for metatag and...
-
fago →
committed 7fcbe135 on 1.x authored by
junkuncz →
- Status changed to Fixed
12 months ago 12:24pm 11 January 2024 Automatically closed - issue fixed for 2 weeks with no activity.