Adapt guest spec tests to the new API format
This commit is contained in:
parent
567ce207cf
commit
6fcf7d87a8
@ -2,32 +2,26 @@ import { test, expect, Page } from '@playwright/test'
|
|||||||
|
|
||||||
const mockGuestsAPI = ({ page }: { page: Page }) => {
|
const mockGuestsAPI = ({ page }: { page: Page }) => {
|
||||||
page.route('*/**/api/guests.json', async route => {
|
page.route('*/**/api/guests.json', async route => {
|
||||||
const json = {
|
const json = [
|
||||||
data: [
|
{
|
||||||
{
|
"id": "f4a09c28-40ea-4553-90a5-96935a59cac6",
|
||||||
"id": "f4a09c28-40ea-4553-90a5-96935a59cac6",
|
"status": "Tentative",
|
||||||
"type": "guest",
|
"name": "Kristofer Rohan DVM",
|
||||||
"attributes": {
|
"group": {
|
||||||
"id": "f4a09c28-40ea-4553-90a5-96935a59cac6",
|
"id": "2fcb8b22-6b07-4c34-92e3-a2535dbc5b14",
|
||||||
"group_id": "2fcb8b22-6b07-4c34-92e3-a2535dbc5b14",
|
"name": "Childhood friends",
|
||||||
"status": "Tentative",
|
}
|
||||||
"name": "Kristofer Rohan DVM",
|
},
|
||||||
"group_name": "Childhood friends"
|
{
|
||||||
}
|
"id": "bd585c40-0937-4cde-960a-bb23acfd6f18",
|
||||||
},
|
"status": "Invited",
|
||||||
{
|
"name": "Olevia Quigley Jr.",
|
||||||
"id": "bd585c40-0937-4cde-960a-bb23acfd6f18",
|
"group": {
|
||||||
"type": "guest",
|
"id": "da8edf26-3e1e-4cbb-b985-450c49fffe01",
|
||||||
"attributes": {
|
"name": "Work",
|
||||||
"id": "bd585c40-0937-4cde-960a-bb23acfd6f18",
|
}
|
||||||
"group_id": "da8edf26-3e1e-4cbb-b985-450c49fffe01",
|
},
|
||||||
"status": "Invited",
|
];
|
||||||
"name": "Olevia Quigley Jr.",
|
|
||||||
"group_name": "Work"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
]
|
|
||||||
};
|
|
||||||
|
|
||||||
await route.fulfill({ json })
|
await route.fulfill({ json })
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user