Skip to content

Commit

Permalink
Update the Completed Before page #7189
Browse files Browse the repository at this point in the history
  • Loading branch information
novikov82 committed Nov 3, 2023
1 parent e9b0dbc commit d149d9b
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/defaultV2-theme/blocks/sd-completedpage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

.sd-completedpage,
.sd-completed-before-page {
align-items: center;
font-family: $font-family;
font-weight: bold;
box-sizing: border-box;
Expand Down
19 changes: 13 additions & 6 deletions src/defaultV2-theme/mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,13 @@
user-select: none;
outline: solid calcSize(0.25) transparent;

color: $primary;
font-weight: 600;
font-style: normal;
font-family: $font-family;
font-size: $font-questiontitle-size;
line-height: multiply(1.5, $font-questiontitle-size);

&:hover {
background-color: $background-dark;
}
Expand All @@ -157,12 +164,12 @@
align-items: center;
flex-grow: 1;
justify-content: center;
color: $primary;
font-weight: 600;
font-style: normal;
font-family: $font-family;
font-size: $font-questiontitle-size;
line-height: multiply(1.5, $font-questiontitle-size);
// color: $primary;
// font-weight: 600;
// font-style: normal;
// font-family: $font-family;
// font-size: $font-questiontitle-size;
// line-height: multiply(1.5, $font-questiontitle-size);
}
}
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions visualRegressionTests/tests/defaultV2/survey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,38 @@ frameworks.forEach(framework => {
await t.resizeWindow(1920, 1080);
});
});

test("Survey complete pages", async (t) => {
await wrapVisualTest(t, async (t, comparer) => {
await t.resizeWindow(1600, 900);
const json = {
"cookieName": "survey-id",
"completedHtml": "<h3>Completed</h3><button>OK</button>",
"completedBeforeHtml": "<h3>Already completed</h3><button>OK</button>",
pages: [
{
"elements": [
{
"type": "text",
"name": "name",
"title": "Name"
}
]
}
]
};
await initSurvey(framework, json);
await t.click(".sd-navigation__complete-btn");
await takeElementScreenshot("survey-completed.png", Selector(".sd-root-modern"), t, comparer);
await ClientFunction(() => {
document.body.style.setProperty("--sjs-corner-radius", "0px");
(<any>window).survey.clear();
(<any>window).survey.isCompletedBefore = true;
})();
await takeElementScreenshot("survey-completed-before.png", Selector(".sd-root-modern"), t, comparer);
});
});

test("Check survey in compact mode", async (t) => {
await wrapVisualTest(t, async (t, comparer) => {
await t.resizeWindow(1920, 1080);
Expand Down

0 comments on commit d149d9b

Please sign in to comment.