Skip to content

Commit f33e9cb

Browse files
committed
remove htmx tags from test assertions for now
1 parent 00431a9 commit f33e9cb

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/authoring/Framework/HtmlAssertions.fs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ open System.Diagnostics
99
open System.IO
1010
open AngleSharp.Diffing
1111
open AngleSharp.Diffing.Core
12+
open AngleSharp.Dom
1213
open AngleSharp.Html
1314
open AngleSharp.Html.Parser
1415
open DiffPlex.DiffBuilder
@@ -89,6 +90,17 @@ actual: {actual}
8990
match querySelector with
9091
| Some q -> document.QuerySelector q
9192
| None -> document.Body
93+
94+
let links = element.QuerySelectorAll("a")
95+
links
96+
|> Seq.iter(fun l ->
97+
l.RemoveAttribute "hx-select-oob" |> ignore
98+
l.RemoveAttribute "hx-swap" |> ignore
99+
l.RemoveAttribute "hx-indicator" |> ignore
100+
l.RemoveAttribute "hx-push-url" |> ignore
101+
l.RemoveAttribute "preload" |> ignore
102+
)
103+
92104
use sw = new StringWriter()
93105
let formatter = PrettyMarkupFormatter()
94106
element.Children

0 commit comments

Comments
 (0)