-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: standard theme color metadata setting two metas #881
test: standard theme color metadata setting two metas #881
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @davidlj95 and the rest of your teammates on |
7f11b44
to
bbe366a
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #881 +/- ##
=======================================
Coverage 98.14% 98.14%
=======================================
Files 83 83
Lines 377 377
Branches 70 70
=======================================
Hits 370 370
Misses 3 3
Partials 4 4 ☔ View full report in Codecov by Sentry. |
📦 Bundle size (Angular v16)Git ref:
|
📦 Bundle size (Angular v18)Git ref:
|
📦 Bundle size (Angular v15)Git ref:
|
📦 Bundle size (Angular v17)Git ref:
|
bbe366a
to
a82990b
Compare
🎉 This PR is included in version 1.0.0-beta.19 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Issue or need
After trying to rebuild the APIs to set
<meta>
elements on the page (NgxMetaMetaService
,NgxMetaMetaDefinition
, ...), inspected how Angular'sMeta
APIs workAnd at that point in time wondered what happens with the case that more than one multiple
<meta>
element with samename
is valid. Like in the case of standard's<meta name='theme-color'>
.So added some E2E tests to see what happens when trying to add 2
<meta name='theme-color'>
. One for dark mode and another for the default (light) mode.Turns out that the API wasn't working as intended when trying to insert more than one
<meta>
. 2 elements are expected if providing an array with two elements.However just one is created and later updated. Which makes sense given we call Angular's
Meta.updateTag
API.Proposed changes
Add E2E tests to reflect the issue & avoid it from happening in the future.
In #919 new APIs to manage
<meta>
elements are used around. So this should fix the issue. Adding here the tests then to ensure it doesn't repeat again.Quick reminders