From 4437ae0fd3152168e3ea7a6ff963190e5d032e91 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 27 Dec 2023 16:18:18 +0100 Subject: [PATCH] Add FEP-2677 tests --- client/src/app/core/rest/rest-table.ts | 2 ++ packages/tests/src/misc-endpoints.ts | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/client/src/app/core/rest/rest-table.ts b/client/src/app/core/rest/rest-table.ts index f2db6118f..b30f905a8 100644 --- a/client/src/app/core/rest/rest-table.ts +++ b/client/src/app/core/rest/rest-table.ts @@ -52,6 +52,8 @@ export abstract class RestTable { loadLazy (event: TableLazyLoadEvent) { debugLogger('Load lazy %o.', event) + this.router.navigate([ '.' ], { relativeTo: this.route, queryParams: { start: event.first } }) + this.sort = { order: event.sortOrder, field: event.sortField as string diff --git a/packages/tests/src/misc-endpoints.ts b/packages/tests/src/misc-endpoints.ts index 95c01061f..4c163f59a 100644 --- a/packages/tests/src/misc-endpoints.ts +++ b/packages/tests/src/misc-endpoints.ts @@ -47,8 +47,12 @@ describe('Test misc endpoints', function () { }) expect(res.body.links).to.be.an('array') - expect(res.body.links).to.have.lengthOf(1) + expect(res.body.links).to.have.lengthOf(2) + expect(res.body.links[0].rel).to.equal('http://nodeinfo.diaspora.software/ns/schema/2.0') + + expect(res.body.links[1].rel).to.equal('https://www.w3.org/ns/activitystreams#Application') + expect(res.body.links[1].href).to.equal(server.url + '/accounts/peertube') }) it('Should get dnt policy text', async function () {