diff --git a/build-scripts/karma.conf.js b/build-scripts/karma.conf.js index 62e92bf9ac..bfc07ba41e 100644 --- a/build-scripts/karma.conf.js +++ b/build-scripts/karma.conf.js @@ -9,7 +9,7 @@ var webpackConfig = webpackConfigCreator({ packageJson ); -process.env.CHROME_BIN = require("puppeteer").executablePath(); +//process.env.CHROME_BIN = require("puppeteer").executablePath(); /*setup ts config file for tests ("noImplicitAny": false)*/ webpackConfig.module.rules[0].options.configFile = "build-scripts/tsconfig.tests.json"; diff --git a/src/question.ts b/src/question.ts index 45f9536596..63e8a7caf9 100644 --- a/src/question.ts +++ b/src/question.ts @@ -106,7 +106,6 @@ export class Question extends SurveyElement } public setIsMobile(val: boolean) { this.isMobile = val && (this.allowMobileInDesignMode() || !this.isDesignMode); - this.renderMinWidth = !val; } @property({ defaultValue: false }) isMobile: boolean; @property() forceIsInputReadOnly: boolean; diff --git a/src/survey-element.ts b/src/survey-element.ts index 2a36459687..c6c31bd19a 100644 --- a/src/survey-element.ts +++ b/src/survey-element.ts @@ -908,11 +908,11 @@ export class SurveyElement extends SurveyElementCore implements ISurvey } @property({ defaultValue: true }) allowRootStyle: boolean; - @property({ defaultValue: true }) renderMinWidth: boolean; get rootStyle() { let style: { [index: string]: any } = {}; - let minWidth = this.renderMinWidth ? this.minWidth : "min(100%, " + this.minWidth + ")"; + let minWidth = this.minWidth; + if (minWidth != "auto") minWidth = "min(100%, " + this.minWidth + ")"; if (this.allowRootStyle && this.renderWidth) { // style["width"] = this.renderWidth; style["flexGrow"] = 1; diff --git a/testCafe/survey/surveyWidth.ts b/testCafe/survey/surveyWidth.ts index 46655af820..22c8f1bc2d 100644 --- a/testCafe/survey/surveyWidth.ts +++ b/testCafe/survey/surveyWidth.ts @@ -26,10 +26,10 @@ frameworks.forEach((framework) => { test("Check question width", async (t) => { await t - .expect(Selector(".sv_row > div").getStyleProperty("min-width")).eql("300px"); + .expect(Selector(".sv_row > div").getStyleProperty("min-width")).eql("min(100% + 0px, 0% + 300px)"); await ClientFunction(() => { window["survey"].getAllQuestions()[0].minWidth = "200px"; })(); await t - .expect(Selector(".sv_row > div").getStyleProperty("min-width")).eql("200px"); + .expect(Selector(".sv_row > div").getStyleProperty("min-width")).eql("min(100% + 0px, 0% + 200px)"); }); }); \ No newline at end of file diff --git a/tests/markup/etalon_paneldynamic.ts b/tests/markup/etalon_paneldynamic.ts index da5022c64d..26d96b16c4 100644 --- a/tests/markup/etalon_paneldynamic.ts +++ b/tests/markup/etalon_paneldynamic.ts @@ -176,7 +176,7 @@ registerMarkupTests( snapshot: "paneldynamic-no-footer-1", removeIds: true, excludePlatform: "Vue", - before: () => StylesManager.applyTheme("defaultV2"), + before: () => { StylesManager.applyTheme("defaultV2"); }, after: () => StylesManager.applyTheme("default"), }, { diff --git a/tests/markup/snapshots/page-swnl-title-v2.snap.html b/tests/markup/snapshots/page-swnl-title-v2.snap.html index e7982b0968..10bd8205a1 100644 --- a/tests/markup/snapshots/page-swnl-title-v2.snap.html +++ b/tests/markup/snapshots/page-swnl-title-v2.snap.html @@ -1,4 +1,4 @@ -
+
@@ -12,7 +12,7 @@
-
+
diff --git a/tests/markup/snapshots/page-swnl-v2.snap.html b/tests/markup/snapshots/page-swnl-v2.snap.html index 802bc70923..7b90de42d6 100644 --- a/tests/markup/snapshots/page-swnl-v2.snap.html +++ b/tests/markup/snapshots/page-swnl-v2.snap.html @@ -1,11 +1,11 @@ -
+
-
+