From 829072c9d249f6bac9b65acacaf86977d1ff147d Mon Sep 17 00:00:00 2001 From: Stijn Taelemans Date: Tue, 1 Jun 2021 10:33:10 +0200 Subject: [PATCH 1/7] feat: collection field can be edited properly WIP --- .../collection-object-solid-store.spec.ts | 2 ++ .../solid/collection-object-solid-store.ts | 26 +++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/packages/solid-crs-manage/lib/common/solid/collection-object-solid-store.spec.ts b/packages/solid-crs-manage/lib/common/solid/collection-object-solid-store.spec.ts index 0756f9b9..34739dd9 100644 --- a/packages/solid-crs-manage/lib/common/solid/collection-object-solid-store.spec.ts +++ b/packages/solid-crs-manage/lib/common/solid/collection-object-solid-store.spec.ts @@ -177,6 +177,7 @@ describe('CollectionObjectSolidStore', () => { client.getThing = jest.fn(() => 'test-thing'); client.getUrl = jest.fn(() => 'test-url'); client.setThing = jest.fn(() => 'test-thing'); + client.removeThing = jest.fn(() => 'test-thing'); client.saveSolidDatasetAt = jest.fn(async () => 'test-dataset'); client.addUrl = jest.fn(() => 'test-url'); client.addStringNoLocale = jest.fn(() => 'test-url'); @@ -195,6 +196,7 @@ describe('CollectionObjectSolidStore', () => { client.getThing = jest.fn(() => 'test-thing'); client.getUrl = jest.fn(() => 'http://test-url/'); client.setThing = jest.fn(() => 'test-thing'); + client.removeThing = jest.fn(() => 'test-thing'); client.saveSolidDatasetAt = jest.fn(async () => 'test-dataset'); const result = await service.save(mockObject); diff --git a/packages/solid-crs-manage/lib/common/solid/collection-object-solid-store.ts b/packages/solid-crs-manage/lib/common/solid/collection-object-solid-store.ts index e21de6b3..606e4fcc 100644 --- a/packages/solid-crs-manage/lib/common/solid/collection-object-solid-store.ts +++ b/packages/solid-crs-manage/lib/common/solid/collection-object-solid-store.ts @@ -128,7 +128,29 @@ export class CollectionObjectSolidStore implements CollectionObjectStore { const distributionUri = getUrl(collectionThing, 'http://schema.org/distribution'); const distributionThing = getThing(catalogDataset, distributionUri); const contentUrl = getUrl(distributionThing, 'http://schema.org/contentUrl'); - const objectUri = object.uri || new URL(`#object-${v4()}`, contentUrl).toString(); + let objectUri: string; + + // check if the collection changed (aka contentUrl changed) + if (!object.uri || object.uri.includes(contentUrl)) { + + // the collection's contentUrl matches the object's URI, or is not set (new object) + objectUri = object.uri || new URL(`#object-${v4()}`, contentUrl).toString(); + + } else { + + // the collection's contentUrl changed + // -> move the object to that contentUrl + objectUri = new URL(`#object-${v4()}`, contentUrl).toString(); + + // -> delete object from old contentUrl + const oldDataset = await getSolidDataset(object.uri, { fetch }); + const oldObjectThing = getThing(oldDataset, object.uri); + const oldDigitalObjectThing = getThing(oldDataset, CollectionObjectSolidStore.getDigitalObjectUri(object)); + let updatedOldObjectsDataset = removeThing(oldDataset, oldObjectThing); + updatedOldObjectsDataset = removeThing(updatedOldObjectsDataset, oldDigitalObjectThing); + await saveSolidDatasetAt(object.uri, updatedOldObjectsDataset, { fetch }); + + } // transform and save the object to the dataset of objects const objectsDataset = await getSolidDataset(objectUri, { fetch }); @@ -159,7 +181,7 @@ export class CollectionObjectSolidStore implements CollectionObjectStore { } let objectThing = createThing({ url: object.uri }); - const digitalObjectUri = object.mainEntityOfPage || CollectionObjectSolidStore.getDigitalObjectUri(object); + const digitalObjectUri = CollectionObjectSolidStore.getDigitalObjectUri(object); // identification objectThing = object.updated ? addStringNoLocale(objectThing, 'http://schema.org/dateModified', object.updated) : objectThing; From 07fbfda563b487dfc04e41cdf14fc68cdd6ceb13 Mon Sep 17 00:00:00 2001 From: Stijn Taelemans Date: Tue, 1 Jun 2021 14:51:26 +0200 Subject: [PATCH 2/7] feat: added dropdown for collections WIP --- .../lib/forms/form-element.component.ts | 25 ++++++++++++++----- .../lib/app-root.component.ts | 2 +- packages/solid-crs-manage/lib/app.machine.ts | 3 +++ .../object-identification.component.ts | 12 +++++++-- .../features/object/object-root.component.ts | 13 +++++++++- .../lib/features/object/object.machine.ts | 6 ++++- .../solid-crs-theme/lib/elements/forms.css | 11 ++++++++ 7 files changed, 61 insertions(+), 11 deletions(-) diff --git a/packages/solid-crs-components/lib/forms/form-element.component.ts b/packages/solid-crs-components/lib/forms/form-element.component.ts index fadc234f..47032912 100644 --- a/packages/solid-crs-components/lib/forms/form-element.component.ts +++ b/packages/solid-crs-components/lib/forms/form-element.component.ts @@ -176,17 +176,30 @@ export class FormElementComponent extends RxLitElement { } this.inputs = slot.assignedNodes({ flatten: true })?.filter( - (element) => element instanceof HTMLInputElement + (element) => element instanceof HTMLInputElement || element instanceof HTMLSelectElement ).map((element) => element as HTMLInputElement); this.inputs?.forEach((element) => { - // Set the input field's default value. const fieldData = data[this.field]; - element.value = fieldData && (typeof fieldData === 'string' || typeof fieldData === 'number') ? fieldData.toString() : ''; - // Send event when input field's value changes. - element.addEventListener('input', debounce(() => actor.send({ type: FormEvents.FORM_UPDATED, value: element.value, field } as FormUpdatedEvent), this.debounceTimeout)); + if (element instanceof HTMLSelectElement) { + + // Set the input field's default value. + element.namedItem(fieldData && (typeof fieldData === 'string' || typeof fieldData === 'number') ? fieldData.toString() : '').selected = true; + + // Send event when input field's value changes. + element.addEventListener('input', () => actor.send({ type: FormEvents.FORM_UPDATED, value: element.options[element.selectedIndex].id, field } as FormUpdatedEvent)); + + } else { + + // Set the input field's default value. + element.value = fieldData && (typeof fieldData === 'string' || typeof fieldData === 'number') ? fieldData.toString() : ''; + + // Send event when input field's value changes. + element.addEventListener('input', debounce(() => actor.send({ type: FormEvents.FORM_UPDATED, value: element.value, field } as FormUpdatedEvent), this.debounceTimeout)); + + } // Listen for Enter presses to submit if (this.submitOnEnter) { @@ -290,7 +303,7 @@ export class FormElementComponent extends RxLitElement { flex: 1 0; border: var(--border-normal) solid var(--colors-foreground-normal); } - .form-element .content .field ::slotted(input) { + .form-element .content .field ::slotted(input), .form-element .content .field ::slotted(select) { padding: 0 var(--gap-normal); flex: 1 0; height: 44px; diff --git a/packages/solid-crs-manage/lib/app-root.component.ts b/packages/solid-crs-manage/lib/app-root.component.ts index 284bb159..6f6d5328 100644 --- a/packages/solid-crs-manage/lib/app-root.component.ts +++ b/packages/solid-crs-manage/lib/app-root.component.ts @@ -83,7 +83,7 @@ export class AppRootComponent extends RxLitElement { state: State; /** - * The state of this component. + * A list of all collections. */ @internalProperty() collections: Collection[]; diff --git a/packages/solid-crs-manage/lib/app.machine.ts b/packages/solid-crs-manage/lib/app.machine.ts index 762b3812..47571099 100644 --- a/packages/solid-crs-manage/lib/app.machine.ts +++ b/packages/solid-crs-manage/lib/app.machine.ts @@ -266,6 +266,9 @@ export const appMachine = ( { id: AppActors.OBJECT_MACHINE, src: objectMachine(objectStore), + data: (context) => ({ + collections: context.collections, + }), onError: { actions: send({ type: AppEvents.ERROR }), }, diff --git a/packages/solid-crs-manage/lib/features/object/components/object-identification.component.ts b/packages/solid-crs-manage/lib/features/object/components/object-identification.component.ts index 9ba635bf..bf7e4f96 100644 --- a/packages/solid-crs-manage/lib/features/object/components/object-identification.component.ts +++ b/packages/solid-crs-manage/lib/features/object/components/object-identification.component.ts @@ -1,5 +1,5 @@ import { html, property, PropertyValues, internalProperty, unsafeCSS, css, TemplateResult, CSSResult } from 'lit-element'; -import { CollectionObject, Logger, Translator } from '@netwerk-digitaal-erfgoed/solid-crs-core'; +import { Collection, CollectionObject, Logger, Translator } from '@netwerk-digitaal-erfgoed/solid-crs-core'; import { FormEvent } from '@netwerk-digitaal-erfgoed/solid-crs-components'; import { Interpreter, SpawnedActorRef, State } from 'xstate'; import { RxLitElement } from 'rx-lit'; @@ -50,6 +50,12 @@ export class ObjectIdentificationComponent extends RxLitElement { @internalProperty() state?: State; + /** + * A list of all collections + */ + @internalProperty() + collections?: Collection[]; + /** * Hook called on at every update after connection to the DOM. */ @@ -103,7 +109,9 @@ export class ObjectIdentificationComponent extends RxLitElement { - + diff --git a/packages/solid-crs-manage/lib/features/object/object-root.component.ts b/packages/solid-crs-manage/lib/features/object/object-root.component.ts index c53d7ad2..de13d0f6 100644 --- a/packages/solid-crs-manage/lib/features/object/object-root.component.ts +++ b/packages/solid-crs-manage/lib/features/object/object-root.component.ts @@ -1,5 +1,5 @@ import { html, property, PropertyValues, internalProperty, unsafeCSS, css, TemplateResult, CSSResult, queryAll } from 'lit-element'; -import { ArgumentError, CollectionObject, Logger, Translator } from '@netwerk-digitaal-erfgoed/solid-crs-core'; +import { ArgumentError, Collection, CollectionObject, Logger, Translator } from '@netwerk-digitaal-erfgoed/solid-crs-core'; import { FormEvent, FormActors, FormSubmissionStates, FormEvents, Alert, LargeCardComponent, FormRootStates, FormCleanlinessStates, FormValidationStates } from '@netwerk-digitaal-erfgoed/solid-crs-components'; import { map } from 'rxjs/operators'; import { from } from 'rxjs'; @@ -51,6 +51,12 @@ export class ObjectRootComponent extends RxLitElement { @internalProperty() state?: State; + /** + * A list of all collections. + */ + @internalProperty() + collections?: Collection[]; + /** * The object to be displayed and/or edited. */ @@ -95,6 +101,10 @@ export class ObjectRootComponent extends RxLitElement { map((state) => state.children[FormActors.FORM_MACHINE]), )); + this.subscribe('collections', from(this.actor).pipe( + map((state) => state.context.collections), + )); + if(changed.has('formActor') && this.formActor){ this.subscribe('isSubmitting', from(this.formActor).pipe( @@ -209,6 +219,7 @@ export class ObjectRootComponent extends RxLitElement { id="nde.features.object.sidebar.identification" class="form-card" .object="${this.object}" + .collections="${this.collections}" .formActor="${this.formActor}" .actor="${this.actor}" .translator="${this.translator}" diff --git a/packages/solid-crs-manage/lib/features/object/object.machine.ts b/packages/solid-crs-manage/lib/features/object/object.machine.ts index 022af2b6..a292380b 100644 --- a/packages/solid-crs-manage/lib/features/object/object.machine.ts +++ b/packages/solid-crs-manage/lib/features/object/object.machine.ts @@ -4,7 +4,7 @@ import { formMachine, FormContext, FormEvents, State } from '@netwerk-digitaal-erfgoed/solid-crs-components'; import { assign, createMachine, sendParent } from 'xstate'; -import { CollectionObject, CollectionObjectStore } from '@netwerk-digitaal-erfgoed/solid-crs-core'; +import { Collection, CollectionObject, CollectionObjectStore } from '@netwerk-digitaal-erfgoed/solid-crs-core'; import edtf from 'edtf'; import { AppEvents } from '../../app.events'; import { ObjectEvent, ObjectEvents } from './object.events'; @@ -17,6 +17,10 @@ export interface ObjectContext { * The currently selected object. */ object?: CollectionObject; + /** + * A list of all collections. + */ + collections?: Collection[]; } /** diff --git a/packages/solid-crs-theme/lib/elements/forms.css b/packages/solid-crs-theme/lib/elements/forms.css index a943456e..5527d445 100644 --- a/packages/solid-crs-theme/lib/elements/forms.css +++ b/packages/solid-crs-theme/lib/elements/forms.css @@ -23,6 +23,17 @@ nde-form-element input { width: 100%; } +nde-form-element select { + color: var(--colors-foreground-normal); + border: none; + font-size: var(--font-size-small); + font-family: var(--font-family); + outline: none; + display: block; + width: 100%; + margin-right: var(--gap-normal); +} + nde-form-element input:disabled { color: var(--colors-foreground-light); } From 69e528296944e32f7a2503afbe940be5d794f193 Mon Sep 17 00:00:00 2001 From: Stijn Taelemans Date: Tue, 1 Jun 2021 14:51:59 +0200 Subject: [PATCH 3/7] feat: added dropdown for licenses WIP --- .../object-identification.component.ts | 2 +- .../components/object-imagery.component.ts | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/packages/solid-crs-manage/lib/features/object/components/object-identification.component.ts b/packages/solid-crs-manage/lib/features/object/components/object-identification.component.ts index bf7e4f96..600e425d 100644 --- a/packages/solid-crs-manage/lib/features/object/components/object-identification.component.ts +++ b/packages/solid-crs-manage/lib/features/object/components/object-identification.component.ts @@ -109,7 +109,7 @@ export class ObjectIdentificationComponent extends RxLitElement { - ${this.collections.map((collection) => html``)} diff --git a/packages/solid-crs-manage/lib/features/object/components/object-imagery.component.ts b/packages/solid-crs-manage/lib/features/object/components/object-imagery.component.ts index c2a628f4..348ed45c 100644 --- a/packages/solid-crs-manage/lib/features/object/components/object-imagery.component.ts +++ b/packages/solid-crs-manage/lib/features/object/components/object-imagery.component.ts @@ -50,6 +50,25 @@ export class ObjectImageryComponent extends RxLitElement { @internalProperty() state?: State; + /** + * A list of licenses + */ + @internalProperty() + licenses?: { name: string; uri: string }[] = [ + { + name: 'CC0 1.0', + uri: 'https://creativecommons.org/publicdomain/zero/1.0/deed.nl', + }, + { + name: 'CC BY 4.0', + uri: 'https://creativecommons.org/licenses/by/4.0/deed.nl', + }, + { + name: 'CC BY-SA 2.0', + uri: 'https://creativecommons.org/licenses/by-sa/2.0/be/deed.nl', + }, + ]; + /** * Hook called on at every update after connection to the DOM. */ @@ -90,6 +109,12 @@ export class ObjectImageryComponent extends RxLitElement { + + + + ` : html``; From 7b75a427827666872b01e6755ac05ac96f41896e Mon Sep 17 00:00:00 2001 From: Stijn Taelemans Date: Tue, 1 Jun 2021 15:26:41 +0200 Subject: [PATCH 4/7] test: added tests WIP --- .../lib/sidebar/sidebar-item-component.spec.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/solid-crs-components/lib/sidebar/sidebar-item-component.spec.ts b/packages/solid-crs-components/lib/sidebar/sidebar-item-component.spec.ts index fc0ac083..5a829c1d 100644 --- a/packages/solid-crs-components/lib/sidebar/sidebar-item-component.spec.ts +++ b/packages/solid-crs-components/lib/sidebar/sidebar-item-component.spec.ts @@ -32,4 +32,17 @@ describe('SidebarItemComponent', () => { }); + it('should remove border and padding class when properties are set', async () => { + + component.padding = false; + component.showBorder = false; + + window.document.body.appendChild(component); + await component.updateComplete; + + expect(window.document.body.getElementsByTagName('nde-sidebar-item')[0].shadowRoot.querySelectorAll('.padding').length).toEqual(0); + expect(window.document.body.getElementsByTagName('nde-sidebar-item')[0].shadowRoot.querySelectorAll('.border').length).toEqual(0); + + }); + }); From 81d1ca626656311c95c819984f9b8b29f86633fd Mon Sep 17 00:00:00 2001 From: Stijn Taelemans Date: Tue, 1 Jun 2021 16:08:42 +0200 Subject: [PATCH 5/7] test: upped coverage in components package WIP --- .../lib/forms/form-element.component.spec.ts | 28 +++++++++++++++++-- .../sidebar/sidebar-list.component.spec.ts | 26 +++++++++++++++-- .../lib/sidebar/sidebar-list.component.ts | 2 +- packages/solid-crs-components/package.json | 8 +++--- 4 files changed, 54 insertions(+), 10 deletions(-) diff --git a/packages/solid-crs-components/lib/forms/form-element.component.spec.ts b/packages/solid-crs-components/lib/forms/form-element.component.spec.ts index 4f44f220..bb1a5f3c 100644 --- a/packages/solid-crs-components/lib/forms/form-element.component.spec.ts +++ b/packages/solid-crs-components/lib/forms/form-element.component.spec.ts @@ -1,5 +1,5 @@ import { ArgumentError, Collection } from '@netwerk-digitaal-erfgoed/solid-crs-core'; -import { Observable, of } from 'rxjs'; +import { of } from 'rxjs'; import { interpret, Interpreter } from 'xstate'; import { FormElementComponent } from './form-element.component'; import { FormValidatorResult } from './form-validator-result'; @@ -24,7 +24,7 @@ describe('FormElementComponent', () => { .withContext({ data: { uri: '', name: 'Test', description: 'description' }, original: { uri: '', name: 'Test', description: 'description' }, - validation: [], + validation: [ { field: 'name', message: 'lorem' } ], }), ); @@ -84,7 +84,27 @@ describe('FormElementComponent', () => { }); - xit('should send SUBMITTED event when enter keypress', async (done) => { + it('should allow slotted select field', async () => { + + component.field = 'description'; + const select = window.document.createElement('select'); + select.slot = 'input'; + const option = window.document.createElement('option'); + option.id = 'description'; + select.appendChild(option); + component.appendChild(select); + component.removeChild(input); + + window.document.body.appendChild(component); + await component.updateComplete; + + expect((window.document.body.getElementsByTagName('nde-form-element')[0].shadowRoot.querySelector('.field slot').assignedElements()[0] as HTMLSelectElement).children.length).toBe(1); + + }); + + it('should send SUBMITTED event when enter keypress', async (done) => { + + component.submitOnEnter = true; machine.onEvent(((event) => { @@ -96,6 +116,8 @@ describe('FormElementComponent', () => { })); + machine.start(); + window.document.body.appendChild(component); await component.updateComplete; diff --git a/packages/solid-crs-components/lib/sidebar/sidebar-list.component.spec.ts b/packages/solid-crs-components/lib/sidebar/sidebar-list.component.spec.ts index 641a688c..c0acbe08 100644 --- a/packages/solid-crs-components/lib/sidebar/sidebar-list.component.spec.ts +++ b/packages/solid-crs-components/lib/sidebar/sidebar-list.component.spec.ts @@ -38,10 +38,11 @@ describe('SidebarListComponent', () => { }); - it('should call select when select is clicked', async () => { + it('should set selected when item is clicked', async () => { const event = document.createEvent('MouseEvent'); - const el = document.createElement('nde-sidebar-list-item'); + const el = document.createElement('nde-sidebar-list-item') as HTMLSlotElement; + el.name = 'item'; expect(el.hasAttribute('selected')).toBeFalsy(); @@ -58,6 +59,27 @@ describe('SidebarListComponent', () => { }); + it('should not set selected when title is clicked', async () => { + + const event = document.createEvent('MouseEvent'); + const el = document.createElement('nde-sidebar-list-item') as HTMLSlotElement; + el.name = 'title'; + + expect(el.hasAttribute('selected')).toBeFalsy(); + + const selectSpy = spyOn(component, 'select').and.callThrough(); + + window.document.body.appendChild(component); + await component.updateComplete; + + event.composedPath = jest.fn(() => [ el ]); + component.select(event); + + expect(selectSpy).toHaveBeenCalledTimes(1); + expect(el.hasAttribute('selected')).toBeFalsy(); + + }); + it('should call select when select is clicked', async () => { const selectSpy = spyOn(component, 'select'); diff --git a/packages/solid-crs-components/lib/sidebar/sidebar-list.component.ts b/packages/solid-crs-components/lib/sidebar/sidebar-list.component.ts index 23b80940..82444ab0 100644 --- a/packages/solid-crs-components/lib/sidebar/sidebar-list.component.ts +++ b/packages/solid-crs-components/lib/sidebar/sidebar-list.component.ts @@ -15,7 +15,7 @@ export class SidebarListComponent extends RxLitElement { const element = event.composedPath().find((el: Element) => el.localName === 'nde-sidebar-list-item') as Element; - if(element && !element.hasAttribute('isTitle')){ + if(element && (element as HTMLSlotElement).name === 'item'){ for(let i = 0; i < this.children.length; i++) { diff --git a/packages/solid-crs-components/package.json b/packages/solid-crs-components/package.json index 6cb2b5e0..c4852379 100644 --- a/packages/solid-crs-components/package.json +++ b/packages/solid-crs-components/package.json @@ -74,10 +74,10 @@ ], "coverageThreshold": { "global": { - "branches": 82.69, - "functions": 89.23, - "lines": 96.92, - "statements": 96.38 + "branches": 89.38, + "functions": 96.97, + "lines": 100, + "statements": 99.11 } }, "coveragePathIgnorePatterns": [ From 9aa3f6970c5b971196a0a3e11c3d2f328322e35d Mon Sep 17 00:00:00 2001 From: Stijn Taelemans Date: Tue, 1 Jun 2021 16:24:44 +0200 Subject: [PATCH 6/7] test: updated coverage for manage --- .../solid/collection-object-solid-store.spec.ts | 14 ++++++++++++-- .../object/components/object.component.spec.ts | 3 ++- .../features/object/object-root.component.spec.ts | 2 +- packages/solid-crs-manage/package.json | 8 ++++---- 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/packages/solid-crs-manage/lib/common/solid/collection-object-solid-store.spec.ts b/packages/solid-crs-manage/lib/common/solid/collection-object-solid-store.spec.ts index 34739dd9..c39bd025 100644 --- a/packages/solid-crs-manage/lib/common/solid/collection-object-solid-store.spec.ts +++ b/packages/solid-crs-manage/lib/common/solid/collection-object-solid-store.spec.ts @@ -175,7 +175,7 @@ describe('CollectionObjectSolidStore', () => { client.getSolidDataset = jest.fn(async () => 'test-dataset'); client.getThing = jest.fn(() => 'test-thing'); - client.getUrl = jest.fn(() => 'test-url'); + client.getUrl = jest.fn(() => 'http://test-uri/'); client.setThing = jest.fn(() => 'test-thing'); client.removeThing = jest.fn(() => 'test-thing'); client.saveSolidDatasetAt = jest.fn(async () => 'test-dataset'); @@ -184,7 +184,17 @@ describe('CollectionObjectSolidStore', () => { client.addStringWithLocale = jest.fn(() => 'test-url'); client.addInteger = jest.fn(() => 'test-url'); - await expect(service.save(mockObject)).resolves.toEqual(mockObject); + const result = await service.save(mockObject) +; + + expect(result).toEqual(expect.objectContaining({ + description: mockObject.description, + image: mockObject.image, + name: mockObject.name, + type: mockObject.type, + })); + + expect(result.uri).toMatch(/http:\/\/test-uri\/#.*/i); }); diff --git a/packages/solid-crs-manage/lib/features/object/components/object.component.spec.ts b/packages/solid-crs-manage/lib/features/object/components/object.component.spec.ts index fbf900be..d60b6a94 100644 --- a/packages/solid-crs-manage/lib/features/object/components/object.component.spec.ts +++ b/packages/solid-crs-manage/lib/features/object/components/object.component.spec.ts @@ -54,6 +54,8 @@ describe.each([ component.translator = new MemoryTranslator([], 'nl-NL'); + component.collections = [ collection1 ]; + }); afterEach(() => { @@ -134,4 +136,3 @@ describe.each([ }); }); - diff --git a/packages/solid-crs-manage/lib/features/object/object-root.component.spec.ts b/packages/solid-crs-manage/lib/features/object/object-root.component.spec.ts index 64cd9ac8..6fb70695 100644 --- a/packages/solid-crs-manage/lib/features/object/object-root.component.spec.ts +++ b/packages/solid-crs-manage/lib/features/object/object-root.component.spec.ts @@ -366,7 +366,7 @@ describe('ObjectRootComponent', () => { component.updated(map); - expect(component.subscribe).toHaveBeenCalledTimes(4); + expect(component.subscribe).toHaveBeenCalledTimes(5); }); diff --git a/packages/solid-crs-manage/package.json b/packages/solid-crs-manage/package.json index 2f88cc51..41dd6f90 100644 --- a/packages/solid-crs-manage/package.json +++ b/packages/solid-crs-manage/package.json @@ -83,10 +83,10 @@ ], "coverageThreshold": { "global": { - "statements": 91.81, + "statements": 91.85, "branches": 90.3, - "lines": 92.02, - "functions": 78.09 + "lines": 92.05, + "functions": 78.13 } }, "automock": false, @@ -107,4 +107,4 @@ } } } -} +} \ No newline at end of file From 8d768de1cad38d64e16c5d66a2a598cba904ae80 Mon Sep 17 00:00:00 2001 From: Stijn Taelemans Date: Tue, 1 Jun 2021 17:07:23 +0200 Subject: [PATCH 7/7] fix: removed old form field --- .../features/object/components/object-imagery.component.ts | 4 ---- packages/solid-crs-manage/package.json | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/solid-crs-manage/lib/features/object/components/object-imagery.component.ts b/packages/solid-crs-manage/lib/features/object/components/object-imagery.component.ts index 348ed45c..1c68daa6 100644 --- a/packages/solid-crs-manage/lib/features/object/components/object-imagery.component.ts +++ b/packages/solid-crs-manage/lib/features/object/components/object-imagery.component.ts @@ -107,10 +107,6 @@ export class ObjectImageryComponent extends RxLitElement { - - - - diff --git a/packages/solid-crs-manage/package.json b/packages/solid-crs-manage/package.json index 41dd6f90..12551ebd 100644 --- a/packages/solid-crs-manage/package.json +++ b/packages/solid-crs-manage/package.json @@ -84,7 +84,7 @@ "coverageThreshold": { "global": { "statements": 91.85, - "branches": 90.3, + "branches": 90.26, "lines": 92.05, "functions": 78.13 } @@ -107,4 +107,4 @@ } } } -} \ No newline at end of file +}