diff --git a/cli.php b/cli.php index cdab1495e..6eaa4229c 100755 --- a/cli.php +++ b/cli.php @@ -25,7 +25,7 @@ private function renderComponent(string $componentClass, string $view, string $c throw new Error("Could not decode JSON data"); } - $component = new $componentClass($data); + $component = new $componentClass($data, new ComponentLibrary\Cache\StaticCache()); $componentClassPath = (new ReflectionClass($componentClass))->getFileName(); $componentClassDir = dirname($componentClassPath); diff --git a/source/js/modal.test.ts b/source/js/modal.test.ts index c26caba44..fb5ecb195 100644 --- a/source/js/modal.test.ts +++ b/source/js/modal.test.ts @@ -37,8 +37,7 @@ const defaultModalData: IModalData = { } function initializeModalComponent() { - const modalInstance = new Modal() - modalInstance.enableModals() + new Modal() } async function renderModalComponent(partialModalData: Partial) { @@ -143,7 +142,7 @@ describe('modal', () => { expect(Gallery).toHaveBeenCalledTimes(1) }) - it.only('close modal on backdrop click', async () => { + it('close modal on backdrop click', async () => { document.body.innerHTML = `

test

` await renderModalComponent({heading: 'Modal heading'}) const modalElement = document.querySelector('.c-modal') as HTMLDialogElement diff --git a/source/js/select/Select.test.ts b/source/js/select/Select.test.ts index a55d098b0..3b6dd7d8f 100644 --- a/source/js/select/Select.test.ts +++ b/source/js/select/Select.test.ts @@ -51,7 +51,7 @@ describe('Select', () => { document.body.innerHTML = ''; }) - it.only('should update value on select when clicking option list item', async () => { + it('should update value on select when clicking option list item', async () => { const options = { 'test-1': 'Test 1', 'test-2': 'Test 2' }; await renderSelectComponent({ options }); const select = document.querySelector('select') as HTMLSelectElement