Isolate the copy/paste 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
0e9e4ec64f
commit
179859f54a
@ -40,12 +40,12 @@ describe("Copy and paste", () => {
|
|||||||
describe("all text", () => {
|
describe("all text", () => {
|
||||||
let pages;
|
let pages;
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeEach(async () => {
|
||||||
pages = await loadAndWait("tracemonkey.pdf", "#hiddenCopyElement", 100);
|
pages = await loadAndWait("tracemonkey.pdf", "#hiddenCopyElement", 100);
|
||||||
await mockClipboard(pages);
|
await mockClipboard(pages);
|
||||||
});
|
});
|
||||||
|
|
||||||
afterAll(async () => {
|
afterEach(async () => {
|
||||||
await closePages(pages);
|
await closePages(pages);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -137,7 +137,7 @@ describe("Copy and paste", () => {
|
|||||||
describe("Copy/paste and ligatures", () => {
|
describe("Copy/paste and ligatures", () => {
|
||||||
let pages;
|
let pages;
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeEach(async () => {
|
||||||
pages = await loadAndWait(
|
pages = await loadAndWait(
|
||||||
"copy_paste_ligatures.pdf",
|
"copy_paste_ligatures.pdf",
|
||||||
"#hiddenCopyElement",
|
"#hiddenCopyElement",
|
||||||
@ -146,7 +146,7 @@ describe("Copy and paste", () => {
|
|||||||
await mockClipboard(pages);
|
await mockClipboard(pages);
|
||||||
});
|
});
|
||||||
|
|
||||||
afterAll(async () => {
|
afterEach(async () => {
|
||||||
await closePages(pages);
|
await closePages(pages);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user