Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update visual tests #6368

Merged
merged 3 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
196 changes: 76 additions & 120 deletions visualRegressionTests/tests/designer/page-navigator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -421,81 +421,59 @@ test("Page navigator has enough space to be shown", async (t) => {
await wrapVisualTest(t, async (t, comparer) => {
await t.resizeWindow(1508, 800);
await setJSON({
title: "NPS Survey Question",
pages: [
"title": "NPS Survey Question",
"widthMode": "responsive",
"pages": [
{
name: "page1",
elements: [
"name": "page1",
"elements": [
{
type: "rating",
name: "nps_score",
title:
"On a scale of zero to ten, how likely are you to recommend our product to a friend or colleague?",
isRequired: true,
rateCount: 11,
rateMin: 0,
rateMax: 10,
minRateDescription: "(Most unlikely)",
maxRateDescription: "(Most likely)",
"type": "comment",
"name": "nps_score",
"title": "On a scale of zero to ten, how likely are you to recommend our product to a friend or colleague?",
"isRequired": true
},
{
type: "checkbox",
name: "promoter_features",
visibleIf: "{nps_score} >= 9",
title: "Which of the following features do you value the most?",
description: "Please select no more than three features.",
isRequired: true,
validators: [
{
type: "answercount",
text: "Please select no more than three features.",
maxCount: 3,
},
],
choices: [
"Performance",
"Stability",
"User interface",
"Complete functionality",
"Learning materials (documentation, demos, code examples)",
"Quality support",
],
showOtherItem: true,
otherText: "Other features:",
colCount: 2,
"type": "comment",
"name": "promoter_features",
"visibleIf": "{nps_score} >= 9",
"title": "Which of the following features do you value the most?",
"description": "Please select no more than three features.",
"isRequired": true,
"rows": 6
},
{
type: "comment",
name: "passive_experience",
visibleIf: "{nps_score} >= 7 and {nps_score} <= 8",
title: "What can we do to make your experience more satisfying?",
"type": "comment",
"name": "passive_experience",
"visibleIf": "{nps_score} >= 7 and {nps_score} <= 8",
"title": "What can we do to make your experience more satisfying?",
"rows": 6
},
{
type: "comment",
name: "disappointing_experience",
visibleIf: "{nps_score} <= 6",
title:
"Please let us know why you had such a disappointing experience with our product",
},
],
"type": "comment",
"name": "disappointing_experience",
"visibleIf": "{nps_score} <= 6",
"title": "Please let us know why you had such a disappointing experience with our product"
}
]
},
{
name: "page2",
elements: [
"name": "page2",
"elements": [
{
type: "text",
name: "question1",
"type": "text",
"name": "question1"
},
{
type: "text",
name: "question2",
"type": "text",
"name": "question2"
},
{
type: "text",
name: "question3",
},
],
},
"type": "text",
"name": "question3"
}
]
}
],
});
await ClientFunction(() => { document.body.focus(); })();
Expand All @@ -512,81 +490,59 @@ test("Page navigator in by-page mode has enough space to be shown", async (t) =>
window["creator"].pageEditMode = "bypage";
})();
await setJSON({
title: "NPS Survey Question",
pages: [
"title": "NPS Survey Question",
"widthMode": "responsive",
"pages": [
{
name: "page1",
elements: [
"name": "page1",
"elements": [
{
type: "rating",
name: "nps_score",
title:
"On a scale of zero to ten, how likely are you to recommend our product to a friend or colleague?",
isRequired: true,
rateCount: 11,
rateMin: 0,
rateMax: 10,
minRateDescription: "(Most unlikely)",
maxRateDescription: "(Most likely)",
"type": "comment",
"name": "nps_score",
"title": "On a scale of zero to ten, how likely are you to recommend our product to a friend or colleague?",
"isRequired": true
},
{
type: "checkbox",
name: "promoter_features",
visibleIf: "{nps_score} >= 9",
title: "Which of the following features do you value the most?",
description: "Please select no more than three features.",
isRequired: true,
validators: [
{
type: "answercount",
text: "Please select no more than three features.",
maxCount: 3,
},
],
choices: [
"Performance",
"Stability",
"User interface",
"Complete functionality",
"Learning materials (documentation, demos, code examples)",
"Quality support",
],
showOtherItem: true,
otherText: "Other features:",
colCount: 2,
"type": "comment",
"name": "promoter_features",
"visibleIf": "{nps_score} >= 9",
"title": "Which of the following features do you value the most?",
"description": "Please select no more than three features.",
"isRequired": true,
"rows": 6
},
{
type: "comment",
name: "passive_experience",
visibleIf: "{nps_score} >= 7 and {nps_score} <= 8",
title: "What can we do to make your experience more satisfying?",
"type": "comment",
"name": "passive_experience",
"visibleIf": "{nps_score} >= 7 and {nps_score} <= 8",
"title": "What can we do to make your experience more satisfying?",
"rows": 6
},
{
type: "comment",
name: "disappointing_experience",
visibleIf: "{nps_score} <= 6",
title:
"Please let us know why you had such a disappointing experience with our product",
},
],
"type": "comment",
"name": "disappointing_experience",
"visibleIf": "{nps_score} <= 6",
"title": "Please let us know why you had such a disappointing experience with our product"
}
]
},
{
name: "page2",
elements: [
"name": "page2",
"elements": [
{
type: "text",
name: "question1",
"type": "text",
"name": "question1"
},
{
type: "text",
name: "question2",
"type": "text",
"name": "question2"
},
{
type: "text",
name: "question3",
},
],
},
"type": "text",
"name": "question3"
}
]
}
],
});
await ClientFunction(() => { document.body.focus(); })();
Expand Down
Loading