-
Notifications
You must be signed in to change notification settings - Fork 12
Added the Appointments Scenario #82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@jayasanka-sack @Bawanthathilan Please review this and let me know if its all well |
.exec(http("User Login") | ||
.post("/ws/rest/v1/session") | ||
.header("Authorization", AUTHORIZATION) | ||
.body(StringBody("{\"username\": \"" + USERNAME + "\", \"password\": \"" + PASSWORD + "\"}")) | ||
.check(status().is(200)) | ||
.check(jsonPath("$.sessionId").saveAs("sessionId")) | ||
) | ||
.exec(session -> { | ||
String sessionId = session.getString("sessionId"); | ||
return session.set("authToken", "Bearer " + sessionId); | ||
}) | ||
.exec(http("Go to Home Page") | ||
.get("/spa/home") | ||
.header("Authorization", "#{authToken}") | ||
.check(status().is(200)) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don’t specify API calls here. Instead, we use registry methods and HTTP methods defined separately. Take a look at how other scenarios are implemented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to clarify, should I create a new registry to handle the Appointment Booking scenario, or should I integrate it into the existing registry? I want to ensure I align with the current implementation approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is related to the clerk persona, we can use clerk registry and the clerk http service
This implementation covers the steps and API calls involved in the AppointmentBookingScenario