feat(KAN-32): add hierarchical acceptance criteria checklist
This commit is contained in:
@@ -320,15 +320,18 @@ try {
|
||||
await page.goto(`${base}/projects/7/tickets/create`);
|
||||
await page.locator('#title').fill('New ticket draft');
|
||||
await page.locator('#description').fill('Keep this description');
|
||||
await page.getByRole('button', { name: 'Add criterion' }).click();
|
||||
await page
|
||||
.locator('#acceptance_criteria_checklist')
|
||||
.fill('[ ] Keep this checklist');
|
||||
.getByRole('textbox', { name: 'Criterion 1', exact: true })
|
||||
.fill('Keep this checklist');
|
||||
await setResult('validation');
|
||||
await page.locator('form button[type="submit"]').first().click();
|
||||
await state('validation');
|
||||
assert.equal(
|
||||
await page.locator('#acceptance_criteria_checklist').inputValue(),
|
||||
'[ ] Keep this checklist',
|
||||
await page
|
||||
.getByRole('textbox', { name: 'Criterion 1', exact: true })
|
||||
.inputValue(),
|
||||
'Keep this checklist',
|
||||
);
|
||||
await page.route('**/projects/7/tickets', (route) => route.abort('failed'));
|
||||
await page.locator('form button[type="submit"]').first().click();
|
||||
@@ -349,8 +352,10 @@ try {
|
||||
await page.locator('#title').waitFor();
|
||||
assert.equal(await page.locator('#title').inputValue(), 'New ticket draft');
|
||||
assert.equal(
|
||||
await page.locator('#acceptance_criteria_checklist').inputValue(),
|
||||
'[ ] Keep this checklist',
|
||||
await page
|
||||
.getByRole('textbox', { name: 'Criterion 1', exact: true })
|
||||
.inputValue(),
|
||||
'Keep this checklist',
|
||||
);
|
||||
await setResult('success');
|
||||
await page.locator('form button[type="submit"]').first().click();
|
||||
@@ -359,9 +364,10 @@ try {
|
||||
await page.goto(`${base}/projects/7/tickets/31`);
|
||||
await page.locator('#ticket-edit > summary').click();
|
||||
await page.locator('#title').fill('Updated ticket draft');
|
||||
await page.getByRole('button', { name: 'Add criterion' }).click();
|
||||
await page
|
||||
.locator('#acceptance_criteria_checklist')
|
||||
.fill('[ ] Edited checklist');
|
||||
.getByRole('textbox', { name: 'Criterion 1', exact: true })
|
||||
.fill('Edited checklist');
|
||||
await setResult('server');
|
||||
await page.locator('form button[type="submit"]').first().click();
|
||||
await state('server');
|
||||
@@ -370,8 +376,10 @@ try {
|
||||
'Updated ticket draft',
|
||||
);
|
||||
assert.equal(
|
||||
await page.locator('#acceptance_criteria_checklist').inputValue(),
|
||||
'[ ] Edited checklist',
|
||||
await page
|
||||
.getByRole('textbox', { name: 'Criterion 1', exact: true })
|
||||
.inputValue(),
|
||||
'Edited checklist',
|
||||
);
|
||||
await setResult('success');
|
||||
await page.getByRole('button', { name: 'Try again' }).click();
|
||||
|
||||
Reference in New Issue
Block a user