Skip to content

Commit d593953

Browse files
committed
wip
1 parent a279ec9 commit d593953

File tree

3 files changed

+19
-22
lines changed

3 files changed

+19
-22
lines changed

Tests/CSS+PointFreeHTML Tests/AccentColor Tests.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,11 @@ struct AccentColorTests {
3232
<html>
3333
<head>
3434
<style>
35-
.accent-color-dMYaj4{accent-color:red}
36-
35+
.accent-color-dMYaj4{accent-color:red}
3736
</style>
3837
</head>
3938
<body>
40-
<div class="accent-color-dMYaj4">
41-
</div>
39+
<div class="accent-color-dMYaj4"></div>
4240
</body>
4341
</html>
4442
"""

Tests/HTML+CSS+PointFreeHTML Tests/HTML+CSS+PointFree Tests.swift

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ import Testing
1717
"HTML+CSS+PointFreeHTML Tests",
1818
.snapshots(record: nil)
1919
)
20-
struct Tests {
21-
@Test("Labeled Input renders correctly in a div")
22-
func labeledInputInDiv() {
20+
struct IntegrationTests {
21+
@Test("HTML Elements with attributes and styles")
22+
func labeledInputInDivWithStyle() {
2323
assertInlineSnapshot(
2424
of: HTMLDocument {
2525
ContentDivision {
2626
Label {
2727
"label-text"
2828
Input.text
29-
.color(.red)
29+
.color(.blue)
3030
}
31-
.color(.red)
31+
.color(.red)
3232
}
3333
},
3434
as: .html
@@ -39,20 +39,19 @@ struct Tests {
3939
<head>
4040
<style>
4141
.color-dMYaj4{color:red}
42+
.color-jiDhg4{color:blue}
4243
4344
</style>
4445
</head>
4546
<body>
46-
<div><label class="color-dMYaj4">label-text<input class="color-dMYaj4" type="text"></label>
47+
<div><label class="color-dMYaj4">label-text<input class="color-jiDhg4" type="text"></label>
4748
</div>
4849
</body>
4950
</html>
5051
"""
5152
}
5253
}
5354

54-
55-
5655
@Test("General2")
5756
func general2() {
5857
assertInlineSnapshot(

Tests/HTMLElements+PointFreeHTML Tests/<label> Label Tests.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@ struct LabelTests {
2323
}
2424
}
2525

26-
@Test("Label with 'for' attribute renders correctly")
27-
func labelWithForAttributeRendersCorrectly() {
28-
assertInlineSnapshot(
29-
of: Label(for: "username") {
30-
"Enter your username:"
31-
Input(name: "username", type: .text(.init()))
32-
},
33-
as: .html
34-
) {
26+
@Test("Label with 'for' attribute renders correctly")
27+
func labelWithForAttributeRendersCorrectly() {
28+
assertInlineSnapshot(
29+
of: Label(for: "username") {
30+
"Enter your username:"
31+
Input(name: "username", type: .text(.init()))
32+
},
33+
as: .html
34+
) {
3535
"""
3636
<label for="username">Enter your username:<input type="text" name="username"></label>
3737
"""
38+
}
3839
}
3940
}
40-
}

0 commit comments

Comments
 (0)