Closed (fixed)
Project:
Metatag
Version:
2.0.x-dev
Component:
Tests
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
10 Aug 2020 at 15:58 UTC
Updated:
7 Dec 2022 at 20:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
damienmckennaComment #3
damienmckennaWorking on this.
Comment #4
damienmckennaWIP, just so I don't loose it.
Comment #5
damienmckennaFurther WIP.
Comment #6
damienmckennaThe first part now works - form submission.
Next up: form field validation, output validation, then update all the submodules.
Comment #7
damienmckennaComment #8
damienmckennaRerolled.
Comment #9
damienmckennaThis includes a complete rewrite of the main module's tag tests. Next off I'll finish updating the submodule tests.
This will definitely require a few change notices as there are a lot of API changes going on. Will also need to look at how to much of the API changes can be added to 1.x so they're properly deprecated, rather than just dropping a large pile of surprises on 2.x.
Comment #10
damienmckennaThis includes quite an extensive amount of work and will need a bunch of change notices for what's included.
Along the way I realized that we need to deprecate the GooglePlus tags so that they can be removed in 2.0, so I created a new issue for that: #3298081: Deprecate Google Plus meta tags
Let's see how well the tests run on drupalci.
Comment #12
damienmckennaThe separate testMaskIconCurrent test method is no longer necessary because of the refactored test.
Comment #13
damienmckennaSome of this needs to be split out into a separate issue so we can properly deprecate some APIs, there are several @todo items that need new issues, and it needs some refinement. But the tests now finally pass correctly! Woot!
I also noticed that it drops from 377 test instantiations that take 12 minutes to run, to 121 and just under 7 minutes. This is a massive improvement and I can't wait to commit it!
Comment #14
damienmckennaSome improvements.
Comment #15
damienmckennaGeneral improvements to the tests, some of which will need to be split out into separate issues.
Comment #17
damienmckennaThis should fix the two regressions.
Comment #18
damienmckennaBack to needing work on the change records and splitting out some of the changes to other issues.
Comment #19
damienmckenna(wrong issue)
Comment #20
damienmckennaOut of interest, what happens if all of the submodules are enabled in the main module?
Comment #22
damienmckennaThis should resolve the test failure.
Comment #25
damienmckennaForgot the 'use' statement.
Comment #26
damienmckennaNote: I'm not specifically intending to do all submodule testing from the main module, I just wanted to see how it performed.
Comment #27
damienmckennaInterestingly enough, running all of the submodule tests in one go took eight minutes, a whole minute slower than running each submodule separately. I think that's a good indicator that we should stick with patch #17.
Now, back to splitting out pieces.
Comment #28
damienmckennaI opened #3299222 for the bugs identified in metatag_mobile.
Comment #29
damienmckennaI opened #3299225 to fix the title tag's test coverage.
Comment #30
damienmckennaI opened #3299228 to refactor the favicon meta tag plugins.
Comment #31
damienmckennaRerolled after some other changes were committed. Also, a minor change to metatag.services.yml to make it easier to work with.
Comment #33
damienmckennaIn the interest of properly handling backwards compatibility, I think we need another issue that creates the new class files and deprecates the old ones, then commit this one to the 2.0.0 branch and remove the old classes. And add a change notice.
Comment #34
damienmckennaFixed the favicon tests.
Comment #35
damienmckennaBack to needing further work.
Comment #36
damienmckennaChanges that need to go into 8.x-1.x first:
* metatag.services.yml
* $modules variables need to be "protected".
* MetaNameBase::$htmlTag
* MetaNameBase::$htmlNameAttribute
* MetaNameBase::$htmlValueAttribute
* MetaNameBase::isImage()
* MetaNameBase::isSecure()
* MetaNameBase::isMultiple()
* MetaNameBase::isUrl()
* MetaNameBase::getTestFormXpath()
* MetaNameBase::getTestFormData()
* MetaNameBase::getTestOutputExistsXpath()
* MetaNameBase::getTestOutputValuesXpath()
* .. and all overrides of the new MetaNameBase attributes and methods.
Comment #37
damienmckennaThe protected-modules change was committed in #3302675.
Comment #38
damienmckennaSome of the additional small changes were committed in #3302685.
Comment #39
damienmckennaRerolled after some of the other commits.
Comment #40
damienmckennaI updated the issue summary to note tasks that are already completed and what's left to do.
Comment #41
damienmckennaBack to needing more work.
Comment #42
damienmckennaI added #3302969 for the improvements to MetaNameBase.
Comment #43
damienmckenna#3302969 was committed, so this needs to be updated again.
Comment #44
damienmckennaRerolled.
Comment #46
damienmckennaComment #47
damienmckennaAn initial change record is available: https://www.drupal.org/node/3305570
Comment #48
damienmckennaRerolled.
Comment #49
damienmckennaCommitted. Woot!
Comment #50
damienmckenna