메인 장수 정보에서 상세 통계와 숙련도 표시를 제외
This commit is contained in:
@@ -38,6 +38,7 @@ const readGeneralPanelImages = async (panel: Locator) =>
|
||||
label: image.getAttribute('aria-label'),
|
||||
width: rect.width,
|
||||
height: rect.height,
|
||||
src: image instanceof HTMLImageElement ? image.src : null,
|
||||
backgroundImage: style.backgroundImage,
|
||||
backgroundSize: style.backgroundSize,
|
||||
pointerEvents: style.pointerEvents,
|
||||
@@ -1358,7 +1359,7 @@ test('내 정보&설정 keeps desktop density and becomes a 390px horizontal-ide
|
||||
{ width: 64, height: 64 },
|
||||
{ width: 64, height: 64 },
|
||||
]);
|
||||
expect(myPageImages[0]?.backgroundImage).toContain('/icons/default.jpg');
|
||||
expect(myPageImages[0]?.src).toContain('/icons/default.jpg');
|
||||
expect(myPageImages[1]?.backgroundImage).toContain('/game/crewtype1.png');
|
||||
await expect(page.locator('.general-table')).toContainText('병종보병');
|
||||
await expect(page.locator('.general-table')).toContainText('삭턴6 턴');
|
||||
@@ -2370,7 +2371,7 @@ test('감찰부 keeps the selector interaction and shows the permission error pa
|
||||
]);
|
||||
const battleImages = await readGeneralPanelImages(page.locator('.battle-general-card'));
|
||||
expect(battleImages).toHaveLength(2);
|
||||
expect(battleImages[0]?.backgroundImage).toContain('/icons/default.jpg');
|
||||
expect(battleImages[0]?.src).toContain('/icons/default.jpg');
|
||||
expect(battleImages[1]?.backgroundImage).toContain('/game/crewtype1.png');
|
||||
await expect(page.locator('.battle-general-card [role="progressbar"]')).toHaveCount(14);
|
||||
await expect(page.locator('.battle-general-card [aria-label*="1,275,975 (EX+)"]')).toHaveCount(5);
|
||||
|
||||
@@ -2918,9 +2918,11 @@ test('main cards and command input stay inside their Ref-sized grid slots', asyn
|
||||
await expect(statBars).toHaveCount(3);
|
||||
await expect(experienceBar).toHaveCount(1);
|
||||
await expect(page.locator('[data-main-target="general"] [data-general-information-panel]')).toHaveCount(1);
|
||||
await expect(page.locator('[data-main-target="general"] [data-general-battle-summary]')).toHaveCount(1);
|
||||
await expect(page.locator('[data-main-target="general"] [data-dex-progress]')).toHaveCount(5);
|
||||
await expect(page.locator('[data-main-target="general"] [role="progressbar"]')).toHaveCount(14);
|
||||
await expect(page.locator('[data-main-target="general"] [role="progressbar"]')).toHaveCount(4);
|
||||
await expect(page.locator('[data-main-target="general"] .troop-label')).toHaveText('부대');
|
||||
await expect(page.locator('[data-main-target="general"] .penalty-label')).toHaveText('벌점');
|
||||
await expect(page.locator('[data-main-target="general"] [data-general-battle-summary]')).toHaveCount(0);
|
||||
await expect(page.locator('[data-main-target="general"] [data-dex-progress]')).toHaveCount(0);
|
||||
|
||||
const nationCard = page.locator('[data-main-target="nation"] [data-nation-basic-card]');
|
||||
await expect(nationCard.locator('.head')).toHaveCount(17);
|
||||
@@ -3290,7 +3292,11 @@ test('main cards and command input stay inside their Ref-sized grid slots', asyn
|
||||
await page.locator('[data-main-target="commands"] .bottom-actions').getByRole('button', { name: '펼치기' }).click();
|
||||
expect(await page.evaluate(() => document.documentElement.scrollWidth)).toBeLessThanOrEqual(500);
|
||||
await expect(page.locator('[data-main-target="city"] [role="progressbar"]')).toHaveCount(8);
|
||||
await expect(page.locator('[data-main-target="general"] [role="progressbar"]')).toHaveCount(14);
|
||||
await expect(page.locator('[data-main-target="general"] [role="progressbar"]')).toHaveCount(4);
|
||||
await expect(page.locator('[data-main-target="general"] .troop-label')).toHaveText('부대');
|
||||
await expect(page.locator('[data-main-target="general"] .penalty-label')).toHaveText('벌점');
|
||||
await expect(page.locator('[data-main-target="general"] [data-general-battle-summary]')).toHaveCount(0);
|
||||
await expect(page.locator('[data-main-target="general"] [data-dex-progress]')).toHaveCount(0);
|
||||
const mobileNationCard = page.locator('[data-main-target="nation"] [data-nation-basic-card]');
|
||||
expect(await mobileNationCard.evaluate((element) => element.getBoundingClientRect().height)).toBe(193);
|
||||
expect(await mobileNationCard.evaluate((element) => element.scrollWidth - element.clientWidth)).toBeLessThanOrEqual(
|
||||
|
||||
@@ -18,6 +18,7 @@ const props = withDefaults(
|
||||
general: GeneralInformationPanelData | null;
|
||||
summary: GeneralBattleSummaryData | null;
|
||||
loading: boolean;
|
||||
showDetails?: boolean;
|
||||
nationColor?: string | null;
|
||||
defenceText?: string | null;
|
||||
killTurn?: number | null;
|
||||
@@ -26,6 +27,7 @@ const props = withDefaults(
|
||||
penaltyText?: string | number | null;
|
||||
}>(),
|
||||
{
|
||||
showDetails: true,
|
||||
nationColor: '#173d27',
|
||||
defenceText: null,
|
||||
killTurn: null,
|
||||
@@ -48,7 +50,7 @@ const props = withDefaults(
|
||||
:troop-text="props.troopText"
|
||||
:penalty-text="props.penaltyText"
|
||||
>
|
||||
<template v-if="props.general" #details>
|
||||
<template v-if="props.general && props.showDetails" #details>
|
||||
<GeneralBattleSummary v-if="props.summary" :summary="props.summary" show-win-rate />
|
||||
<LegacyGeneralProgress :general="props.general" :show-primary="false" />
|
||||
</template>
|
||||
|
||||
@@ -408,6 +408,7 @@ watch(
|
||||
<GeneralInformationPanel
|
||||
:general="generalPanel"
|
||||
:summary="generalSummary"
|
||||
:show-details="false"
|
||||
:loading="loading"
|
||||
:nation-color="nation?.color"
|
||||
/>
|
||||
@@ -570,6 +571,7 @@ watch(
|
||||
<GeneralInformationPanel
|
||||
:general="generalPanel"
|
||||
:summary="generalSummary"
|
||||
:show-details="false"
|
||||
:loading="loading"
|
||||
:nation-color="nation?.color"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user