Skip to content

Commit 389dbf4

Browse files
committed
Add PostGIS and official site Hurl flows
1 parent 7ba428e commit 389dbf4

2 files changed

Lines changed: 125 additions & 2 deletions

File tree

examples/PostGIS - using sqlpage with geographic data/test.hurl

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
GET http://localhost:8080/
2+
HTTP 200
3+
[Asserts]
4+
body contains "Points of interest"
5+
body contains "Add a point"
6+
body not contains "An error occurred"
7+
8+
POST http://localhost:8080/add_point.sql
9+
[FormParams]
10+
Title: Hurl Paris
11+
Latitude: 48.8566
12+
Longitude: 2.3522
13+
Text: First Hurl point
14+
HTTP 302
15+
[Asserts]
16+
header "Location" == "index.sql"
17+
18+
POST http://localhost:8080/add_point.sql
19+
[FormParams]
20+
Title: Hurl Lyon
21+
Latitude: 45.764
22+
Longitude: 4.8357
23+
Text: Second Hurl point
24+
HTTP 302
25+
26+
GET http://localhost:8080/
27+
HTTP 200
28+
[Captures]
29+
paris_id: xpath "substring-after(string(//a[normalize-space(.)='Hurl Paris']/@href), 'id=')"
30+
[Asserts]
31+
body contains "Hurl Paris"
32+
body contains "Hurl Lyon"
33+
body htmlUnescape contains "point.sql?id={{paris_id}}"
34+
body not contains "An error occurred"
35+
36+
GET http://localhost:8080/point.sql?id={{paris_id}}
37+
HTTP 200
38+
[Asserts]
39+
body contains "48.8566"
40+
body contains "2.3522"
41+
body contains "First Hurl point"
42+
body contains "Closest points"
43+
body contains "Hurl Lyon"
44+
body htmlUnescape contains "edition_form.sql?id={{paris_id}}"
45+
body not contains "An error occurred"
46+
47+
POST http://localhost:8080/edition_form.sql?id={{paris_id}}
48+
[FormParams]
49+
Text: Updated Hurl point
50+
HTTP 200
51+
[Asserts]
52+
body contains "Updated Hurl point"
53+
body not contains "An error occurred"

examples/official-site/test.hurl

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

examples/official-site/test.hurl

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
GET http://localhost:8080/
2+
HTTP 200
3+
[Asserts]
4+
body contains "SQLPage"
5+
body contains "Documentation"
6+
body contains "Get Started"
7+
body not contains "An error occurred"
8+
9+
GET http://localhost:8080/documentation.sql
10+
HTTP 200
11+
[Asserts]
12+
body contains "SQLPage v"
13+
body contains "components"
14+
body contains "shell"
15+
body not contains "An error occurred"
16+
17+
GET http://localhost:8080/component.sql?component=form
18+
HTTP 200
19+
[Asserts]
20+
body contains "The form component"
21+
body contains "Building forms in SQL"
22+
body not contains "An error occurred"
23+
24+
GET http://localhost:8080/functions.sql?function=url_encode
25+
HTTP 200
26+
[Asserts]
27+
body contains "sqlpage.url_encode"
28+
body contains "Parameters"
29+
body not contains "An error occurred"
30+
31+
GET http://localhost:8080/search.sql?search=form
32+
HTTP 302
33+
[Asserts]
34+
header "Location" == "/component.sql?component=form"
35+
36+
GET http://localhost:8080/not-a-real-doc-page
37+
HTTP 404
38+
[Asserts]
39+
body contains "Not Found"
40+
body not contains "An error occurred"
41+
42+
GET http://localhost:8080/examples/authentication/
43+
HTTP 302
44+
[Asserts]
45+
header "Location" == "login.sql"
46+
47+
GET http://localhost:8080/examples/authentication/login.sql
48+
HTTP 200
49+
[Asserts]
50+
body contains "Demo Login Form"
51+
body contains "admin"
52+
body not contains "An error occurred"
53+
54+
POST http://localhost:8080/examples/authentication/create_session_token.sql
55+
[FormParams]
56+
username: admin
57+
password: admin
58+
HTTP 302
59+
[Asserts]
60+
header "Location" == "/examples/authentication"
61+
62+
GET http://localhost:8080/examples/authentication/
63+
HTTP 200
64+
[Asserts]
65+
body contains "You are logged in as admin"
66+
body contains "Log out"
67+
body not contains "An error occurred"
68+
69+
GET http://localhost:8080/examples/authentication/logout.sql
70+
HTTP 302
71+
[Asserts]
72+
header "Location" == "login.sql"

0 commit comments

Comments
 (0)