-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathadvisory.ts
More file actions
41 lines (37 loc) · 1.04 KB
/
advisory.ts
File metadata and controls
41 lines (37 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import { test } from "../fixtures";
import {
testBasicSort,
validateDateSorting,
validateSortDirectionDiffers,
} from "../helpers/sorting-helpers";
test.describe("Advisory sorting validation", () => {
test("Sort advisories by ID ascending", async ({ axios }) => {
await testBasicSort(axios, "/api/v2/advisory", "id", "asc");
});
test("Sort advisories by ID descending", async ({ axios }) => {
await validateSortDirectionDiffers(
axios,
"/api/v2/advisory",
"id",
(item) => item.identifier,
);
});
test("Sort advisories by modified date ascending", async ({ axios }) => {
const items = await testBasicSort(
axios,
"/api/v2/advisory",
"modified",
"asc",
);
validateDateSorting(items, "modified", "ascending");
});
test("Sort advisories by modified date descending", async ({ axios }) => {
const items = await testBasicSort(
axios,
"/api/v2/advisory",
"modified",
"desc",
);
validateDateSorting(items, "modified", "descending");
});
});