test: exercise Todo reminder controls from source
This commit is contained in:
@@ -27,7 +27,13 @@ test.describe('Todo plugin workflow', () => {
|
||||
await todos.locator('[data-todo-input="description"]').fill('Collect factual review notes.');
|
||||
await todos.locator('[data-todo-input="priority"]').selectOption('high');
|
||||
await todos.locator('[data-todo-input="dueAt"]').fill('2000-01-01');
|
||||
await todos.locator('[data-todo-input="reminderAt"]').fill('2000-01-01T09:00');
|
||||
await todos.locator('[data-todo-input="reminderDate"]').fill('2000-01-01');
|
||||
const reminderHour = todos.locator('[data-todo-input="reminderHour"]');
|
||||
const reminderMinute = todos.locator('[data-todo-input="reminderMinute"]');
|
||||
await expect(reminderHour).toHaveCSS('appearance', 'none');
|
||||
await expect(reminderMinute).toHaveCSS('appearance', 'none');
|
||||
await reminderHour.selectOption('09');
|
||||
await reminderMinute.selectOption('30');
|
||||
await todos.locator('[data-todo-action="save"]').click();
|
||||
|
||||
await expect(todos).toContainText('Overdue');
|
||||
@@ -37,7 +43,7 @@ test.describe('Todo plugin workflow', () => {
|
||||
const settings = Array.isArray(result) ? result[0] : result;
|
||||
const todo = settings['todos:global'].find((item) => item.title === 'Prepare project review');
|
||||
return todo && [todo.workspaceRootPath, todo.priority, todo.dueAt, todo.reminderAt].join('|');
|
||||
})).toBe('Project|high|2000-01-01|2000-01-01T09:00');
|
||||
})).toBe('Project|high|2000-01-01|2000-01-01T09:30');
|
||||
|
||||
await todos.locator('[data-todo-action="edit"]').click();
|
||||
await todos.locator('[data-todo-input="title"]').fill('Prepare project review updated');
|
||||
|
||||
@@ -24,7 +24,9 @@ test.describe('Workspace templates', () => {
|
||||
|
||||
test('creation modal validates names, shows template tools, and persists the selected snapshot', async ({ page }) => {
|
||||
const modal = await openCreateModal(page);
|
||||
await expect(modal.locator('[data-workspace-template]')).toHaveValue('default');
|
||||
const templateSelect = modal.locator('[data-workspace-template]');
|
||||
await expect(templateSelect).toHaveValue('default');
|
||||
await expect(templateSelect).toHaveCSS('appearance', 'none');
|
||||
await expect(modal.locator('[data-workspace-template-tools]')).toContainText('Notes');
|
||||
await expect(modal.locator('[data-workspace-template-tools]')).toContainText('Browser Inbox');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user