From 09dfe96ff101c1353d54c6c52da7839677e16ef8 Mon Sep 17 00:00:00 2001 From: hided62 Date: Sun, 6 Sep 2026 15:11:05 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=84=A4=EB=AC=B8=EC=A1=B0=EC=82=AC=20?= =?UTF-8?q?=EC=B0=BD=20=EB=8B=AB=EA=B8=B0=20=EB=B2=84=ED=8A=BC=EC=9D=B4=20?= =?UTF-8?q?=ED=8C=9D=EC=97=85=EC=9D=84=20=EB=8B=AB=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/game-frontend/e2e/mainNavigation.spec.ts | 54 ++++++++++++++++++++ app/game-frontend/src/views/SurveyView.vue | 7 ++- 2 files changed, 57 insertions(+), 4 deletions(-) diff --git a/app/game-frontend/e2e/mainNavigation.spec.ts b/app/game-frontend/e2e/mainNavigation.spec.ts index 5c17333d..03cc681e 100644 --- a/app/game-frontend/e2e/mainNavigation.spec.ts +++ b/app/game-frontend/e2e/mainNavigation.spec.ts @@ -1278,6 +1278,60 @@ test('keeps the survey footer close button the same size as the top close button } }); +test('closes the survey popup from both close buttons without navigating the opener', async ({ page }, testInfo) => { + const state: NavigationFixture = { + officerLevel: 0, + permission: 0, + nationLevel: 0, + stage: 0, + npcMode: 1, + generalMeCalls: 0, + operations: [], + }; + await installFixture(page, state); + await waitForMain(page); + const openerUrl = page.url(); + for (const width of [1000, 500]) { + for (const bar of ['back_bar', 'bottom_bar']) { + const popupPromise = page.waitForEvent('popup'); + await page.evaluate(() => window.open('about:blank', '_blank')); + const popup = await popupPromise; + await installFixture(popup, state); + await popup.setViewportSize({ width, height: 900 }); + await popup.goto(`${basePath}/survey`); + const button = popup.locator(`.${bar} .back_btn`); + await expect(button).toHaveText('창 닫기'); + await popup.evaluate(() => document.fonts.ready); + await button.focus(); + await expect(button).toBeFocused(); + await button.hover(); + const artifactName = `survey-close-${width}-${bar}`; + await popup.screenshot({ path: testInfo.outputPath(`${artifactName}.png`), fullPage: true }); + await writeFile( + testInfo.outputPath(`${artifactName}.html`), + await popup.locator('.pageVote').evaluate((el) => el.outerHTML) + ); + await writeFile( + testInfo.outputPath(`${artifactName}.json`), + JSON.stringify( + await button.evaluate((el) => ({ + rect: el.getBoundingClientRect().toJSON(), + style: { height: getComputedStyle(el).height, font: getComputedStyle(el).font }, + })), + null, + 2 + ) + ); + const closed = popup.waitForEvent('close'); + await button.click(); + await closed; + expect(popup.isClosed()).toBe(true); + expect(page.isClosed()).toBe(false); + expect(page.url()).toBe(openerUrl); + } + } +}); + test('notifies only for a new incoming private message and marks it read from the notice', async ({ page, }, testInfo) => { diff --git a/app/game-frontend/src/views/SurveyView.vue b/app/game-frontend/src/views/SurveyView.vue index 2e724861..b63234e5 100644 --- a/app/game-frontend/src/views/SurveyView.vue +++ b/app/game-frontend/src/views/SurveyView.vue @@ -1,7 +1,6 @@