diff --git a/libs/Dockerfile b/libs/Dockerfile index c10edc3b2..05f9edd50 100644 --- a/libs/Dockerfile +++ b/libs/Dockerfile @@ -6,7 +6,7 @@ RUN apt-get update \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* - # Install official PhantomJS release +# Install official PhantomJS release RUN set -x \ && apt-get update \ && apt-get install -y --no-install-recommends \ @@ -22,4 +22,12 @@ RUN set -x \ && apt-get clean all \ && rm -rf /tmp/* /var/lib/apt/lists/* -RUN phantomjs --version \ No newline at end of file +RUN phantomjs --version + +# Install Google Chrome +RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - + +RUN sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' + +RUN apt-get update + && apt-get install -y google-chrome-stable \ No newline at end of file diff --git a/src/Squidex/app-config/karma.coverage.conf.js b/src/Squidex/app-config/karma.coverage.conf.js index 20ff2b024..6ee5490b3 100644 --- a/src/Squidex/app-config/karma.coverage.conf.js +++ b/src/Squidex/app-config/karma.coverage.conf.js @@ -65,12 +65,20 @@ module.exports = function (config) { */ singleRun: true, + customLaunchers: { + ChromeCustom: { + base: 'ChromeHeadless', + // We must disable the Chrome sandbox (Chrome's sandbox needs more permissions than Docker allows by default) + flags: ['--no-sandbox'] + } + }, + /** * Run with chrome because phantom js does not provide all types, e.g. DragEvent * * available browser launchers: https://npmjs.org/browse/keyword/karma-launcher */ - browsers: ['ChromeHeadless'] + browsers: ['ChromeCustom'] }; config.set(_config); diff --git a/src/Squidex/app/features/content/shared/assets-editor.component.html b/src/Squidex/app/features/content/shared/assets-editor.component.html index 5b5cc809c..d47333225 100644 --- a/src/Squidex/app/features/content/shared/assets-editor.component.html +++ b/src/Squidex/app/features/content/shared/assets-editor.component.html @@ -1,7 +1,7 @@
-
+
Drop files here to add them.
diff --git a/src/Squidex/app/features/content/shared/assets-editor.component.ts b/src/Squidex/app/features/content/shared/assets-editor.component.ts index 5fe460e56..b4213a353 100644 --- a/src/Squidex/app/features/content/shared/assets-editor.component.ts +++ b/src/Squidex/app/features/content/shared/assets-editor.component.ts @@ -79,14 +79,6 @@ export class AssetsEditorComponent implements ControlValueAccessor { } } - public canDrop() { - const component = this; - - return (dragData: any) => { - return !component.isDisabled && dragData instanceof AssetDto && !component.oldAssets.find(a => a.id === dragData.id); - }; - } - public onAssetsSelected(assets: AssetDto[]) { for (let asset of assets) { this.oldAssets = this.oldAssets.push(asset); diff --git a/src/Squidex/app/features/schemas/pages/schema/schema-scripts-form.component.html b/src/Squidex/app/features/schemas/pages/schema/schema-scripts-form.component.html index 5f7b7bffe..69ab19b6b 100644 --- a/src/Squidex/app/features/schemas/pages/schema/schema-scripts-form.component.html +++ b/src/Squidex/app/features/schemas/pages/schema/schema-scripts-form.component.html @@ -23,7 +23,7 @@ - + diff --git a/src/Squidex/app/features/settings/pages/plans/plans-page.component.html b/src/Squidex/app/features/settings/pages/plans/plans-page.component.html index a376cece1..67960107e 100644 --- a/src/Squidex/app/features/settings/pages/plans/plans-page.component.html +++ b/src/Squidex/app/features/settings/pages/plans/plans-page.component.html @@ -1,4 +1,4 @@ - +
diff --git a/src/Squidex/app/shared/components/markdown-editor.component.html b/src/Squidex/app/shared/components/markdown-editor.component.html index 560e9c4a5..40b944e04 100644 --- a/src/Squidex/app/shared/components/markdown-editor.component.html +++ b/src/Squidex/app/shared/components/markdown-editor.component.html @@ -3,7 +3,7 @@
-
+
Drop assets here to add them.
diff --git a/src/Squidex/app/shared/components/markdown-editor.component.scss b/src/Squidex/app/shared/components/markdown-editor.component.scss index 8d1de2c38..834b5b55c 100644 --- a/src/Squidex/app/shared/components/markdown-editor.component.scss +++ b/src/Squidex/app/shared/components/markdown-editor.component.scss @@ -7,10 +7,6 @@ $background: #fff; height: 30rem; } -.drop-area { - @include absolute(80px, 30px, 66px, 30px); -} - .fullscreen { @include fixed(0, 0, 0, 0); border: 0; diff --git a/src/Squidex/app/shared/components/rich-editor.component.html b/src/Squidex/app/shared/components/rich-editor.component.html index 5650e79b4..4b5cf0049 100644 --- a/src/Squidex/app/shared/components/rich-editor.component.html +++ b/src/Squidex/app/shared/components/rich-editor.component.html @@ -1,7 +1,7 @@
-
+
Drop assets here to add them.
diff --git a/src/Squidex/app/shared/components/rich-editor.component.scss b/src/Squidex/app/shared/components/rich-editor.component.scss index 0d59cf0be..07b2c640b 100644 --- a/src/Squidex/app/shared/components/rich-editor.component.scss +++ b/src/Squidex/app/shared/components/rich-editor.component.scss @@ -5,8 +5,4 @@ background: $color-dark-foreground; border: 1px solid $color-input; height: 30rem; -} - -.drop-area { - @include absolute(100px, 30px, 66px, 30px); } \ No newline at end of file diff --git a/src/Squidex/app/shared/state/assets.state.ts b/src/Squidex/app/shared/state/assets.state.ts index c1dcbd052..5a29579af 100644 --- a/src/Squidex/app/shared/state/assets.state.ts +++ b/src/Squidex/app/shared/state/assets.state.ts @@ -112,7 +112,7 @@ export class AssetsState extends State { } public search(query: string): Observable { - this.next(s => ({ ...s, assetsPager: new Pager(0), assetsQuery: query })); + this.next(s => ({ ...s, assetsPager: new Pager(0, 0, 30), assetsQuery: query })); return this.loadAssets(); } diff --git a/src/Squidex/app/shared/state/schemas.state.spec.ts b/src/Squidex/app/shared/state/schemas.state.spec.ts index 69421f2c4..1805d8bed 100644 --- a/src/Squidex/app/shared/state/schemas.state.spec.ts +++ b/src/Squidex/app/shared/state/schemas.state.spec.ts @@ -163,7 +163,7 @@ describe('SchemasState', () => { expectToBeModified(schema_1); }); - describe('without selection', () => { + describe('with selection', () => { beforeEach(() => { schemasState.selectSchema(schema.name).subscribe(); });