feat(web-test): smoke-тест 04-selectvalue (dropdown быстрый выбор)

Один P0 кейс из coverage matrix:
- dropdown: selectValue('Контрагент', 'ООО Север') → method='dropdown'
  на форме новой ПриходнойНакладной (CatalogRef + малый список)

API возвращает form state с .selected = {field, search, method}.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Nick Shirokov
2026-05-02 15:57:37 +03:00
parent 66e37fb8cc
commit 36ad686316
+24
View File
@@ -0,0 +1,24 @@
export const name = 'selectValue: dropdown быстрый выбор для ссылочного поля';
export const tags = ['selectvalue', 'smoke'];
export const timeout = 60000;
const findField = (state, name) => state.fields?.find(f => f.name === name || f.label === name);
export default async function({ navigateSection, openCommand, clickElement, selectValue, closeForm, getFormState, assert, step, log }) {
await step('dropdown: Контрагент → CatalogRef.Контрагенты, малый список', async () => {
await navigateSection('Склад');
await openCommand('Приходная накладная');
await clickElement('Создать');
const result = await selectValue('Контрагент', 'ООО Север');
log(`method=${result.selected?.method}, search=${result.selected?.search}`);
assert.equal(result.selected?.method, 'dropdown', 'Должен быть метод dropdown (быстрый выбор)');
const field = findField(result, 'Контрагент');
log(`Контрагент value='${field?.value}'`);
assert.includes(field?.value || '', 'Север', 'Контрагент должен показать выбранное значение');
await closeForm();
});
}