...
 
Commits (1)
......@@ -15,13 +15,13 @@ describe("default", () => {
it("should set the running header as \"a '' this \" ' aa\" on the first page", async () => {
let text = await page.$eval(".pagedjs_first_page", (r) =>
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-alphabet"));
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-first-alphabet"));
expect(text).toEqual("\"a ' this \\\" ' aa\"");
});
it("should set the running header as \"fff\" on the second page", async () => {
let text = await page.$eval("#page-2", (r) =>
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-alphabet"));
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-first-alphabet"));
expect(text).toEqual("\"fff\"");
});
});
......@@ -41,13 +41,13 @@ describe("first", () => {
it("should set the running header as \"aaa\" on the first page", async () => {
let text = await page.$eval(".pagedjs_first_page", (r) =>
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-alphabet"));
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-first-alphabet"));
expect(text).toEqual("\"aaa\"");
});
it("should set the running header as \"fff\" on the second page", async () => {
let text = await page.$eval("#page-2", (r) =>
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-alphabet"));
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-first-alphabet"));
expect(text).toEqual("\"fff\"");
});
});
......@@ -67,13 +67,13 @@ describe("last", () => {
it("should set the running header as \"fff\" on the first page", async () => {
let text = await page.$eval(".pagedjs_first_page", (r) =>
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-alphabet"));
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-first-alphabet"));
expect(text).toEqual("\"fff\"");
});
it("should set the running header as \"fff\" on the second page", async () => {
let text = await page.$eval("#page-2", (r) =>
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-alphabet"));
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-first-alphabet"));
expect(text).toEqual("\"fff\"");
});
});
......@@ -93,13 +93,13 @@ describe("first-except", () => {
it("should set the running header as nothing on the first page", async () => {
let text = await page.$eval(".pagedjs_first_page", (r) =>
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-alphabet"));
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-first-alphabet"));
expect(text).toEqual("\"\"");
});
it("should set the running header as \"aaa\" on the second page", async () => {
let text = await page.$eval("#page-2", (r) =>
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-alphabet"));
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-first-alphabet"));
expect(text).toEqual("\"aaa\"");
});
});
......@@ -121,18 +121,18 @@ describe("string-start", () => {
// See https://www.w3.org/TR/css-gcpm-3/#string-start
it("should set the running header as nothing on the first page", async () => {
let text = await page.$eval(".pagedjs_first_page", (r) =>
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-alphabet"));
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-first-alphabet"));
expect(text).toEqual("\"\"");
});
it("should set the running header as \"fff\" on the third page", async () => {
let text = await page.$eval("#page-3", (r) =>
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-alphabet"));
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-first-alphabet"));
expect(text).toEqual("\"fff\"");
});
it("should set the running header as \"ggg\" on page 4", async () => {
let text = await page.$eval("#page-4", (r) =>
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-alphabet"));
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-first-alphabet"));
expect(text).toEqual("\"ggg\"");
});
});
......@@ -152,22 +152,22 @@ describe("string-multiple", () => {
it("should set the running header as \"aaa\" on the second page", async () => {
let text = await page.$eval("#page-2", (r) =>
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-alphabet"));
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-first-alphabet"));
expect(text).toEqual("\"aaa\"");
});
it("should set the running header as \"1111\" on the second page", async () => {
let text = await page.$eval("#page-2", (r) =>
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-alphabetbis"));
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-first-alphabetbis"));
expect(text).toEqual("\"1111\"");
});
it("should set the running header as \"fff\" on the third page", async () => {
let text = await page.$eval("#page-9", (r) =>
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-alphabet"));
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-first-alphabet"));
expect(text).toEqual("\"bbb\"");
});
it("should set the running header as \"fff\" on the third page", async () => {
let text = await page.$eval("#page-9", (r) =>
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-alphabetbis"));
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-first-alphabetbis"));
expect(text).toEqual("\"2222\"");
});
});