From 530524cd37ff6008d06f956da11a99737f8e71dc Mon Sep 17 00:00:00 2001 From: Ophir LOJKINE Date: Tue, 2 Jun 2026 12:46:44 +0200 Subject: [PATCH] Add master-detail Hurl workflow --- examples/master-detail-forms/test.hurl | 49 +++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) mode change 120000 => 100644 examples/master-detail-forms/test.hurl diff --git a/examples/master-detail-forms/test.hurl b/examples/master-detail-forms/test.hurl deleted file mode 120000 index 0dd017b9..00000000 --- a/examples/master-detail-forms/test.hurl +++ /dev/null @@ -1 +0,0 @@ -../../test.hurl \ No newline at end of file diff --git a/examples/master-detail-forms/test.hurl b/examples/master-detail-forms/test.hurl new file mode 100644 index 00000000..1f105a19 --- /dev/null +++ b/examples/master-detail-forms/test.hurl @@ -0,0 +1,48 @@ +GET http://localhost:8080 +HTTP 200 +[Asserts] +header "Content-Type" contains "text/html" +body contains "SQLPage Form Demo" +body contains "Users" +body contains "Add a new user" +body not contains "An error occurred" + +POST http://localhost:8080/insert_user.sql?id=987654 +Content-Type: application/x-www-form-urlencoded +`First%20name=Hurl&Last%20name=Masterdetail&Email=hurl-masterdetail%40example.com` +HTTP 302 +[Asserts] +header "Location" == "edit_user.sql?id=987654" + +GET http://localhost:8080/edit_user.sql?id=987654 +HTTP 200 +[Asserts] +body contains "Edit user" +body contains "Hurl" +body contains "Masterdetail" +body contains "hurl-masterdetail@example.com" +body contains "Addresses" +body contains "Add address" +body not contains "An error occurred" + +POST http://localhost:8080/insert_address.sql?user_id=987654 +Content-Type: application/x-www-form-urlencoded +`Street=42%20Hurl%20Street&City=Testville&Country=Exampleland` +HTTP 302 +[Asserts] +header "Location" == "edit_user.sql?id=987654" + +GET http://localhost:8080/edit_user.sql?id=987654 +HTTP 200 +[Asserts] +body contains "Hurl" +body contains "Masterdetail" +body contains "42 Hurl Street, Testville, Exampleland" +body not contains "An error occurred" + +GET http://localhost:8080 +HTTP 200 +[Asserts] +body contains "Hurl Masterdetail" +body contains "hurl-masterdetail@example.com" +body not contains "An error occurred"