Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
pagedjs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
144
Issues
144
List
Boards
Labels
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tools
pagedjs
Commits
f8a48eae
Commit
f8a48eae
authored
Oct 07, 2020
by
Fred Chasen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update pagedjs-string-first-alphabet
parent
b4befe6c
Pipeline
#636
failed with stage
in 4 minutes and 9 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
string.spec.js
specs/string/string.spec.js
+15
-15
No files found.
specs/string/string.spec.js
View file @
f8a48eae
...
...
@@ -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
\"
"
);
});
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment