Skip to content

Commit

Permalink
Work for #7191: fix mobile multipletext with inputType 'date'
Browse files Browse the repository at this point in the history
  • Loading branch information
dk981234 committed Oct 20, 2023
1 parent 95ecc0f commit b57b4f6
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/defaultV2-theme/defaultV2.m600.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@

.sd-multipletext__item {
flex-basis: 0;
min-width: 0;

.sd-input {
padding: 0;
Expand All @@ -84,7 +85,12 @@

.sd-multipletext__item {
flex-basis: auto;
min-width: auto;
width: 100%;

.sd-input {
width: 100%;
}
}
}
}
Expand Down
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.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions visualRegressionTests/tests/defaultV2/responsiveness.ts
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,43 @@ frameworks.forEach(framework => {
await takeElementScreenshot("responsiveness-multipletext.png", Selector(".sd-question"), t, comparer);
});
});
test("Check multipletext with inputType 'date' on small screen", async (t) => {
await wrapVisualTest(t, async (t, comparer) => {
await t.resizeWindow(600, 1080);
await initSurvey(framework, {
showQuestionNumbers: "off",
questions: [
{
type: "multipletext",
name: "q1",
title: "Personal Information",
colCount: 2,
items: [
{
name: "item1",
inputType: "date",
title: "Depature Date "
},
{
name: "item2",
inputType: "date",
title: "Arrival Date "
},
]
},
]
});
const inputSelector = Selector(".sd-input");
await takeElementScreenshot("responsiveness-multipletext-date-empty.png", Selector(".sd-question"), t, comparer);
await t.click(inputSelector.nth(0));
await takeElementScreenshot("responsiveness-multipletext-date-focus.png", Selector(".sd-question"), t, comparer);
await t.typeText(inputSelector.nth(1), "2004-01-12")
.click(inputSelector.nth(2))
.typeText(inputSelector.nth(3), "2004-02-12");
await resetFocusToBody();
await takeElementScreenshot("responsiveness-multipletext-date.png", Selector(".sd-question"), t, comparer);
});
});
test("Check multicolumn checkbox question on small screen", async (t) => {
await wrapVisualTest(t, async (t, comparer) => {
await t.resizeWindow(600, 1080);
Expand Down

0 comments on commit b57b4f6

Please sign in to comment.