feat: sites and authors integration into existing screens (& formated all frontend files kinda accidentally)
This commit is contained in:
1 parent
3d81d2c717
commit
6b8990c55e
239 files changed
+9194
-1354
No files matched your search
@@ -89,7 +89,10 @@ describe('Navigation', () => {
|
||||
expect(activity.getAttribute('aria-current')).toBe('page')
|
||||
await expectIcon(activity, 'history')
|
||||
expect(textOf(document.body.querySelector('nav[aria-label="breadcrumb"]'))).toBe('Activity')
|
||||
expect(router.currentRoute.value.meta).toEqual({ auth: 'verified', title: 'Activity' })
|
||||
expect(router.currentRoute.value.meta).toEqual({
|
||||
auth: 'verified',
|
||||
title: 'Activity',
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@@ -140,7 +143,11 @@ describe('Default: an owner sees the strip, the filter bar and a day-grouped tab
|
||||
await mountActivity()
|
||||
|
||||
expect(callsTo(LIST_PATH)).toHaveLength(1)
|
||||
expect(queryObject(callsTo(LIST_PATH)[0])).toEqual({ range: '7d', page: '1', size: '25' })
|
||||
expect(queryObject(callsTo(LIST_PATH)[0])).toEqual({
|
||||
range: '7d',
|
||||
page: '1',
|
||||
size: '25',
|
||||
})
|
||||
expect(callsTo(SUMMARY_PATH)).toHaveLength(1)
|
||||
expect(queryObject(callsTo(SUMMARY_PATH)[0])).toEqual({ range: '7d' })
|
||||
})
|
||||
@@ -223,7 +230,11 @@ describe('Rows: the Actor cell and the sentence follow the event', () => {
|
||||
},
|
||||
{
|
||||
name: 'failed publish',
|
||||
item: makeItem({ id: 5, actor: user(4, 'Inès Duarte'), outcome: 'failed' }),
|
||||
item: makeItem({
|
||||
id: 5,
|
||||
actor: user(4, 'Inès Duarte'),
|
||||
outcome: 'failed',
|
||||
}),
|
||||
actor: 'Inès Duarte',
|
||||
sentence: 'Failed to publish the article Spring release',
|
||||
badge: 'Failed',
|
||||
@@ -370,7 +381,14 @@ describe('Rows: targets', () => {
|
||||
|
||||
it('renders an unknown action code as it is and still opens the details', async () => {
|
||||
await mountActivity({
|
||||
list: () => pageOf([makeItem({ id: 1, action: 'article.archive', target: null })]),
|
||||
list: () =>
|
||||
pageOf([
|
||||
makeItem({
|
||||
id: 1,
|
||||
action: 'article.archive',
|
||||
target: null,
|
||||
}),
|
||||
]),
|
||||
})
|
||||
|
||||
const row = rows()[0]!
|
||||
@@ -486,7 +504,11 @@ describe('Strip', () => {
|
||||
[40, 40, 'No change'],
|
||||
])('reads the Total sub-line for %i against %i as %s', async (total, previous, subline) => {
|
||||
await mountActivity({
|
||||
summary: () => ({ ...summaryDefault, total, previous_total: previous }),
|
||||
summary: () => ({
|
||||
...summaryDefault,
|
||||
total,
|
||||
previous_total: previous,
|
||||
}),
|
||||
})
|
||||
|
||||
expect(stripTexts()[0]).toContain(subline)
|
||||
@@ -530,7 +552,10 @@ describe('Strip', () => {
|
||||
|
||||
describe('Empty states', () => {
|
||||
it('shows No activity yet with Export disabled and no table or pager', async () => {
|
||||
await mountActivity({ list: () => pageOf([], { total: 0 }), summary: () => summaryNone })
|
||||
await mountActivity({
|
||||
list: () => pageOf([], { total: 0 }),
|
||||
summary: () => summaryNone,
|
||||
})
|
||||
|
||||
expect(pageText()).toContain('No activity yet')
|
||||
expect(pageText()).toContain(
|
||||
|
||||
Reference in new issue
Block a user