Updated the event tagging for the AnalyticsEvent+Tagging extension in the Infrastructure package to support attribute-capable tags.

This commit is contained in:
2026-09-04 14:57:29 +02:00
parent a9a62e10df
commit a71edd37ab
3 changed files with 13 additions and 2 deletions
@@ -46,4 +46,14 @@ struct AnalyticsEventTaggingTests {
#expect(attributes.count == event.attributes.count)
}
@Test
func `applies the event name to an SVG tag`() {
// `SVGTag.path` is no `HTMLTrait.Attributes.Global`, so this stops compiling if the method narrows back to HTML tags.
let rendered = SVG.path {}
.attributes(contentsOf: Analytics.Event(name: "logo").tagging())
.render()
#expect(rendered.contains(#"data-umami-event="logo""#))
}
}