diff --git a/examples/PostGIS - using sqlpage with geographic data/test.hurl b/examples/PostGIS - using sqlpage with geographic data/test.hurl deleted file mode 120000 index 0dd017b9..00000000 --- a/examples/PostGIS - using sqlpage with geographic data/test.hurl +++ /dev/null @@ -1 +0,0 @@ -../../test.hurl \ No newline at end of file diff --git a/examples/PostGIS - using sqlpage with geographic data/test.hurl b/examples/PostGIS - using sqlpage with geographic data/test.hurl new file mode 100644 index 00000000..3e9154e0 --- /dev/null +++ b/examples/PostGIS - using sqlpage with geographic data/test.hurl @@ -0,0 +1,53 @@ +GET http://localhost:8080/ +HTTP 200 +[Asserts] +body contains "Points of interest" +body contains "Add a point" +body not contains "An error occurred" + +POST http://localhost:8080/add_point.sql +[FormParams] +Title: Hurl Paris +Latitude: 48.8566 +Longitude: 2.3522 +Text: First Hurl point +HTTP 302 +[Asserts] +header "Location" == "index.sql" + +POST http://localhost:8080/add_point.sql +[FormParams] +Title: Hurl Lyon +Latitude: 45.764 +Longitude: 4.8357 +Text: Second Hurl point +HTTP 302 + +GET http://localhost:8080/ +HTTP 200 +[Captures] +paris_id: xpath "substring-after(string(//a[normalize-space(.)='Hurl Paris']/@href), 'id=')" +[Asserts] +body contains "Hurl Paris" +body contains "Hurl Lyon" +body htmlUnescape contains "point.sql?id={{paris_id}}" +body not contains "An error occurred" + +GET http://localhost:8080/point.sql?id={{paris_id}} +HTTP 200 +[Asserts] +body contains "48.8566" +body contains "2.3522" +body contains "First Hurl point" +body contains "Closest points" +body contains "Hurl Lyon" +body htmlUnescape contains "edition_form.sql?id={{paris_id}}" +body not contains "An error occurred" + +POST http://localhost:8080/edition_form.sql?id={{paris_id}} +[FormParams] +Text: Updated Hurl point +HTTP 200 +[Asserts] +body contains "Updated Hurl point" +body not contains "An error occurred" diff --git a/examples/official-site/test.hurl b/examples/official-site/test.hurl deleted file mode 120000 index 0dd017b9..00000000 --- a/examples/official-site/test.hurl +++ /dev/null @@ -1 +0,0 @@ -../../test.hurl \ No newline at end of file diff --git a/examples/official-site/test.hurl b/examples/official-site/test.hurl new file mode 100644 index 00000000..451aa1b8 --- /dev/null +++ b/examples/official-site/test.hurl @@ -0,0 +1,72 @@ +GET http://localhost:8080/ +HTTP 200 +[Asserts] +body contains "SQLPage" +body contains "Documentation" +body contains "Get Started" +body not contains "An error occurred" + +GET http://localhost:8080/documentation.sql +HTTP 200 +[Asserts] +body contains "SQLPage v" +body contains "components" +body contains "shell" +body not contains "An error occurred" + +GET http://localhost:8080/component.sql?component=form +HTTP 200 +[Asserts] +body contains "The form component" +body contains "Building forms in SQL" +body not contains "An error occurred" + +GET http://localhost:8080/functions.sql?function=url_encode +HTTP 200 +[Asserts] +body contains "sqlpage.url_encode" +body contains "Parameters" +body not contains "An error occurred" + +GET http://localhost:8080/search.sql?search=form +HTTP 302 +[Asserts] +header "Location" == "/component.sql?component=form" + +GET http://localhost:8080/not-a-real-doc-page +HTTP 404 +[Asserts] +body contains "Not Found" +body not contains "An error occurred" + +GET http://localhost:8080/examples/authentication/ +HTTP 302 +[Asserts] +header "Location" == "login.sql" + +GET http://localhost:8080/examples/authentication/login.sql +HTTP 200 +[Asserts] +body contains "Demo Login Form" +body contains "admin" +body not contains "An error occurred" + +POST http://localhost:8080/examples/authentication/create_session_token.sql +[FormParams] +username: admin +password: admin +HTTP 302 +[Asserts] +header "Location" == "/examples/authentication" + +GET http://localhost:8080/examples/authentication/ +HTTP 200 +[Asserts] +body contains "You are logged in as admin" +body contains "Log out" +body not contains "An error occurred" + +GET http://localhost:8080/examples/authentication/logout.sql +HTTP 302 +[Asserts] +header "Location" == "login.sql"