-
Notifications
You must be signed in to change notification settings - Fork 793
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
work for surveyjs/private-tasks#310 (#7117)
Co-authored-by: OlgaLarina <olga.larina.dev@gmail.com>
- Loading branch information
1 parent
a4d88b3
commit 9d32f6c
Showing
11 changed files
with
121 additions
and
14 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
packages/survey-angular-ui/src/components/cover/cover.component.html
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
import { Selector, ClientFunction } from "testcafe"; | ||
import { url, frameworks, initSurvey, url_test, takeElementScreenshot, wrapVisualTest } from "../../helper"; | ||
|
||
const title = "Advanced header 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 survey advanced header inherit width from survey", async (t) => { | ||
await wrapVisualTest(t, async (t, comparer) => { | ||
await t.resizeWindow(1200, 1000); | ||
await initSurvey(framework, { | ||
title: "Survey Title", | ||
description: "Survey description", | ||
logo: "https://surveyjs.io/Content/Images/examples/image-picker/lion.jpg", | ||
"widthMode": "static", | ||
"width": "600", | ||
headerView: "advanced", | ||
questions: [ | ||
{ | ||
type: "text", | ||
title: "Question title", | ||
name: "q1" | ||
} | ||
] | ||
}); | ||
await ClientFunction(() => { | ||
(<any>window).survey.applyTheme({ | ||
"header": { | ||
height: "500px", | ||
} | ||
}); | ||
})(); | ||
await takeElementScreenshot("survey-advanced-header-width-by-survey.png", Selector(".sd-root-modern"), t, comparer); | ||
}); | ||
}); | ||
test("Check survey advanced header with overlap", async (t) => { | ||
await wrapVisualTest(t, async (t, comparer) => { | ||
await t.resizeWindow(1200, 1000); | ||
await initSurvey(framework, { | ||
title: "Survey Title", | ||
description: "Survey description", | ||
logo: "https://surveyjs.io/Content/Images/examples/image-picker/lion.jpg", | ||
"widthMode": "static", | ||
"width": "600", | ||
headerView: "advanced", | ||
questions: [ | ||
{ | ||
type: "text", | ||
title: "Question title", | ||
name: "q1" | ||
} | ||
] | ||
}); | ||
await ClientFunction(() => { | ||
(<any>window).survey.applyTheme({ | ||
"header": { | ||
height: "500px", | ||
"overlapEnabled": true, | ||
}, | ||
"cssVariables": { | ||
"--sjs-cover-backcolor": "rgba(25, 179, 148, 1)" | ||
} | ||
}); | ||
})(); | ||
await takeElementScreenshot("survey-advanced-header-with-overlap.png", Selector(".sd-root-modern"), t, comparer); | ||
}); | ||
}); | ||
}); |
Binary file added
BIN
+128 KB
...ressionTests/tests/defaultV2/etalons/survey-advanced-header-width-by-survey.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
+127 KB
...RegressionTests/tests/defaultV2/etalons/survey-advanced-header-with-overlap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.