Isolate the autolinker integration tests
To avoid being able to introduce dependencies between tests this commit makes sure that we close the document between tests so that we can't accidentally rely on state set by a previous test.
This commit is contained in:
parent
e1cbba4ded
commit
a60f9bc612
@ -63,7 +63,7 @@ describe("autolinker", function () {
|
|||||||
describe("bug1019475_2.pdf", function () {
|
describe("bug1019475_2.pdf", function () {
|
||||||
let pages;
|
let pages;
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeEach(async () => {
|
||||||
pages = await loadAndWait(
|
pages = await loadAndWait(
|
||||||
"bug1019475_2.pdf",
|
"bug1019475_2.pdf",
|
||||||
".annotationLayer",
|
".annotationLayer",
|
||||||
@ -75,7 +75,7 @@ describe("autolinker", function () {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
afterAll(async () => {
|
afterEach(async () => {
|
||||||
await closePages(pages);
|
await closePages(pages);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -99,7 +99,7 @@ describe("autolinker", function () {
|
|||||||
describe("bug1019475_1.pdf", function () {
|
describe("bug1019475_1.pdf", function () {
|
||||||
let pages;
|
let pages;
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeEach(async () => {
|
||||||
pages = await loadAndWait(
|
pages = await loadAndWait(
|
||||||
"bug1019475_1.pdf",
|
"bug1019475_1.pdf",
|
||||||
".annotationLayer",
|
".annotationLayer",
|
||||||
@ -111,7 +111,7 @@ describe("autolinker", function () {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
afterAll(async () => {
|
afterEach(async () => {
|
||||||
await closePages(pages);
|
await closePages(pages);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -138,14 +138,14 @@ describe("autolinker", function () {
|
|||||||
describe("pr19449.pdf", function () {
|
describe("pr19449.pdf", function () {
|
||||||
let pages;
|
let pages;
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeEach(async () => {
|
||||||
pages = await loadAndWait("pr19449.pdf", ".annotationLayer", null, null, {
|
pages = await loadAndWait("pr19449.pdf", ".annotationLayer", null, null, {
|
||||||
docBaseUrl: "http://example.com",
|
docBaseUrl: "http://example.com",
|
||||||
enableAutoLinking: true,
|
enableAutoLinking: true,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
afterAll(async () => {
|
afterEach(async () => {
|
||||||
await closePages(pages);
|
await closePages(pages);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -172,7 +172,7 @@ describe("autolinker", function () {
|
|||||||
describe("PR 19470", function () {
|
describe("PR 19470", function () {
|
||||||
let pages;
|
let pages;
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeEach(async () => {
|
||||||
pages = await loadAndWait(
|
pages = await loadAndWait(
|
||||||
"bug1019475_2.pdf",
|
"bug1019475_2.pdf",
|
||||||
".annotationLayer",
|
".annotationLayer",
|
||||||
@ -184,7 +184,7 @@ describe("autolinker", function () {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
afterAll(async () => {
|
afterEach(async () => {
|
||||||
await closePages(pages);
|
await closePages(pages);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -218,7 +218,7 @@ describe("autolinker", function () {
|
|||||||
describe("when highlighting search results", function () {
|
describe("when highlighting search results", function () {
|
||||||
let pages;
|
let pages;
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeEach(async () => {
|
||||||
pages = await loadAndWait(
|
pages = await loadAndWait(
|
||||||
"issue3115r.pdf",
|
"issue3115r.pdf",
|
||||||
".annotationLayer",
|
".annotationLayer",
|
||||||
@ -228,7 +228,7 @@ describe("autolinker", function () {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
afterAll(async () => {
|
afterEach(async () => {
|
||||||
await closePages(pages);
|
await closePages(pages);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user