refac: stale test entries, failing web tests, Postgre backup bug, Hardcoded MySQL table count, Stale Postgre connection in test, own-scope visibility filter, GetAll ignoring its error, JSON tags in use-case types, 31 copies of DESKTOP_QUERY, ProfileView endpoint paths
This commit is contained in:
1 parent
efecdee200
commit
5d6f378fce
87 files changed
+696
-373
No files matched your search
@@ -85,7 +85,7 @@ describe('Single relation, empty, focused search', () => {
|
||||
await typeSearch('venue', 'rue ')
|
||||
await settleSearch(vi)
|
||||
|
||||
expect(searches()).toEqual(['/v1/content-type/venues/entry?q=rue&page=1&size=10'])
|
||||
expect(searches()).toEqual(['/v1/content-type/venues/entry?q=rue&page=1&size=25'])
|
||||
expect(optionLabels()).toEqual([
|
||||
'Rue Verte hall Lyon · 120 seats',
|
||||
'Rue Verte yard Lyon · outdoor',
|
||||
@@ -103,7 +103,7 @@ describe('Single relation, empty, focused search', () => {
|
||||
|
||||
await openList('venue', vi)
|
||||
|
||||
expect(searches()).toEqual(['/v1/content-type/venues/entry?page=1&size=10'])
|
||||
expect(searches()).toEqual(['/v1/content-type/venues/entry?page=1&size=25'])
|
||||
expect(optionLabels()).toHaveLength(4)
|
||||
})
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ describe('No match', () => {
|
||||
await flushPromises()
|
||||
await settleSearch(vi)
|
||||
expect(relationInput('venue').value).toBe('')
|
||||
expect(searches().at(-1)).toBe('/v1/content-type/venues/entry?page=1&size=10')
|
||||
expect(searches().at(-1)).toBe('/v1/content-type/venues/entry?page=1&size=25')
|
||||
})
|
||||
|
||||
it('says the type has no entries at all', async () => {
|
||||
@@ -123,7 +123,7 @@ describe('Search failures', () => {
|
||||
await flushPromises()
|
||||
|
||||
expect(calls.slice(before)).toEqual([
|
||||
'/v1/content-type/venues/entry?q=rue&page=1&size=10',
|
||||
'/v1/content-type/venues/entry?q=rue&page=1&size=25',
|
||||
])
|
||||
expect(optionLabels()).toHaveLength(3)
|
||||
},
|
||||
@@ -175,7 +175,7 @@ describe('Load more', () => {
|
||||
button('Load more')!.click()
|
||||
await flushPromises()
|
||||
|
||||
expect(searches().at(-1)).toBe('/v1/content-type/venues/entry?page=2&size=10')
|
||||
expect(searches().at(-1)).toBe('/v1/content-type/venues/entry?page=2&size=25')
|
||||
expect(optionLabels()).toHaveLength(12)
|
||||
expect(button('Load more')).toBeUndefined()
|
||||
})
|
||||
|
||||
@@ -652,8 +652,7 @@ describe('Errors', () => {
|
||||
'The expiry must be a date in the future.',
|
||||
'You must be logged in to access this resource.',
|
||||
'This action needs a real session.',
|
||||
'Only owners and admins can do this.',
|
||||
'Only the owner can do this.',
|
||||
'missing_permission',
|
||||
'You must verify your account to access this resource.',
|
||||
'Article not found',
|
||||
'Image not found',
|
||||
@@ -697,8 +696,7 @@ describe('Errors table rows of the custom content types round', () => {
|
||||
|
||||
const order = [
|
||||
'This action needs a real session.',
|
||||
'Only owners and admins can do this.',
|
||||
'Only the owner can do this.',
|
||||
'missing_permission',
|
||||
'You must verify your account to access this resource.',
|
||||
].map((message) => text.indexOf(message))
|
||||
expect(order.every((position) => position > -1)).toBe(true)
|
||||
@@ -909,7 +907,7 @@ describe('Expanded cards of the custom content types round', () => {
|
||||
[
|
||||
'POST /v1/content-type/',
|
||||
['key', 'name', 'icon', 'fields'],
|
||||
['400', '401', 'Only owners and admins can do this.', 'content_type_key_taken'],
|
||||
['400', '401', '403', 'content_type_key_taken'],
|
||||
],
|
||||
[
|
||||
'PUT /v1/content-type/{key}',
|
||||
@@ -1134,7 +1132,7 @@ describe('Authentication copy of the custom content types round', () => {
|
||||
"Requests act as the user who created the key, with that user's role (owner or admin).",
|
||||
)
|
||||
expect(auth).toContain(
|
||||
'Owner and admin routes answer 403 to a key whose creator is neither.',
|
||||
'Routes that need a permission answer 403 "missing_permission" to a key when the role of its creator does not hold it.',
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -187,7 +187,7 @@ describe('Search and sharing group', () => {
|
||||
const wrapper = await mountIntegration()
|
||||
|
||||
const forbidden = ERROR_ROWS.find((row) => row.status === 403)!
|
||||
expect(forbidden.messages).toHaveLength(4)
|
||||
expect(forbidden.messages).toHaveLength(3)
|
||||
expect(forbidden.note).toBe(NOTE)
|
||||
const notes = wrapper.findAll('[data-testid="error-note"]').map((item) => item.text())
|
||||
expect(notes.filter((item) => item === NOTE)).toHaveLength(2)
|
||||
|
||||
Reference in new issue
Block a user