Skip to content

Commit

Permalink
LPDC-772: Add test to set conceptIsNew to false when linking a concep…
Browse files Browse the repository at this point in the history
…t to an instance
  • Loading branch information
thuysbr committed Nov 20, 2023
1 parent 74e1fea commit 5997d8b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test-api/instantie/link-unlink-concept.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ test.describe('link', () => {
test('link a concept to an instance, should update the isInstantiated flag of displayConfiguration to true', async ({request}) => {
const cookie = await loginAsPepingen(request);
const displayConfiguration = await ConceptDisplayConfigurationTestBuilder.aConceptDisplayConfiguration()
.withConceptInstantiated(false)
.withBestuurseenheid(pepingenId)
.buildAndPersist(request);

Expand All @@ -302,6 +303,7 @@ test.describe('link', () => {
test('link a concept to an instance, should update the isNewConcept flag of displayConfiguration to false', async ({request}) => {
const cookie = await loginAsPepingen(request);
const displayConfiguration = await ConceptDisplayConfigurationTestBuilder.aConceptDisplayConfiguration()
.withConceptIsNew(true)
.withBestuurseenheid(pepingenId)
.buildAndPersist(request);

Expand All @@ -318,7 +320,7 @@ test.describe('link', () => {
expect(response.ok(), `${await response.text()}`).toBeTruthy();

const updatedDisplayConfiguration = await fetchType(request, displayConfiguration.getSubject().getValue(), ConceptDisplayConfigurationType);
expect(updatedDisplayConfiguration.findTriple(Predicates.conceptInstantiated).getObjectValue()).toEqual('true')
expect(updatedDisplayConfiguration.findTriple(Predicates.conceptIsNew).getObjectValue()).toEqual('false')

});

Expand Down

0 comments on commit 5997d8b

Please sign in to comment.