From 3ad230beb30bc403b92e0a634d7ed38d958f53b8 Mon Sep 17 00:00:00 2001 From: hided62 Date: Sat, 12 Sep 2026 07:23:46 +0000 Subject: [PATCH] =?UTF-8?q?=EB=B2=A0=ED=8C=85=20=EC=9E=A5=EC=88=98=20?= =?UTF-8?q?=EC=A0=95=EB=B3=B4=20=EA=B8=80=EC=9E=90=EB=A5=BC=20=ED=82=A4?= =?UTF-8?q?=EC=9A=B0=EA=B3=A0=20=EC=99=BC=EC=AA=BD=20=EC=95=84=EC=9D=B4?= =?UTF-8?q?=EC=BD=98=20=ED=91=9C=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../e2e/tournamentBracket.spec.ts | 27 ++- .../tournament/TournamentBracket.vue | 155 +++++++++--------- 2 files changed, 99 insertions(+), 83 deletions(-) diff --git a/app/game-frontend/e2e/tournamentBracket.spec.ts b/app/game-frontend/e2e/tournamentBracket.spec.ts index 82d8cb27..f39a9949 100644 --- a/app/game-frontend/e2e/tournamentBracket.spec.ts +++ b/app/game-frontend/e2e/tournamentBracket.spec.ts @@ -994,6 +994,7 @@ for (const width of [1365, 1101, 800, 390, 320]) { elements.map((element) => { const rect = element.getBoundingClientRect(); const selectors = [ + '.general-identity-icon', '.general-identity-name', '.bracket-core-stat', '.bracket-odds', @@ -1010,6 +1011,7 @@ for (const width of [1365, 1101, 800, 390, 320]) { selector, rect: el.getBoundingClientRect().toJSON(), font: style.font, + fontSize: Number.parseFloat(style.fontSize), color: style.color, scrollWidth: el.scrollWidth, clientWidth: el.clientWidth, @@ -1019,7 +1021,22 @@ for (const width of [1365, 1101, 800, 390, 320]) { }) ); for (const card of geometry) { + const iconRect = card.fields.find((field) => field.selector === '.general-identity-icon')!.rect; + expect(iconRect.width).toBe(width > 1100 ? 64 : 40); + expect(iconRect.height).toBe(iconRect.width); for (const field of card.fields) { + if ( + [ + '.general-identity-name', + '.bracket-core-stat', + '.bracket-odds', + '.bracket-my-bet', + '.bracket-return', + ].includes(field.selector) + ) { + expect(field.rect.left).toBeGreaterThanOrEqual(iconRect.right + 5); + expect(field.fontSize).toBeGreaterThanOrEqual(width > 1100 ? 14 : 13); + } expect(field.rect.left).toBeGreaterThanOrEqual(card.rect.left - 1); expect(field.rect.right).toBeLessThanOrEqual(card.rect.right + 1); expect(field.rect.top).toBeGreaterThanOrEqual(card.rect.top - 1); @@ -1060,11 +1077,9 @@ for (const width of [1365, 1101, 800, 390, 320]) { ); await page.screenshot({ path: testInfo.outputPath('inline-before.png'), fullPage: true }); await page.screenshot({ path: testInfo.outputPath('inline-viewport.png') }); - const iconTrigger = cards.first().locator('[data-rich-tooltip]'); - await iconTrigger.hover(); - const tooltipImage = page.locator('.tippy-box[data-state="visible"] img'); - await expect(tooltipImage).toBeVisible(); - const icon = await tooltipImage.evaluate((image: HTMLImageElement) => ({ + const candidateImage = cards.first().locator('.general-identity-icon'); + await expect(candidateImage).toBeVisible(); + const icon = await candidateImage.evaluate((image: HTMLImageElement) => ({ rect: image.getBoundingClientRect().toJSON(), naturalWidth: image.naturalWidth, naturalHeight: image.naturalHeight, @@ -1072,8 +1087,8 @@ for (const width of [1365, 1101, 800, 390, 320]) { })); expect(icon.naturalWidth).toBeGreaterThan(0); expect(icon.naturalHeight).toBeGreaterThan(0); + expect(icon.objectFit).toBe('cover'); await writeFile(testInfo.outputPath('inline-icon.json'), JSON.stringify(icon, null, 2)); - await page.keyboard.press('Escape'); const buttons = bracket.locator('.bracket-bet-button'); const firstButton = buttons.first(); await firstButton.hover(); diff --git a/app/game-frontend/src/components/tournament/TournamentBracket.vue b/app/game-frontend/src/components/tournament/TournamentBracket.vue index ef770eb7..1751234b 100644 --- a/app/game-frontend/src/components/tournament/TournamentBracket.vue +++ b/app/game-frontend/src/components/tournament/TournamentBracket.vue @@ -1,7 +1,6 @@