fix: 인게임 작업 상태를 공용 toast로 통일한다
This commit is contained in:
@@ -415,7 +415,9 @@ test.describe('inheritance management legacy parity', () => {
|
||||
await expect.poll(() => fixture.uniqueAuctionRequests.length).toBe(1);
|
||||
expect(JSON.stringify(fixture.uniqueAuctionRequests[0])).toContain('che_서적_07_논어');
|
||||
expect(JSON.stringify(fixture.uniqueAuctionRequests[0])).toContain('6000');
|
||||
await expect(page.locator('.notice.success')).toHaveText('성공했습니다. 경매장을 확인해주세요.');
|
||||
await expect(page.locator('[data-testid="game-toast"][data-feedback-kind="success"]')).toContainText(
|
||||
'성공했습니다. 경매장을 확인해주세요.'
|
||||
);
|
||||
});
|
||||
|
||||
test('keeps controls usable and renders an API mutation error', async ({ page }) => {
|
||||
|
||||
@@ -305,7 +305,9 @@ test('nation betting matches the legacy desktop geometry and preserves a failed
|
||||
await expect(page.locator('.betting-candidate.picked')).toHaveCount(2);
|
||||
|
||||
await page.getByRole('button', { name: '베팅', exact: true }).click();
|
||||
await expect(page.getByRole('status')).toContainText('베팅했습니다');
|
||||
await expect(page.locator('[data-testid="game-toast"][data-feedback-kind="success"]')).toContainText(
|
||||
'베팅했습니다'
|
||||
);
|
||||
await expect(amountInput).toHaveValue('0');
|
||||
|
||||
if (artifactRoot) {
|
||||
@@ -313,6 +315,29 @@ test('nation betting matches the legacy desktop geometry and preserves a failed
|
||||
}
|
||||
});
|
||||
|
||||
test('nation betting reports failed and successful submissions through shared toasts', async ({ page }) => {
|
||||
await installBettingFixture(page);
|
||||
await page.goto(gameUrl('/nation-betting'));
|
||||
await page.getByRole('button', { name: /천통국 예상/ }).click();
|
||||
await page.locator('.betting-candidate').nth(0).click();
|
||||
await page.locator('.betting-candidate').nth(1).click();
|
||||
|
||||
const amountInput = page.getByLabel('베팅 금액');
|
||||
await amountInput.fill('300');
|
||||
await page.getByRole('button', { name: '베팅', exact: true }).click();
|
||||
await expect(page.locator('[data-testid="game-toast"][data-feedback-kind="error"]')).toContainText(
|
||||
'유산포인트가 충분하지 않습니다.'
|
||||
);
|
||||
await expect(amountInput).toHaveValue('300');
|
||||
|
||||
await page.getByRole('button', { name: '베팅', exact: true }).click();
|
||||
await expect(page.locator('[data-testid="game-toast"][data-feedback-kind="success"]')).toContainText(
|
||||
'베팅했습니다'
|
||||
);
|
||||
await expect(amountInput).toHaveValue('0');
|
||||
await expect(page.locator('.betting-notice.success')).toHaveCount(0);
|
||||
});
|
||||
|
||||
test('nation betting keeps the legacy 500px three-column mobile contract', async ({ page }) => {
|
||||
await installBettingFixture(page);
|
||||
await page.setViewportSize({ width: 500, height: 900 });
|
||||
|
||||
@@ -366,11 +366,15 @@ test('tournament reloads its snapshot after failed and successful joins without
|
||||
await expect.poll(() => state.snapshotQueries).toBe(1);
|
||||
|
||||
await join.click();
|
||||
await expect(page.getByRole('status')).toHaveText('금이 부족합니다.');
|
||||
await expect(page.locator('[data-testid="game-toast"][data-feedback-kind="error"]')).toContainText(
|
||||
'금이 부족합니다.'
|
||||
);
|
||||
await expect.poll(() => state.snapshotQueries).toBe(2);
|
||||
|
||||
await join.click();
|
||||
await expect(page.getByRole('status')).toHaveText('참가 신청이 반영되었습니다.');
|
||||
await expect(page.locator('[data-testid="game-toast"][data-feedback-kind="success"]')).toContainText(
|
||||
'참가 신청이 반영되었습니다.'
|
||||
);
|
||||
await expect.poll(() => state.snapshotQueries).toBe(3);
|
||||
expect(state.summaryQueries).toBe(3);
|
||||
expect(state.accessCalls).toBe(0);
|
||||
@@ -423,12 +427,14 @@ test('betting keeps the 1120px and 16 by 70px layout and retains a failed select
|
||||
await bet.focus();
|
||||
await expect(bet).toBeFocused();
|
||||
await bet.click();
|
||||
await expect(page.getByRole('status')).toHaveText('500금까지만 베팅 가능합니다.');
|
||||
await expect(page.getByRole('alert')).toHaveText('500금까지만 베팅 가능합니다.');
|
||||
await expect(select).toHaveValue('500');
|
||||
await expect.poll(() => state.snapshotQueries).toBe(2);
|
||||
|
||||
await bet.click();
|
||||
await expect(page.getByRole('status')).toHaveText('베팅이 등록되었습니다.');
|
||||
await expect(page.locator('[data-testid="game-toast"][data-feedback-kind="success"]')).toContainText(
|
||||
'베팅이 등록되었습니다.'
|
||||
);
|
||||
await expect.poll(() => state.snapshotQueries).toBe(3);
|
||||
expect(state.summaryQueries).toBe(3);
|
||||
expect(state.rankingQueries).toBe(3);
|
||||
|
||||
@@ -1244,7 +1244,9 @@ test.describe('survey legacy parity', () => {
|
||||
test('submits a vote and comment through the real screen controls', async ({ page }) => {
|
||||
await page.goto(gameUrl('/survey'));
|
||||
await page.getByRole('button', { name: '투표', exact: true }).click();
|
||||
await expect(page.getByRole('status')).toHaveText('설문을 마쳤습니다.');
|
||||
await expect(page.locator('[data-testid="game-toast"][data-feedback-kind="success"]')).toContainText(
|
||||
'설문을 마쳤습니다.'
|
||||
);
|
||||
await expect(page.getByText('결산', { exact: true })).toBeVisible();
|
||||
|
||||
await page.getByLabel('댓글').fill('새 댓글');
|
||||
|
||||
Reference in New Issue
Block a user