Compare commits
1 Commits
master
...
1e13a1d02b
| Author | SHA1 | Date | |
|---|---|---|---|
| 1e13a1d02b |
@@ -30,7 +30,7 @@ test.describe.serial('pizza day životní cyklus', () => {
|
||||
const createBtn = page.locator('.pizza-section button', { hasText: 'Založit Pizza day' });
|
||||
await expect(createBtn).toBeVisible({ timeout: 10_000 });
|
||||
// Čekáme na odpověď API před reloadem – jinak by reload přerušil probíhající request
|
||||
const createResponse = page.waitForResponse(resp => resp.url().includes('/api/pizza/create'));
|
||||
const createResponse = page.waitForResponse(resp => resp.url().includes('/api/pizzaDay/create'));
|
||||
await createBtn.click();
|
||||
await createResponse;
|
||||
await page.reload();
|
||||
@@ -39,7 +39,7 @@ test.describe.serial('pizza day životní cyklus', () => {
|
||||
|
||||
// Přidáme pizzu přes API (obejde komplex SelectSearch)
|
||||
const token = await page.evaluate(() => localStorage.getItem('token'));
|
||||
const addResp = await page.request.post('/api/pizza/add', {
|
||||
const addResp = await page.request.post('/api/pizzaDay/add', {
|
||||
headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' },
|
||||
data: { pizzaIndex: 0, pizzaSizeIndex: 0 },
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user