사령부 지도 입력창 너비를 통일
This commit is contained in:
@@ -2161,6 +2161,7 @@ test('touch command maps select city and nation on the first tap without changin
|
||||
test('shows a map and target details for every city or nation argument chief command except assignment', async ({
|
||||
page,
|
||||
}) => {
|
||||
test.setTimeout(60_000);
|
||||
await install(page);
|
||||
await page.setViewportSize({ width: 1200, height: 900 });
|
||||
const cases = [
|
||||
@@ -2207,6 +2208,20 @@ test('shows a map and target details for every city or nation argument chief com
|
||||
|
||||
await page.screenshot({ path: test.info().outputPath('chief-command-target-map-details.png'), fullPage: true });
|
||||
|
||||
const targetMapPickerWidth = await page
|
||||
.getByTestId('command-picker')
|
||||
.evaluate((element) => element.getBoundingClientRect().width);
|
||||
await page.goto('/che/chief-center');
|
||||
await page.getByRole('button', { name: '1턴 명령 입력', exact: true }).click();
|
||||
const capitalPicker = page.getByTestId('command-picker');
|
||||
await capitalPicker.getByRole('button', { name: /^(?:국가:)?특수$/ }).click();
|
||||
await capitalPicker.getByRole('button', { name: /증축/ }).click();
|
||||
await expect(capitalPicker.getByTestId('command-argument-map')).toBeVisible();
|
||||
const capitalMapPickerWidth = await capitalPicker.evaluate((element) => element.getBoundingClientRect().width);
|
||||
expect(capitalMapPickerWidth).toBe(targetMapPickerWidth);
|
||||
expect(capitalMapPickerWidth).toBeGreaterThanOrEqual(700);
|
||||
await capitalPicker.screenshot({ path: test.info().outputPath('chief-capital-map-expanded-desktop.png') });
|
||||
|
||||
await page.setViewportSize({ width: 500, height: 900 });
|
||||
await page.goto('/che/chief-center');
|
||||
await page.getByRole('button', { name: '1턴 명령 입력', exact: true }).click();
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { computed, nextTick, onBeforeUnmount, onMounted, ref, shallowRef, watch } from 'vue';
|
||||
import CommandArgumentForm from '../main/CommandArgumentForm.vue';
|
||||
import CommandSelectForm from '../main/CommandSelectForm.vue';
|
||||
import { commandArgumentPresentation } from './commandArgumentPresentation';
|
||||
import { commandArgumentPresentation, resolveCommandArgumentMapTarget } from './commandArgumentPresentation';
|
||||
import DragSelect from './DragSelect.vue';
|
||||
import RecruitmentCommandForm from './RecruitmentCommandForm.vue';
|
||||
import {
|
||||
@@ -134,6 +134,15 @@ const quickPickerTop = ref('38px');
|
||||
const isRecruitmentCommand = computed(
|
||||
() => selectedCommand.value?.key === 'che_징병' || selectedCommand.value?.key === 'che_모병'
|
||||
);
|
||||
const isArgumentPickerExpanded = computed(() => {
|
||||
const command = selectedCommand.value;
|
||||
if (!command) return false;
|
||||
const presentation = commandArgumentPresentation(command.key);
|
||||
return Boolean(
|
||||
(command.reqArg && presentation.lines.length) ||
|
||||
resolveCommandArgumentMapTarget(command.key, command.inputFields)
|
||||
);
|
||||
});
|
||||
const isRecruitmentOverlayOpen = computed(() => pickerOpen.value && isRecruitmentCommand.value);
|
||||
const commandBrief = (entry: { action: string; args: unknown; label?: string }): string =>
|
||||
formatReservedCommandBrief(props.scope, entry.action, entry.args, props.commandTable) ||
|
||||
@@ -361,9 +370,7 @@ const clickOutsideMenu = (event: Event) => {
|
||||
mobile: props.mobile,
|
||||
'edit-mode': editMode,
|
||||
'picker-open': pickerOpen,
|
||||
'argument-expanded': Boolean(
|
||||
selectedCommand?.reqArg && commandArgumentPresentation(selectedCommand.key).lines.length
|
||||
),
|
||||
'argument-expanded': isArgumentPickerExpanded,
|
||||
}"
|
||||
:data-command-scope="props.scope"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user