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
61f5d70b
Commit
61f5d70b
authored
2 years ago
by
Muhammed-Ali Demir
Browse files
Options
Downloads
Patches
Plain Diff
test: added test for ad statements reftypes
parent
9b85eaa6
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
#19283
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/AdministrativeData.Statements.test.ts
+11
-9
11 additions, 9 deletions
tests/DCC/AdministrativeData.Statements.test.ts
with
11 additions
and
9 deletions
tests/DCC/AdministrativeData.Statements.test.ts
+
11
−
9
View file @
61f5d70b
...
...
@@ -107,14 +107,6 @@ describe("ItemType", () => {
expect
(
statement1
.
reference
[
0
].
_text
).
toBe
(
select
(
xpath
.
statements
.
statement1
.
reference
,
dom
));
});
/* TODO: get refType from jest */
/*
test("should get correct statement 1 refType from XML", () => {
console.log(statement1);
expect(statement1.refType._text).toBe(select(xpath.statements.statement1.refType, dom));
});
*/
test
(
"
should get correct statement 2 declaration content from XML
"
,
()
=>
{
// get expected list from example xml
const
expected
=
<
Element
[]
>
select
(
xpath
.
statements
.
statement2
.
declaration
.
content
,
dom
);
...
...
@@ -149,6 +141,10 @@ describe("ItemType", () => {
expect
(
statement2
.
data
.
quantity
[
1
].
real
.
unit
.
_text
).
toBe
(
select
(
xpath
.
statements
.
statement2
.
data
.
quantity2
.
si_real
.
si_unit
,
dom
));
});
test
(
"
should get correct statement 2 refType from XML
"
,
()
=>
{
expect
(
statement2
.
_attr
.
refType
).
toBe
(
select
(
xpath
.
statements
.
statement2
.
refType
,
dom
));
});
test
(
"
should get correct statement 3 declaration content from XML
"
,
()
=>
{
// get expected list from example xml
const
expected
=
<
Element
[]
>
select
(
xpath
.
statements
.
statement3
.
declaration
.
content
,
dom
);
...
...
@@ -180,6 +176,10 @@ describe("ItemType", () => {
expect
(
statement3
.
conformity
.
_text
).
toBe
(
select
(
xpath
.
statements
.
statement3
.
conformity
,
dom
));
});
test
(
"
should get correct statement 3 refType from XML
"
,
()
=>
{
expect
(
statement3
.
_attr
.
refType
).
toBe
(
select
(
xpath
.
statements
.
statement3
.
refType
,
dom
));
});
test
(
"
should get correct statement 4 declaration content from XML
"
,
()
=>
{
// get expected list from example xml
const
expected
=
<
Element
[]
>
select
(
xpath
.
statements
.
statement4
.
declaration
.
content
,
dom
);
...
...
@@ -205,7 +205,9 @@ describe("ItemType", () => {
expect
(
statement4
.
respAuthority
.
location
.
postCode
[
0
].
_text
).
toBe
(
select
(
xpath
.
statements
.
statement4
.
respAuthority
.
location
.
postCode
,
dom
));
});
/* TODO: refTypes */
test
(
"
should get correct statement 4 refType from XML
"
,
()
=>
{
expect
(
statement4
.
_attr
.
refType
).
toBe
(
select
(
xpath
.
statements
.
statement4
.
refType
,
dom
));
});
/* TODO: setters */
});
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