Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update tests for fix-document-ids
Browse files Browse the repository at this point in the history
I assume md:title was there to test that ids were not added to metadata
elements
I replaced it with md:uuid to test the same condition
TylerZeroMaster committed Jun 25, 2024
1 parent 5136633 commit cce4d27
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions server/src/__snapshots__/fix-document-ids.spec.ts.snap
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ exports[`Element ID creation fixDocument check if ids are created 1`] = `
"<document id="new" cnxml-version="0.7" module-id="" xmlns="http://cnx.rice.edu/cnxml" class="introduction">
<title>Introduction</title>
<metadata mdml-version="0.5" xmlns:md="http://cnx.rice.edu/mdml">
<md:title>Introduction</md:title>
<md:uuid>00000000-0000-0000-0000-000000000000</md:uuid>
</metadata>
<content>
<para id="test">Test Introduction</para>
@@ -17,7 +17,7 @@ exports[`Element ID creation fixDocument check if ids are generated with right (
"<document id="new" cnxml-version="0.7" module-id="" xmlns="http://cnx.rice.edu/cnxml" class="introduction">
<title>Introduction</title>
<metadata mdml-version="0.5" xmlns:md="http://cnx.rice.edu/mdml">
<md:title>Introduction</md:title>
<md:uuid>00000000-0000-0000-0000-000000000000</md:uuid>
</metadata>
<content>
<para id="para-00001">no id here</para>
@@ -46,7 +46,7 @@ exports[`Element ID creation fixDocument check if term in defintion does not get
"<document id="new" cnxml-version="0.7" module-id="" xmlns="http://cnx.rice.edu/cnxml" class="introduction">
<title>Introduction</title>
<metadata mdml-version="0.5" xmlns:md="http://cnx.rice.edu/mdml">
<md:title>Introduction</md:title>
<md:uuid>00000000-0000-0000-0000-000000000000</md:uuid>
</metadata>
<content>
<para id="para-00001">
8 changes: 4 additions & 4 deletions server/src/fix-document-ids.spec.ts
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ describe('Element ID creation', () => {
const simple = `<document id="new" cnxml-version="0.7" module-id="" xmlns="http://cnx.rice.edu/cnxml" class="introduction">
<title>Introduction</title>
<metadata mdml-version="0.5" xmlns:md="http://cnx.rice.edu/mdml">
<md:title>Introduction</md:title>
<md:uuid>00000000-0000-0000-0000-000000000000</md:uuid>
</metadata>
<content>
<para id="test">Test Introduction</para>
@@ -28,7 +28,7 @@ describe('Element ID creation', () => {
const paraPartialId = `<document id="new" cnxml-version="0.7" module-id="" xmlns="http://cnx.rice.edu/cnxml" class="introduction">
<title>Introduction</title>
<metadata mdml-version="0.5" xmlns:md="http://cnx.rice.edu/mdml">
<md:title>Introduction</md:title>
<md:uuid>00000000-0000-0000-0000-000000000000</md:uuid>
</metadata>
<content>
<section>
@@ -62,7 +62,7 @@ describe('Element ID creation', () => {
const xml = `<document id="new" cnxml-version="0.7" module-id="" xmlns="http://cnx.rice.edu/cnxml" class="introduction">
<title>Introduction</title>
<metadata mdml-version="0.5" xmlns:md="http://cnx.rice.edu/mdml">
<md:title>Introduction</md:title>
<md:uuid>00000000-0000-0000-0000-000000000000</md:uuid>
</metadata>
<content>
<para>no id here</para>
@@ -94,7 +94,7 @@ describe('Element ID creation', () => {
const xml = `<document id="new" cnxml-version="0.7" module-id="" xmlns="http://cnx.rice.edu/cnxml" class="introduction">
<title>Introduction</title>
<metadata mdml-version="0.5" xmlns:md="http://cnx.rice.edu/mdml">
<md:title>Introduction</md:title>
<md:uuid>00000000-0000-0000-0000-000000000000</md:uuid>
</metadata>
<content>
<para>

0 comments on commit cce4d27

Please sign in to comment.