Skip to content

Commit fc4f2a6

Browse files
committed
Add splitwise Hurl workflow
1 parent 6009dec commit fc4f2a6

1 file changed

Lines changed: 44 additions & 1 deletion

File tree

examples/splitwise/test.hurl

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/splitwise/test.hurl

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
GET http://localhost:8080/
2+
HTTP 200
3+
[Asserts]
4+
body contains "New shared expense account"
5+
6+
POST http://localhost:8080/
7+
Content-Type: application/x-www-form-urlencoded
8+
[FormParams]
9+
shared_expense_name: Hurl Trip
10+
HTTP 200
11+
[Captures]
12+
group_id: xpath "substring-after(string((//a[contains(., 'Hurl Trip')])[last()]/@href), 'id=')"
13+
[Asserts]
14+
body contains "Hurl Trip"
15+
16+
POST http://localhost:8080/group.sql?id={{group_id}}
17+
Content-Type: application/x-www-form-urlencoded
18+
[FormParams]
19+
new_member_name: Alice
20+
HTTP 200
21+
[Asserts]
22+
body contains "Alice"
23+
body contains "Add an expense"
24+
25+
POST http://localhost:8080/group.sql?id={{group_id}}
26+
Content-Type: application/x-www-form-urlencoded
27+
[FormParams]
28+
new_member_name: Bob
29+
HTTP 200
30+
[Captures]
31+
alice_id: xpath "string(//select[@name='Spent By']/option[normalize-space(.)='Alice']/@value)"
32+
[Asserts]
33+
body contains "Bob"
34+
35+
POST http://localhost:8080/group.sql?id={{group_id}}
36+
Content-Type: application/x-www-form-urlencoded
37+
`Description=Train+tickets&Amount=90&Spent+By={{alice_id}}`
38+
HTTP 200
39+
[Asserts]
40+
body contains "Train tickets"
41+
body contains "90 €"
42+
body contains "Debts by Person"
43+
body contains ""Alice",45"
44+
body contains ""Bob",-45"

0 commit comments

Comments
 (0)