feat(KAN-34): rework blocker and ticket history
CI/CD / preconditions (pull_request) Successful in 1m1s
CI/CD / test_and_check_app (pull_request) Successful in 8m50s
CI/CD / Publish immutable image (pull_request) Skipped

This commit is contained in:
2026-09-14 14:53:08 +02:00
parent d7407c58d6
commit bfda03c86c
9 changed files with 400 additions and 62 deletions
+57
View File
@@ -101,6 +101,63 @@ try {
}
await page.setViewportSize({ width: 390, height: 1000 });
await visit();
const blocker = content().locator('#ticket-blocker');
const blockerToggle = blocker.getByRole('checkbox', {
name: 'Mark ticket as blocked',
exact: true,
});
const blockerComment = blocker.getByLabel('Blocker comment', {
exact: true,
});
assert.equal(await blockerToggle.isChecked(), true);
assert.equal(
await blocker.getByText('Alex Morgan', { exact: true }).count(),
0,
);
assert.equal(
await content()
.locator('#ticket-history')
.getByText('Alex Morgan', { exact: true })
.count(),
1,
);
assert.equal(
await content()
.locator('#ticket-history')
.getByText('Status changed', { exact: true })
.count(),
1,
);
await blockerComment.fill('');
assert.equal(
await blockerComment.evaluate(
(element) => element.validity.valueMissing,
),
true,
);
await blockerComment.fill('Waiting for a production decision.');
await blocker.getByRole('button', { name: 'Save blocker' }).click();
await page.getByText('Ticket updated.', { exact: true }).waitFor();
assert.equal(
await blockerComment.inputValue(),
'Waiting for a production decision.',
);
assert.equal(
await content()
.locator('#ticket-metadata')
.getByText('Alex Morgan', { exact: true })
.count(),
2,
);
await blockerToggle.uncheck();
await blocker.getByRole('button', { name: 'Unblock ticket' }).click();
await blocker
.getByText('This ticket currently has no active blocker.', {
exact: true,
})
.waitFor();
assert.equal(await blocker.getByLabel('Blocker comment').count(), 0);
await visit();
await tabTo(edit());
await page.keyboard.press('Enter');
await page.getByLabel('Title', { exact: true }).fill('Unsaved title draft');
+26 -1
View File
@@ -108,9 +108,18 @@ const ticket = {
},
],
worklog_entries: [
{
id: 2,
actor: null,
actor_id: null,
entry_type: 'status_changed',
summary: 'Moved from Backlog to Delivery / In progress.',
created_at: '2026-09-11T13:00:00Z',
},
{
id: 1,
actor: user,
actor_id: user.id,
entry_type: 'created',
summary: 'Ticket created in the project backlog.',
created_at: '2026-09-11T12:00:00Z',
@@ -361,7 +370,19 @@ if (serve) {
if (params.has('reject')) {
params.set('rejected', '1');
} else {
savedForm = data;
savedForm = {
...data,
blocked_comment: data.is_blocked
? data.blocked_comment
: null,
field_values: data.field_values.map((fieldValue) => ({
...fieldValue,
user_value:
Number(fieldValue.value_user_id) === user.id
? user
: null,
})),
};
params.set('saved', data.title);
}
}
@@ -442,6 +463,9 @@ if (serve) {
'feature/ENG-42-cache',
'Cache implementation',
'Ticket created in the project backlog.',
'Ticket created',
'Status changed',
'System',
]) {
assert.ok(
html.includes(text),
@@ -452,6 +476,7 @@ if (serve) {
'description',
'checklist',
'metadata',
'blocker',
'relationships',
'history',
'git',