Skip to content

Commit 60b1195

Browse files
committed
Add light-dark toggle Hurl workflow
1 parent 491c7bb commit 60b1195

1 file changed

Lines changed: 29 additions & 1 deletion

File tree

examples/light-dark-toggle/test.hurl

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
GET http://localhost:8080/
2+
HTTP 200
3+
[Asserts]
4+
body contains "Toggle Light / Dark Mode"
5+
body contains "Categories"
6+
body contains "☀"
7+
body not contains "An error occurred"
8+
9+
GET http://localhost:8080/toggle.sql
10+
Referer: http://localhost:8080/
11+
HTTP 302
12+
[Asserts]
13+
header "Set-Cookie" contains "lightdarkstatus=dark"
14+
header "Location" == "http://localhost:8080/"
15+
16+
GET http://localhost:8080/biography.sql
17+
HTTP 200
18+
[Asserts]
19+
body contains "Biography"
20+
body contains "Morbi fermentum"
21+
body contains "data-bs-theme=\"dark\""
22+
body not contains "An error occurred"
23+
24+
GET http://localhost:8080/toggle.sql
25+
Referer: http://localhost:8080/biography.sql
26+
HTTP 302
27+
[Asserts]
28+
header "Set-Cookie" contains "lightdarkstatus="
29+
header "Location" == "http://localhost:8080/biography.sql"

0 commit comments

Comments
 (0)