Skip to content

Commit 762637d

Browse files
committed
[WIP] Introduce a GitHub Actions workflow for running the integration tests
1 parent 7d3b2a6 commit 762637d

13 files changed

Lines changed: 101 additions & 5 deletions
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Integration tests
2+
on:
3+
push:
4+
paths:
5+
- '.github/workflows/integration_tests.yml'
6+
branches:
7+
- master
8+
pull_request:
9+
paths:
10+
- '.github/workflows/integration_tests.yml'
11+
branches:
12+
- master
13+
workflow_dispatch:
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
test:
19+
name: Test
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
node-version: [lts/*]
25+
os: [windows-latest, ubuntu-latest]
26+
27+
runs-on: ${{ matrix.os }}
28+
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v4
32+
with:
33+
fetch-depth: 0
34+
35+
- name: Use Node.js ${{ matrix.node-version }}
36+
uses: actions/setup-node@v4
37+
with:
38+
node-version: ${{ matrix.node-version }}
39+
40+
- name: Install dependencies
41+
run: npm ci
42+
43+
- name: Run integration tests
44+
run: npx gulp integrationtest --headless

test/integration/annotation_spec.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ describe("Checkbox annotation", () => {
164164
let pages;
165165

166166
beforeEach(async () => {
167+
pending("Linked PDFs are not supported.");
167168
pages = await loadAndWait("bug1847733.pdf", "[data-annotation-id='18R']");
168169
});
169170

test/integration/autolinker_spec.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ describe("autolinker", function () {
219219
let pages;
220220

221221
beforeEach(async () => {
222+
pending("Linked PDFs are not supported.");
222223
pages = await loadAndWait(
223224
"issue3115r.pdf",
224225
".annotationLayer",

test/integration/find_spec.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ describe("find bar", () => {
9090
let pages;
9191

9292
beforeEach(async () => {
93+
pending("Linked PDFs are not supported.");
9394
pages = await loadAndWait("xfa_imm5257e.pdf", ".xfaLayer");
9495
});
9596

test/integration/freetext_editor_spec.mjs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ describe("FreeText Editor", () => {
8787
let pages;
8888

8989
beforeEach(async () => {
90+
pending("Linked PDFs are not supported.");
9091
pages = await loadAndWait("aboutstacks.pdf", ".annotationEditorLayer");
9192
});
9293

@@ -131,6 +132,7 @@ describe("FreeText Editor", () => {
131132
});
132133

133134
it("must copy/paste", async () => {
135+
pending("Doesn't work in headless mode in Firefox.");
134136
// Run sequentially to avoid clipboard issues.
135137
for (const [browserName, page] of pages) {
136138
await switchToFreeText(page);
@@ -211,6 +213,7 @@ describe("FreeText Editor", () => {
211213
});
212214

213215
it("must check that a paste has been undone", async () => {
216+
pending("Doesn't work in headless mode in Firefox.");
214217
// Run sequentially to avoid clipboard issues.
215218
for (const [, page] of pages) {
216219
await switchToFreeText(page);
@@ -431,6 +434,7 @@ describe("FreeText Editor", () => {
431434
let pages;
432435

433436
beforeEach(async () => {
437+
pending("Linked PDFs are not supported.");
434438
pages = await loadAndWait("aboutstacks.pdf", ".annotationEditorLayer");
435439
});
436440

@@ -439,6 +443,7 @@ describe("FreeText Editor", () => {
439443
});
440444

441445
it("must select/unselect several editors and check copy, paste and delete operations", async () => {
446+
pending("Doesn't work in headless mode in Chrome and Firefox.");
442447
// Run sequentially to avoid clipboard issues.
443448
for (const [browserName, page] of pages) {
444449
await switchToFreeText(page);
@@ -1096,6 +1101,7 @@ describe("FreeText Editor", () => {
10961101
});
10971102

10981103
it("must copy and paste an existing annotation", async () => {
1104+
pending("Doesn't work in headless mode in Firefox.");
10991105
// Run sequentially to avoid clipboard issues.
11001106
for (const [browserName, page] of pages) {
11011107
await switchToFreeText(page);
@@ -1387,6 +1393,7 @@ describe("FreeText Editor", () => {
13871393
});
13881394

13891395
it("must open an existing annotation and check that the position are good", async () => {
1396+
pending("Doesn't work in headless mode in Firefox.");
13901397
await Promise.all(
13911398
pages.map(async ([browserName, page]) => {
13921399
const toBinary = buf => {
@@ -1724,6 +1731,7 @@ describe("FreeText Editor", () => {
17241731
});
17251732

17261733
it("must check the position of moved editor", async () => {
1734+
pending("Doesn't work in headless mode in Firefox.");
17271735
await Promise.all(
17281736
pages.map(async ([browserName, page]) => {
17291737
await switchToFreeText(page);
@@ -1825,6 +1833,7 @@ describe("FreeText Editor", () => {
18251833
});
18261834

18271835
it("must check the position of an empty freetext", async () => {
1836+
pending("Doesn't work in headless mode in Firefox.");
18281837
await Promise.all(
18291838
pages.map(async ([browserName, page]) => {
18301839
await switchToFreeText(page);
@@ -2262,6 +2271,7 @@ describe("FreeText Editor", () => {
22622271
let pages;
22632272

22642273
beforeEach(async () => {
2274+
pending("Linked PDFs are not supported.");
22652275
pages = await loadAndWait("bug1823296.pdf", ".annotationEditorLayer");
22662276
});
22672277

@@ -3033,6 +3043,7 @@ describe("FreeText Editor", () => {
30333043
});
30343044

30353045
it("must check that a freetext is still there after having updated it and scroll the doc", async () => {
3046+
pending("Doesn't work in headless mode in Chrome.");
30363047
await Promise.all(
30373048
pages.map(async ([browserName, page]) => {
30383049
await switchToFreeText(page);

test/integration/highlight_editor_spec.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,7 @@ describe("Highlight Editor", () => {
594594
});
595595

596596
it("must check that the thickness is correctly updated", async () => {
597+
pending("Doesn't work in headless mode in Chrome.");
597598
await Promise.all(
598599
pages.map(async ([browserName, page]) => {
599600
await switchToHighlight(page);
@@ -852,6 +853,7 @@ describe("Highlight Editor", () => {
852853
let pages;
853854

854855
beforeEach(async () => {
856+
pending("Linked PDFs are not supported.");
855857
pages = await loadAndWait(
856858
"issue12233.pdf",
857859
".annotationEditorLayer",
@@ -1242,6 +1244,7 @@ describe("Highlight Editor", () => {
12421244
});
12431245

12441246
it("must check that the quadpoints for an highlight are almost correct", async () => {
1247+
pending("Doesn't work in headless mode in Chrome.");
12451248
await Promise.all(
12461249
pages.map(async ([browserName, page]) => {
12471250
await switchToHighlight(page);
@@ -1384,6 +1387,7 @@ describe("Highlight Editor", () => {
13841387
});
13851388

13861389
it("must check that the highlights are correctly hidden/shown", async () => {
1390+
pending("Doesn't work in headless mode in Chrome.");
13871391
await Promise.all(
13881392
pages.map(async ([browserName, page]) => {
13891393
await switchToHighlight(page);
@@ -1505,6 +1509,7 @@ describe("Highlight Editor", () => {
15051509
});
15061510

15071511
it("must check the focus order", async () => {
1512+
pending("Doesn't work in headless mode in Chrome.");
15081513
await Promise.all(
15091514
pages.map(async ([browserName, page]) => {
15101515
await switchToHighlight(page);
@@ -2138,6 +2143,7 @@ describe("Highlight Editor", () => {
21382143
});
21392144

21402145
it("must check that it's possible to draw on an image in a struct tree", async () => {
2146+
pending("Doesn't work in headless mode in Chrome.");
21412147
await Promise.all(
21422148
pages.map(async ([browserName, page]) => {
21432149
await switchToHighlight(page);
@@ -2271,6 +2277,7 @@ describe("Highlight Editor", () => {
22712277
});
22722278

22732279
it("must check that the popup disappears when a new annotation is created", async () => {
2280+
pending("Doesn't work in headless mode in Firefox.");
22742281
await Promise.all(
22752282
pages.map(async ([browserName, page]) => {
22762283
await switchToHighlight(page);
@@ -2508,6 +2515,7 @@ describe("Highlight Editor", () => {
25082515
});
25092516

25102517
it("must display correct message for multiple highlights", async () => {
2518+
pending("Doesn't work in headless mode in Chrome.");
25112519
await Promise.all(
25122520
pages.map(async ([browserName, page]) => {
25132521
await switchToHighlight(page);

test/integration/ink_editor_spec.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ describe("Ink Editor", () => {
5757
let pages;
5858

5959
beforeEach(async () => {
60+
pending("Linked PDFs are not supported.");
6061
pages = await loadAndWait("aboutstacks.pdf", ".annotationEditorLayer");
6162
});
6263

@@ -474,6 +475,7 @@ describe("Ink Editor", () => {
474475
});
475476

476477
it("must check that we can draw several times on the same canvas", async () => {
478+
pending("Doesn't work in headless mode in Chrome.");
477479
await Promise.all(
478480
pages.map(async ([browserName, page]) => {
479481
await switchToInk(page);
@@ -948,6 +950,7 @@ describe("Ink Editor", () => {
948950
});
949951

950952
it("must check that the popup disappears when a new drawing is created", async () => {
953+
pending("Doesn't work in headless mode in Chrome.");
951954
await Promise.all(
952955
pages.map(async ([browserName, page]) => {
953956
await switchToInk(page);

test/integration/jasmine-boot.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ async function runTests(results) {
5151
specDone(result) {
5252
// Report on the result of individual tests.
5353
++results.runs;
54-
if (result.failedExpectations.length > 0) {
54+
if (result.failedExpectations.length > 0 && !result.pendingReason) {
5555
++results.failures;
5656
console.log(`TEST-UNEXPECTED-FAIL | ${result.description}`);
5757
} else {
@@ -61,14 +61,14 @@ async function runTests(results) {
6161
specStarted(result) {},
6262
suiteDone(result) {
6363
// Report on the result of `afterAll` invocations.
64-
if (result.failedExpectations.length > 0) {
64+
if (result.failedExpectations.length > 0 && !result.pendingReason) {
6565
++results.failures;
6666
console.log(`TEST-UNEXPECTED-FAIL | ${result.description}`);
6767
}
6868
},
6969
suiteStarted(result) {
7070
// Report on the result of `beforeAll` invocations.
71-
if (result.failedExpectations.length > 0) {
71+
if (result.failedExpectations.length > 0 && !result.pendingReason) {
7272
++results.failures;
7373
console.log(`TEST-UNEXPECTED-FAIL | ${result.description}`);
7474
}

test/integration/scripting_spec.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,7 @@ describe("Interaction", () => {
810810
let pages;
811811

812812
beforeEach(async () => {
813+
pending("Linked PDFs are not supported.");
813814
pages = await loadAndWait("issue13132.pdf", getSelector("171R"));
814815
});
815816

@@ -1273,6 +1274,7 @@ describe("Interaction", () => {
12731274
let pages;
12741275

12751276
beforeEach(async () => {
1277+
pending("Linked PDFs are not supported.");
12761278
pages = await loadAndWait("bug1766987.pdf", getSelector("75R"));
12771279
});
12781280

@@ -1979,6 +1981,7 @@ describe("Interaction", () => {
19791981
let pages;
19801982

19811983
beforeEach(async () => {
1984+
pending("Linked PDFs are not supported.");
19821985
pages = await loadAndWait("issue16863.pdf", getSelector("334R"));
19831986
});
19841987

@@ -2118,6 +2121,7 @@ describe("Interaction", () => {
21182121
let pages;
21192122

21202123
beforeEach(async () => {
2124+
pending("Linked PDFs are not supported.");
21212125
pages = await loadAndWait("bug1860602.pdf", getSelector("22R"));
21222126
});
21232127

test/integration/signature_editor_spec.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ describe("Signature Editor", () => {
343343
});
344344

345345
it("must check copy and paste", async () => {
346+
pending("Doesn't work in headless mode in Firefox.");
346347
// Run sequentially to avoid clipboard issues.
347348
for (const [browserName, page] of pages) {
348349
await switchToSignature(page);
@@ -628,6 +629,7 @@ describe("Signature Editor", () => {
628629
});
629630

630631
it("must check that the signature has the correct aspect ratio", async () => {
632+
pending("Doesn't work in headless mode in Chrome and Firefox.");
631633
await Promise.all(
632634
pages.map(async ([browserName, page]) => {
633635
await switchToSignature(page);

0 commit comments

Comments
 (0)