Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dcc-js
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
D-PTB
DCC
Development
dcc-js
Commits
90799b4f
Commit
90799b4f
authored
2 years ago
by
Moritz Jordan
Browse files
Options
Downloads
Patches
Plain Diff
Changes by loewe01
parent
b695cb4b
No related branches found
No related tags found
3 merge requests
!10
Refactor Test Resources
,
!6
Adaptations for new DCC V3.2.1
,
!5
Add tests
Pipeline
#18571
passed
2 years ago
Stage: .pre
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/DCC/CoreDataType.test.ts
+5
-5
5 additions, 5 deletions
tests/DCC/CoreDataType.test.ts
with
5 additions
and
5 deletions
tests/DCC/CoreDataType.test.ts
+
5
−
5
View file @
90799b4f
...
@@ -15,20 +15,20 @@ const xpath = {
...
@@ -15,20 +15,20 @@ const xpath = {
};
};
describe
(
"
CoreDataType
"
,
()
=>
{
describe
(
"
CoreDataType
"
,
()
=>
{
let
dcc
:
DCCDocument
,
coreData
:
CoreDataType
;
let
dcc
:
DCCDocument
,
coreData
:
CoreDataType
,
dom
;
beforeEach
(
async
()
=>
{
beforeEach
(
async
()
=>
{
({
dcc
}
=
await
xmlEnv
.
recreateEnv
());
({
dcc
,
dom
}
=
await
xmlEnv
.
recreateEnv
());
coreData
=
dcc
.
digitalCalibrationCertificate
.
administrativeData
.
coreData
;
coreData
=
dcc
.
digitalCalibrationCertificate
.
administrativeData
.
coreData
;
});
});
test
(
"
should get correct countryCodeISO3166_1 from XML
"
,
()
=>
{
test
(
"
should get correct countryCodeISO3166_1 from XML
"
,
()
=>
{
expect
(
coreData
.
countryCodeISO3166_1
.
_text
).
toBe
(
select
(
xpath
.
countryCodeISO3166_1
,
d
cc
));
expect
(
coreData
.
countryCodeISO3166_1
.
_text
).
toBe
(
select
(
xpath
.
countryCodeISO3166_1
,
d
om
));
});
});
test
(
"
should get correct usedLangCodeISO639_1 from XML
"
,
()
=>
{
test
(
"
should get correct usedLangCodeISO639_1 from XML
"
,
()
=>
{
// get expected list from example xml
// get expected list from example xml
const
expected
=
<
Element
[]
>
select
(
xpath
.
usedLangCodeISO639_1
,
d
cc
);
const
expected
=
<
Element
[]
>
select
(
xpath
.
usedLangCodeISO639_1
,
d
om
);
expect
(
toTextArr
(
coreData
.
usedLangCodeISO639_1
)).
toEqual
(
toTextContentArr
(
expected
));
expect
(
toTextArr
(
coreData
.
usedLangCodeISO639_1
)).
toEqual
(
toTextContentArr
(
expected
));
});
});
...
@@ -48,7 +48,7 @@ describe("CoreDataType", () => {
...
@@ -48,7 +48,7 @@ describe("CoreDataType", () => {
});
});
test
(
"
should delete usedLangCodeISO639_1 correctly
"
,
()
=>
{
test
(
"
should delete usedLangCodeISO639_1 correctly
"
,
()
=>
{
const
selection
=
toTextContentArr
(
<
Element
[]
>
select
(
xpath
.
usedLangCodeISO639_1
,
d
cc
));
const
selection
=
toTextContentArr
(
<
Element
[]
>
select
(
xpath
.
usedLangCodeISO639_1
,
d
om
));
fc
.
assert
(
fc
.
assert
(
fc
.
property
(
fc
.
constantFrom
(...
selection
),
(
str
)
=>
{
fc
.
property
(
fc
.
constantFrom
(...
selection
),
(
str
)
=>
{
// get index and remove element from array
// get index and remove element from array
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment