feat: improve sorting by count

This commit is contained in:
Marco Breiter
2024-05-12 23:45:36 +02:00
parent ac666df4ce
commit c114425844
5 changed files with 80 additions and 38 deletions

View File

@@ -22,7 +22,7 @@ test('basic filtering', async ({ page }) => {
await page.getByRole('button', { name: 'Correspondent' }).click()
await page.getByRole('menuitem', { name: 'Test Correspondent 1' }).click()
await page.getByRole('menuitem', { name: 'Correspondent 9' }).click()
await expect(page).toHaveURL(/correspondent__id__in=12,1/)
await expect(page).toHaveURL(/correspondent__id__in=1,12/)
await expect(page.locator('pngx-document-list')).toHaveText(/7 documents/)
await page
.locator('pngx-filter-editor')

View File

@@ -4113,7 +4113,7 @@
"time": 0.554,
"request": {
"method": "GET",
"url": "http://localhost:8000/api/documents/?page=1&page_size=50&ordering=-created&truncate_content=true&correspondent__id__in=12,1",
"url": "http://localhost:8000/api/documents/?page=1&page_size=50&ordering=-created&truncate_content=true&correspondent__id__in=1,12",
"httpVersion": "HTTP/1.1",
"cookies": [],
"headers": [
@@ -4148,7 +4148,7 @@
},
{
"name": "correspondent__id__in",
"value": "12,1"
"value": "1,12"
}
],
"headersSize": -1,