feat(activity): update summary cards to toggles and introduce export menu
This commit is contained in:
1 parent
73f4b539fe
commit
03b39e64f2
30 files changed
+2376
-238
No files matched your search
@@ -53,6 +53,45 @@ const extraSources: Record<string, Source[]> = {
|
||||
},
|
||||
],
|
||||
activity: [
|
||||
{
|
||||
board: officeBoard,
|
||||
group: 'Activity: filter cards',
|
||||
states: [
|
||||
'Default, no filter',
|
||||
'Card hover',
|
||||
'Card focus-visible',
|
||||
'Failed card active',
|
||||
'Active card hover',
|
||||
'Security card active',
|
||||
'Chip × hover',
|
||||
'Clear all hover',
|
||||
'Clear all focus-visible',
|
||||
'Card plus other filters',
|
||||
],
|
||||
alias: {},
|
||||
},
|
||||
{
|
||||
board: officeBoard,
|
||||
group: 'Activity: export',
|
||||
states: [
|
||||
'Menu open',
|
||||
'Menu, item hover',
|
||||
'Menu, filtered view',
|
||||
'Menu, nothing to export',
|
||||
'Menu, no permission',
|
||||
'Export button focus-visible',
|
||||
'Dialog: configure, CSV only',
|
||||
'Dialog: configure, CSV or JSON (proposed)',
|
||||
'Dialog: preparing download',
|
||||
'Dialog: download started',
|
||||
'Dialog: failed',
|
||||
'Dialog: nothing to export',
|
||||
'Dialog: not allowed (403)',
|
||||
'Toast: current view',
|
||||
'Toast: export all',
|
||||
],
|
||||
alias: {},
|
||||
},
|
||||
{
|
||||
board: officeBoard,
|
||||
group: 'Activity details',
|
||||
|
||||
@@ -3119,6 +3119,51 @@ async function filterActivityToNothing(page: Page) {
|
||||
}
|
||||
|
||||
const activityStates: Record<string, VisualState> = {
|
||||
'Default, no filter': activityClockSensitive,
|
||||
'Card hover': activityClockSensitive,
|
||||
'Card focus-visible': activityClockSensitive,
|
||||
'Failed card active': activityClockSensitive,
|
||||
'Active card hover': activityClockSensitive,
|
||||
'Security card active': activityClockSensitive,
|
||||
'Chip × hover': activityClockSensitive,
|
||||
'Clear all hover': activityClockSensitive,
|
||||
'Clear all focus-visible': activityClockSensitive,
|
||||
'Card plus other filters': activityClockSensitive,
|
||||
'Menu open': activityClockSensitive,
|
||||
'Menu, item hover': activityClockSensitive,
|
||||
'Menu, filtered view': activityClockSensitive,
|
||||
'Menu, no permission': activityClockSensitive,
|
||||
'Export button focus-visible': activityClockSensitive,
|
||||
'Dialog: configure, CSV only': activityClockSensitive,
|
||||
'Dialog: preparing download': activityClockSensitive,
|
||||
'Dialog: download started': activityClockSensitive,
|
||||
'Dialog: failed': activityClockSensitive,
|
||||
'Dialog: nothing to export': activityClockSensitive,
|
||||
'Dialog: not allowed (403)': activityClockSensitive,
|
||||
'Toast: current view': activityClockSensitive,
|
||||
'Toast: export all': activityClockSensitive,
|
||||
'Dialog: configure, CSV or JSON (proposed)': { path: '/activity', skip: 'pending' },
|
||||
'Menu, nothing to export': {
|
||||
path: '/activity',
|
||||
api: activityApi({
|
||||
'GET /v1/activity': {
|
||||
status: 200,
|
||||
bodyFor: (url) =>
|
||||
url.searchParams.has('q') ||
|
||||
url.searchParams.has('category') ||
|
||||
url.searchParams.has('outcome')
|
||||
? activityPage([], 0)
|
||||
: activityPage(activityBoardEvents, 1284),
|
||||
},
|
||||
}),
|
||||
steps: async (page) => {
|
||||
await filterActivityToNothing(page)
|
||||
await page.getByRole('button', { name: 'Export', exact: true }).click()
|
||||
await page.getByRole('menuitem').first().waitFor()
|
||||
await page.mouse.move(0, 0)
|
||||
await page.waitForTimeout(300)
|
||||
},
|
||||
},
|
||||
'Default, large dataset': activityClockSensitive,
|
||||
Loading: {
|
||||
path: '/activity',
|
||||
|
||||
Reference in new issue
Block a user