updated behavior journal
This commit is contained in:
1 parent
dc07026a88
commit
7397b85e69
8 files changed
+69
-21
No files matched your search
@@ -49,6 +49,15 @@ try {
|
||||
await page.getByRole('tab', { name: 'Behavior Journal' }).click();
|
||||
const journal = page.getByRole('tabpanel', { name: 'Behavior Journal' });
|
||||
await journal.getByText('1 occurrence this month', { exact: true }).waitFor();
|
||||
await journal.getByLabel('Journal view').selectOption('range');
|
||||
await journal.getByLabel('Start date', { exact: true }).fill('2026-09-30');
|
||||
await journal.getByLabel('End date', { exact: true }).fill('2026-11-01');
|
||||
await journal.getByText('4 occurrences in this date range', { exact: true }).waitFor();
|
||||
assert.equal(await journal.locator('details').count(), 4);
|
||||
await journal.getByLabel('Start date', { exact: true }).fill('2026-11-01');
|
||||
await journal.getByText('2 occurrences in this date range', { exact: true }).waitFor(); // Both repeated hours on the inclusive end date.
|
||||
await journal.getByLabel('Journal view').selectOption('month');
|
||||
await journal.getByText('1 occurrence this month', { exact: true }).waitFor();
|
||||
await journal.getByRole('button', { name: 'Record behavior' }).click();
|
||||
assert.match(await journal.getByLabel('Date and time', { exact: true }).inputValue(), /^2026-10-05T12:00(:00)?$/);
|
||||
await journal.getByLabel('Behavior', { exact: true }).selectOption('custom');
|
||||
@@ -104,9 +113,9 @@ try {
|
||||
await editedEntry.getByRole('button', { name: 'Delete', exact: true }).click();
|
||||
await journal.getByText('Occurrence deleted.', { exact: true }).waitFor();
|
||||
await journal.getByRole('button', { name: '10/5/2026: 1 occurrences', exact: true }).waitFor();
|
||||
await journal.getByLabel('Bird', { exact: true }).selectOption(secondBird);
|
||||
await page.locator('.bird-card-select').filter({ hasText: 'Willow' }).click();
|
||||
await journal.getByText('0 occurrences this month', { exact: true }).waitFor();
|
||||
await journal.getByLabel('Bird', { exact: true }).selectOption(bird);
|
||||
await page.locator('.bird-card-select').filter({ hasText: 'Piper' }).click();
|
||||
await journal.getByText('2 occurrences this month', { exact: true }).waitFor();
|
||||
await page.setViewportSize({ width: 1280, height: 1000 });
|
||||
await journal.scrollIntoViewIfNeeded();
|
||||
@@ -124,7 +133,7 @@ try {
|
||||
await utcJournal.getByRole('button', { name: '10/1/2026: 2 occurrences', exact: true }).waitFor();
|
||||
await utcContext.close();
|
||||
assert.deepEqual(errors, []);
|
||||
console.log('PASS: browser create/custom type/edit/delete, bird/behavior filters, month navigation, multiple events/day, local midnight and DST, and mobile layout.');
|
||||
console.log('PASS: browser create/custom type/edit/delete, member journals and behavior filters, month navigation, multiple events/day, local midnight and DST, and mobile layout.');
|
||||
} catch (error) {
|
||||
if (page) {
|
||||
console.error(await page.locator('.behavior-journal').innerText().catch(() => 'Journal unavailable'));
|
||||
|
||||
Reference in new issue
Block a user