Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5116e68

Browse files
Merge pull request #4 from thanhhongnguyen/05032024
test branch
2 parents 0bc0978 + db0001e commit 5116e68

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

‎tests/01_post_static_data.spec.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// @ts-check
22
const { test, expect } = require('@playwright/test');
33

4+
//test case 1
45
test('should be able to create a booking', async ({ request }) => {
56
const response = await request.post(`/booking`, {
67
data: {

‎tests/02_post_static_json_data.spec.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// @ts-check
22
const { test, expect } = require('@playwright/test');
33
const bookingDetails = require('../test-data/booking-details.json');
4-
4+
//testcase 2
55
test('should be able to create a booking', async ({ request }) => {
66
const response = await request.post(`/booking`, {
77
data: bookingDetails

‎tests/03_post_dynamic_data.spec.js‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// @ts-check
22
const { test, expect } = require('@playwright/test');
33
import { faker } from '@faker-js/faker';
4-
const { DateTime } = require("luxon");
4+
// const { DateTime } = require("luxon");
55

66
const randomFirstName = faker.name.firstName()
77
const randomLastName = faker.name.lastName()
88
const randomNumber = faker.random.numeric(4)
9-
const currentDate = DateTime.now().toFormat('yyyy-MM-dd')
10-
const currentDatePlusFive = DateTime.now().plus({ days: 5 }).toFormat('yyyy-MM-dd')
9+
// const currentDate = DateTime.now().toFormat('yyyy-MM-dd')
10+
// const currentDatePlusFive = DateTime.now().plus({ days: 5 }).toFormat('yyyy-MM-dd')
1111

1212
test('should be able to create a booking', async ({ request }) => {
1313
const response = await request.post(`/booking`, {
@@ -16,10 +16,10 @@ test('should be able to create a booking', async ({ request }) => {
1616
"lastname": randomLastName,
1717
"totalprice": randomNumber,
1818
"depositpaid": true,
19-
"bookingdates": {
20-
"checkin": currentDate,
21-
"checkout": currentDatePlusFive
22-
},
19+
// "bookingdates": {
20+
// "checkin": currentDate,
21+
// "checkout": currentDatePlusFive
22+
// },
2323
"additionalneeds": "Breakfast"
2424
}
2525
});

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /