Commit d79da60f authored by Julie Blanc's avatar Julie Blanc

update tests string values

parent 7bf3c75b
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<body> <body>
<section> <section>
<h1>a ' this " ' aa</h1> <h1>aaa</h1>
<p> <p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi non suscipit odio. Aenean ut ligula id mauris efficitur tincidunt vitae non leo. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi non suscipit odio. Aenean ut ligula id mauris efficitur tincidunt vitae non leo.
</p> </p>
......
...@@ -15,13 +15,13 @@ describe("default", () => { ...@@ -15,13 +15,13 @@ describe("default", () => {
it("should set the running header as \"a '' this \" ' aa\" on the first page", async () => { it("should set the running header as \"a '' this \" ' aa\" on the first page", async () => {
let text = await page.$eval(".pagedjs_first_page", (r) => 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\""); expect(text).toEqual("\"aaa\"");
}); });
it("should set the running header as \"fff\" on the second page", async () => { it("should set the running header as \"fff\" on the second page", async () => {
let text = await page.$eval("#page-2", (r) => 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\""); expect(text).toEqual("\"fff\"");
}); });
}); });
...@@ -41,13 +41,13 @@ describe("first", () => { ...@@ -41,13 +41,13 @@ describe("first", () => {
it("should set the running header as \"aaa\" on the first page", async () => { it("should set the running header as \"aaa\" on the first page", async () => {
let text = await page.$eval(".pagedjs_first_page", (r) => 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\""); expect(text).toEqual("\"aaa\"");
}); });
it("should set the running header as \"fff\" on the second page", async () => { it("should set the running header as \"fff\" on the second page", async () => {
let text = await page.$eval("#page-2", (r) => 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\""); expect(text).toEqual("\"fff\"");
}); });
}); });
...@@ -67,13 +67,13 @@ describe("last", () => { ...@@ -67,13 +67,13 @@ describe("last", () => {
it("should set the running header as \"fff\" on the first page", async () => { it("should set the running header as \"fff\" on the first page", async () => {
let text = await page.$eval(".pagedjs_first_page", (r) => let text = await page.$eval(".pagedjs_first_page", (r) =>
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-alphabet")); window.getComputedStyle(r).getPropertyValue("--pagedjs-string-last-alphabet"));
expect(text).toEqual("\"fff\""); expect(text).toEqual("\"fff\"");
}); });
it("should set the running header as \"fff\" on the second page", async () => { it("should set the running header as \"fff\" on the second page", async () => {
let text = await page.$eval("#page-2", (r) => let text = await page.$eval("#page-2", (r) =>
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-alphabet")); window.getComputedStyle(r).getPropertyValue("--pagedjs-string-last-alphabet"));
expect(text).toEqual("\"fff\""); expect(text).toEqual("\"fff\"");
}); });
}); });
...@@ -93,13 +93,13 @@ describe("first-except", () => { ...@@ -93,13 +93,13 @@ describe("first-except", () => {
it("should set the running header as nothing on the first page", async () => { it("should set the running header as nothing on the first page", async () => {
let text = await page.$eval(".pagedjs_first_page", (r) => let text = await page.$eval(".pagedjs_first_page", (r) =>
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-alphabet")); window.getComputedStyle(r).getPropertyValue("--pagedjs-string-first-except-alphabet"));
expect(text).toEqual("\"\""); expect(text).toEqual("\"\"");
}); });
it("should set the running header as \"aaa\" on the second page", async () => { it("should set the running header as \"aaa\" on the second page", async () => {
let text = await page.$eval("#page-2", (r) => let text = await page.$eval("#page-2", (r) =>
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-alphabet")); window.getComputedStyle(r).getPropertyValue("--pagedjs-string-first-except-alphabet"));
expect(text).toEqual("\"aaa\""); expect(text).toEqual("\"aaa\"");
}); });
}); });
...@@ -121,18 +121,18 @@ describe("string-start", () => { ...@@ -121,18 +121,18 @@ describe("string-start", () => {
// See https://www.w3.org/TR/css-gcpm-3/#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 () => { it("should set the running header as nothing on the first page", async () => {
let text = await page.$eval(".pagedjs_first_page", (r) => let text = await page.$eval(".pagedjs_first_page", (r) =>
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-alphabet")); window.getComputedStyle(r).getPropertyValue("--pagedjs-string-start-alphabet"));
expect(text).toEqual("\"\""); expect(text).toEqual("\"\"");
}); });
it("should set the running header as \"fff\" on the third page", async () => { it("should set the running header as \"fff\" on the third page", async () => {
let text = await page.$eval("#page-3", (r) => let text = await page.$eval("#page-3", (r) =>
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-alphabet")); window.getComputedStyle(r).getPropertyValue("--pagedjs-string-start-alphabet"));
expect(text).toEqual("\"fff\""); expect(text).toEqual("\"fff\"");
}); });
it("should set the running header as \"ggg\" on page 4", async () => { it("should set the running header as \"ggg\" on page 4", async () => {
let text = await page.$eval("#page-4", (r) => let text = await page.$eval("#page-4", (r) =>
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-alphabet")); window.getComputedStyle(r).getPropertyValue("--pagedjs-string-start-alphabet"));
expect(text).toEqual("\"ggg\""); expect(text).toEqual("\"ggg\"");
}); });
}); });
...@@ -152,22 +152,22 @@ describe("string-multiple", () => { ...@@ -152,22 +152,22 @@ describe("string-multiple", () => {
it("should set the running header as \"aaa\" on the second page", async () => { it("should set the running header as \"aaa\" on the second page", async () => {
let text = await page.$eval("#page-2", (r) => let text = await page.$eval("#page-2", (r) =>
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-alphabet")); window.getComputedStyle(r).getPropertyValue("--pagedjs-string-first-except-alphabet"));
expect(text).toEqual("\"aaa\""); expect(text).toEqual("\"aaa\"");
}); });
it("should set the running header as \"1111\" on the second page", async () => { it("should set the running header as \"1111\" on the second page", async () => {
let text = await page.$eval("#page-2", (r) => let text = await page.$eval("#page-2", (r) =>
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-alphabetbis")); window.getComputedStyle(r).getPropertyValue("--pagedjs-string-first-except-alphabetbis"));
expect(text).toEqual("\"1111\""); expect(text).toEqual("\"1111\"");
}); });
it("should set the running header as \"fff\" on the third page", async () => { it("should set the running header as \"fff\" on the third page", async () => {
let text = await page.$eval("#page-9", (r) => let text = await page.$eval("#page-9", (r) =>
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-alphabet")); window.getComputedStyle(r).getPropertyValue("--pagedjs-string-first-except-alphabet"));
expect(text).toEqual("\"bbb\""); expect(text).toEqual("\"bbb\"");
}); });
it("should set the running header as \"fff\" on the third page", async () => { it("should set the running header as \"fff\" on the third page", async () => {
let text = await page.$eval("#page-9", (r) => let text = await page.$eval("#page-9", (r) =>
window.getComputedStyle(r).getPropertyValue("--pagedjs-string-alphabetbis")); window.getComputedStyle(r).getPropertyValue("--pagedjs-string-first-except-alphabetbis"));
expect(text).toEqual("\"2222\""); expect(text).toEqual("\"2222\"");
}); });
}); });
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment