merge: 메인 정보 헤더 제거를 main에 통합한다
This commit is contained in:
@@ -1136,6 +1136,7 @@ test('desktop menus preserve ref columns, prefix-safe routes, and controlled dro
|
|||||||
await installFixture(page, state);
|
await installFixture(page, state);
|
||||||
await page.setViewportSize({ width: 1200, height: 900 });
|
await page.setViewportSize({ width: 1200, height: 900 });
|
||||||
await waitForMain(page);
|
await waitForMain(page);
|
||||||
|
|
||||||
if (artifactRoot) await mkdir(resolve(artifactRoot), { recursive: true });
|
if (artifactRoot) await mkdir(resolve(artifactRoot), { recursive: true });
|
||||||
|
|
||||||
await expect(page.locator('.main-global-menu')).toHaveCount(3);
|
await expect(page.locator('.main-global-menu')).toHaveCount(3);
|
||||||
@@ -1994,6 +1995,17 @@ test('main cards and command input stay inside their Ref-sized grid slots', asyn
|
|||||||
await page.setViewportSize({ width: 1200, height: 900 });
|
await page.setViewportSize({ width: 1200, height: 900 });
|
||||||
await waitForMain(page);
|
await waitForMain(page);
|
||||||
|
|
||||||
|
for (const [target, label] of [
|
||||||
|
['nation', '국가 정보'],
|
||||||
|
['general', '장수 정보'],
|
||||||
|
] as const) {
|
||||||
|
const panel = page.locator(`.layout-desktop [data-main-target="${target}"]`);
|
||||||
|
await expect(panel).toHaveAttribute('aria-label', label);
|
||||||
|
await expect(panel.locator(':scope > .panel-header')).toHaveCount(0);
|
||||||
|
await expect(panel.locator(':scope > .panel-body')).toBeVisible();
|
||||||
|
}
|
||||||
|
await expect(page.locator('.layout-desktop [data-main-target="city"] > .panel-header')).toContainText('도시 정보');
|
||||||
|
|
||||||
const cityBars = page.locator('[data-main-target="city"] [role="progressbar"]');
|
const cityBars = page.locator('[data-main-target="city"] [role="progressbar"]');
|
||||||
const statBars = page.locator('[data-stat-progress] [role="progressbar"]');
|
const statBars = page.locator('[data-stat-progress] [role="progressbar"]');
|
||||||
const experienceBar = page.locator('[data-experience-progress] [role="progressbar"]');
|
const experienceBar = page.locator('[data-experience-progress] [role="progressbar"]');
|
||||||
@@ -2321,6 +2333,16 @@ test('main cards and command input stay inside their Ref-sized grid slots', asyn
|
|||||||
|
|
||||||
await page.setViewportSize({ width: 500, height: 900 });
|
await page.setViewportSize({ width: 500, height: 900 });
|
||||||
await expect(page.locator('.layout-mobile')).toBeVisible();
|
await expect(page.locator('.layout-mobile')).toBeVisible();
|
||||||
|
for (const [target, label] of [
|
||||||
|
['nation', '국가 정보'],
|
||||||
|
['general', '장수 정보'],
|
||||||
|
] as const) {
|
||||||
|
const panel = page.locator(`.layout-mobile [data-main-target="${target}"]`);
|
||||||
|
await expect(panel).toHaveAttribute('aria-label', label);
|
||||||
|
await expect(panel.locator(':scope > .panel-header')).toHaveCount(0);
|
||||||
|
await expect(panel.locator(':scope > .panel-body')).toBeVisible();
|
||||||
|
}
|
||||||
|
await expect(page.locator('.layout-mobile [data-main-target="city"] > .panel-header')).toContainText('도시 정보');
|
||||||
await page.locator('[data-main-target="commands"] .bottom-actions').getByRole('button', { name: '펼치기' }).click();
|
await page.locator('[data-main-target="commands"] .bottom-actions').getByRole('button', { name: '펼치기' }).click();
|
||||||
expect(await page.evaluate(() => document.documentElement.scrollWidth)).toBeLessThanOrEqual(500);
|
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="city"] [role="progressbar"]')).toHaveCount(8);
|
||||||
|
|||||||
@@ -2,14 +2,18 @@
|
|||||||
interface Props {
|
interface Props {
|
||||||
title: string;
|
title: string;
|
||||||
subtitle?: string;
|
subtitle?: string;
|
||||||
|
hideHeader?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
defineProps<Props>();
|
withDefaults(defineProps<Props>(), {
|
||||||
|
subtitle: undefined,
|
||||||
|
hideHeader: false,
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<section class="panel-card">
|
<section class="panel-card">
|
||||||
<header class="panel-header">
|
<header v-if="!hideHeader" class="panel-header">
|
||||||
<div>
|
<div>
|
||||||
<h2 class="panel-title">{{ title }}</h2>
|
<h2 class="panel-title">{{ title }}</h2>
|
||||||
<p v-if="subtitle" class="panel-subtitle">{{ subtitle }}</p>
|
<p v-if="subtitle" class="panel-subtitle">{{ subtitle }}</p>
|
||||||
|
|||||||
@@ -295,7 +295,7 @@ watch(
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else-if="panelId === 'nation'" class="mobile-panel" data-mobile-panel-id="nation">
|
<div v-else-if="panelId === 'nation'" class="mobile-panel" data-mobile-panel-id="nation">
|
||||||
<PanelCard title="국가 정보" data-main-target="nation">
|
<PanelCard title="국가 정보" hide-header aria-label="국가 정보" data-main-target="nation">
|
||||||
<NationBasicCard :nation="nation" :loading="loading" />
|
<NationBasicCard :nation="nation" :loading="loading" />
|
||||||
</PanelCard>
|
</PanelCard>
|
||||||
</div>
|
</div>
|
||||||
@@ -306,7 +306,7 @@ watch(
|
|||||||
:class="{ 'mobile-panel--flush': isFlushMobilePanel(panelId, panelIndex) }"
|
:class="{ 'mobile-panel--flush': isFlushMobilePanel(panelId, panelIndex) }"
|
||||||
data-mobile-panel-id="general"
|
data-mobile-panel-id="general"
|
||||||
>
|
>
|
||||||
<PanelCard title="장수 스탯" data-main-target="general">
|
<PanelCard title="장수 스탯" hide-header aria-label="장수 정보" data-main-target="general">
|
||||||
<GeneralBasicCard :general="general" :loading="loading" :nation-color="nation?.color" />
|
<GeneralBasicCard :general="general" :loading="loading" :nation-color="nation?.color" />
|
||||||
</PanelCard>
|
</PanelCard>
|
||||||
</div>
|
</div>
|
||||||
@@ -456,10 +456,10 @@ watch(
|
|||||||
<PanelCard title="도시 정보" data-main-target="city">
|
<PanelCard title="도시 정보" data-main-target="city">
|
||||||
<CityBasicCard :city="city" :loading="loading" />
|
<CityBasicCard :city="city" :loading="loading" />
|
||||||
</PanelCard>
|
</PanelCard>
|
||||||
<PanelCard title="국가 정보" data-main-target="nation">
|
<PanelCard title="국가 정보" hide-header aria-label="국가 정보" data-main-target="nation">
|
||||||
<NationBasicCard :nation="nation" :loading="loading" />
|
<NationBasicCard :nation="nation" :loading="loading" />
|
||||||
</PanelCard>
|
</PanelCard>
|
||||||
<PanelCard title="장수 스탯" data-main-target="general">
|
<PanelCard title="장수 스탯" hide-header aria-label="장수 정보" data-main-target="general">
|
||||||
<GeneralBasicCard :general="general" :loading="loading" :nation-color="nation?.color" />
|
<GeneralBasicCard :general="general" :loading="loading" :nation-color="nation?.color" />
|
||||||
</PanelCard>
|
</PanelCard>
|
||||||
<MainNationMenu
|
<MainNationMenu
|
||||||
|
|||||||
Reference in New Issue
Block a user