feat(KAN-32): add hierarchical acceptance criteria checklist
CI/CD / preconditions (pull_request) Successful in 1m4s
CI/CD / test_and_check_app (pull_request) Failing after 9m1s
CI/CD / Publish immutable image (pull_request) Skipped

This commit is contained in:
2026-09-14 10:18:00 +02:00
parent 5c47453d4d
commit b54cb68b22
13 changed files with 855 additions and 256 deletions
+19 -9
View File
@@ -10,7 +10,7 @@ page.setDefaultTimeout(10000);
const base = 'http://127.0.0.1:4185/projects/7/tickets';
const errors = [];
page.on('pageerror', (error) => errors.push(error.message));
const field = (label) => page.getByLabel(label, { exact: true });
const field = (label) => form().getByLabel(label, { exact: true });
const form = () => page.locator('form').first();
const state = (value) =>
form().locator(`[data-form-state="${value}"]`).waitFor();
@@ -29,9 +29,19 @@ async function fill(create) {
await field('Assignee').selectOption('2');
await field('Parent ticket').selectOption('40');
await field('Estimated story points').fill('0');
await field('Acceptance criteria checklist').fill(
'[ ] Main criterion\n [x] Nested criterion',
);
if (create) {
await button('Add criterion').click();
await button('Add criterion').click();
await button('Indent criterion 2').click();
}
await field('Criterion 1').fill('Main criterion');
await field('Criterion 2').fill('Nested criterion');
await form()
.getByRole('checkbox', {
name: 'Complete criterion 2: Nested criterion',
exact: true,
})
.check();
if (create) {
await field('Status').selectOption('4');
} else {
@@ -154,7 +164,7 @@ try {
'Assignee',
'Parent ticket',
'Estimated story points',
'Acceptance criteria checklist',
'Criterion 1',
...(create
? ['Status']
: ['Author', 'Blocker comment', 'Impact score', 'Reviewer']),
@@ -231,12 +241,12 @@ try {
.waitFor();
if (create) {
await page.goBack();
await page
.getByRole('heading', { name: 'Create ticket', exact: true })
.waitFor();
await field('Title').waitFor();
assert.equal(await field('Title').inputValue(), '');
assert.equal(
await field('Acceptance criteria checklist').inputValue(),
'',
);
assert.equal(await field('Criterion 1').count(), 0);
} else {
await form()
.getByText('All changes saved', { exact: true })