1// Example Halyard test script
2hl.test("Response should be OK", function () {
3 hl.response.to.have.status(200);
4});
5
6hl.test("Response body should have name", function () {
7 var jsonData = hl.response.json();
8 hl.expect(jsonData).to.have.property('name');
9});
10
11hl.test("Response body should be an object", function () {
12 var jsonData = hl.response.json();
13 hl.expect(jsonData).to.be.an('object');
14});
15
16// You can also add custom assertions as needed
17hl.test("Check if specific field exists", function () {
18 var jsonData = hl.response.json();
19 hl.expect(jsonData.fieldName).to.eql('expected value');
20});
21