-
Notifications
You must be signed in to change notification settings - Fork 823
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
resolve #7097 Martix column and row title should be affected with fon…
…t-width property. (#7123) Co-authored-by: OlgaLarina <[email protected]>
- Loading branch information
1 parent
582f078
commit 9fa6ee1
Showing
6 changed files
with
160 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+52.3 KB
...egressionTests/tests/defaultV2/etalons/survey-theme-questiontitle-font-size.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+53.4 KB
...ressionTests/tests/defaultV2/etalons/survey-theme-questiontitle-font-weight.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,156 @@ | ||
import { Selector, ClientFunction } from "testcafe"; | ||
import { url, frameworks, initSurvey, url_test, takeElementScreenshot, wrapVisualTest } from "../../helper"; | ||
|
||
const title = "Survey themes Screenshot"; | ||
|
||
fixture`${title}`.page`${url}`; | ||
|
||
const applyTheme = ClientFunction(theme => { | ||
(<any>window).Survey.StylesManager.applyTheme(theme); | ||
}); | ||
|
||
const theme = "defaultV2"; | ||
|
||
frameworks.forEach(framework => { | ||
fixture`${framework} ${title} ${theme}` | ||
.page`${url_test}${theme}/${framework}` | ||
.beforeEach(async t => { | ||
await applyTheme(theme); | ||
}); | ||
|
||
test("Check question title font size", async (t) => { | ||
await wrapVisualTest(t, async (t, comparer) => { | ||
await t.resizeWindow(800, 1600); | ||
await initSurvey(framework, { | ||
"logoPosition": "right", | ||
"showQuestionNumbers": "off", | ||
"pages": [ | ||
{ | ||
"name": "page1", | ||
"elements": [ | ||
{ | ||
"type": "file", | ||
"name": "question5" | ||
}, | ||
{ | ||
"type": "matrixdynamic", | ||
"name": "question1", | ||
"columns": [ | ||
{ | ||
"name": "Column 1" | ||
}, | ||
{ | ||
"name": "Column 2" | ||
}, | ||
{ | ||
"name": "Column 3" | ||
} | ||
], | ||
"choices": [ | ||
1, | ||
2, | ||
3, | ||
4, | ||
5 | ||
] | ||
}, | ||
{ | ||
"type": "paneldynamic", | ||
"name": "question2", | ||
"templateElements": [ | ||
{ | ||
"type": "text", | ||
"name": "question3" | ||
} | ||
], | ||
"panelCount": 3, | ||
"minPanelCount": 3, | ||
"renderMode": "tab" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "page2", | ||
"elements": [ | ||
{ | ||
"type": "text", | ||
"name": "question4" | ||
} | ||
] | ||
} | ||
] | ||
}); | ||
await ClientFunction(() => { | ||
(<any>window).survey.applyTheme({ | ||
"cssVariables": { | ||
"--sjs-font-questiontitle-size": "24px" | ||
} | ||
}); | ||
})(); | ||
await takeElementScreenshot("survey-theme-questiontitle-font-size.png", Selector(".sd-root-modern"), t, comparer); | ||
}); | ||
}); | ||
test("Check question title font size", async (t) => { | ||
await wrapVisualTest(t, async (t, comparer) => { | ||
await t.resizeWindow(800, 1600); | ||
await initSurvey(framework, { | ||
"logoPosition": "right", | ||
"showQuestionNumbers": "off", | ||
"elements": [{ | ||
type: "matrix", | ||
name: "Quality", | ||
title: "Matrix", | ||
columns: [ | ||
{ | ||
value: 1, | ||
text: "Strongly Disagree" | ||
}, | ||
{ | ||
value: 2, | ||
text: "Disagree" | ||
}, | ||
{ | ||
value: 3, | ||
text: "Neutral" | ||
}, | ||
{ | ||
value: 4, | ||
text: "Agree" | ||
}, | ||
{ | ||
value: 5, | ||
text: "Strongly Agree" | ||
} | ||
], | ||
rows: [ | ||
{ | ||
value: "affordable", | ||
text: "Product is affordable" | ||
}, | ||
{ | ||
value: "does what it claims", | ||
text: "Product does what it claims" | ||
}, | ||
{ | ||
value: "better than others", | ||
text: "Product is better than other products on the market" | ||
}, | ||
{ | ||
value: "easy to use", | ||
text: "Product is easy to use" | ||
} | ||
] | ||
}] | ||
}); | ||
await ClientFunction(() => { | ||
(<any>window).survey.applyTheme({ | ||
"cssVariables": { | ||
"--sjs-font-editorfont-size": "24px", | ||
"--sjs-font-questiontitle-weight": "400" | ||
} | ||
}); | ||
})(); | ||
await takeElementScreenshot("survey-theme-questiontitle-font-weight.png", Selector(".sd-root-modern"), t, comparer); | ||
}); | ||
}); | ||
}); |