fix: remove description from new questions (#3112)

This commit is contained in:
Johannes
2024-09-07 14:25:55 +02:00
committed by GitHub
parent 780115ffb8
commit 39e87eb8d3
5 changed files with 6 additions and 12 deletions

View File

@@ -50,7 +50,6 @@ export const questionTypes: TQuestion[] = [
icon: MessageSquareTextIcon,
preset: {
headline: { default: "Who let the dogs out?" },
subheader: { default: "Who? Who? Who?" },
placeholder: { default: "Type your answer here..." },
longAnswer: true,
inputType: "text",
@@ -63,7 +62,6 @@ export const questionTypes: TQuestion[] = [
icon: Rows3Icon,
preset: {
headline: { default: "What do you do?" },
subheader: { default: "Can't do both." },
choices: [
{ id: createId(), label: { default: "Eat the cake 🍰" } },
{ id: createId(), label: { default: "Have the cake 🎂" } },
@@ -93,7 +91,6 @@ export const questionTypes: TQuestion[] = [
icon: ImageIcon,
preset: {
headline: { default: "Which is the cutest puppy?" },
subheader: { default: "You can also pick both." },
allowMulti: true,
choices: [
{
@@ -114,7 +111,6 @@ export const questionTypes: TQuestion[] = [
icon: StarIcon,
preset: {
headline: { default: "How would you rate {{productName}}" },
subheader: { default: "Don't worry, be honest." },
scale: "star",
range: 5,
lowerLabel: { default: "Not good" },
@@ -155,8 +151,7 @@ export const questionTypes: TQuestion[] = [
icon: Grid3X3Icon,
preset: {
headline: { default: "How much do you love these flowers?" },
subheader: { default: "0: Not at all, 3: Love it" },
rows: [{ default: "Rose 🌹" }, { default: "Sunflower 🌻" }, { default: "Hibiscus 🌺" }],
rows: [{ default: "Roses" }, { default: "Trees" }, { default: "Ocean" }],
columns: [{ default: "0" }, { default: "1" }, { default: "2" }, { default: "3" }],
} as Partial<TSurveyMatrixQuestion>,
},

View File

@@ -169,9 +169,9 @@ test.describe("Survey Create & Submit Response", async () => {
await expect(page.getByRole("cell", { name: surveys.createAndSubmit.matrix.columns[3] })).toBeVisible();
await expect(page.locator("#questionCard-9").getByRole("button", { name: "Next" })).toBeVisible();
await expect(page.locator("#questionCard-9").getByRole("button", { name: "Back" })).toBeVisible();
await page.getByRole("row", { name: "Rose 🌹" }).getByRole("cell").nth(1).click();
await page.getByRole("row", { name: "Sunflower 🌻" }).getByRole("cell").nth(1).click();
await page.getByRole("row", { name: "Hibiscus 🌺" }).getByRole("cell").nth(1).click();
await page.getByRole("row", { name: "Roses" }).getByRole("cell").nth(1).click();
await page.getByRole("row", { name: "Trees" }).getByRole("cell").nth(1).click();
await page.getByRole("row", { name: "Ocean" }).getByRole("cell").nth(1).click();
await page.locator("#questionCard-9").getByRole("button", { name: "Next" }).click();
// Address Question

View File

@@ -150,7 +150,7 @@ export const surveys = {
matrix: {
question: "How much do you love these flowers?",
description: "0: Not at all, 3: Love it",
rows: ["Rose 🌹", "Sunflower 🌻", "Hibiscus 🌺"],
rows: ["Roses", "Trees", "Ocean"],
columns: ["0", "1", "2", "3"],
},
address: {

View File

@@ -2526,7 +2526,6 @@ export const customSurvey = {
id: createId(),
type: TSurveyQuestionTypeEnum.OpenText,
headline: { default: "What would you like to know?" },
subheader: { default: "This is an example survey." },
placeholder: { default: "Type your answer here..." },
required: true,
inputType: "text",

View File

@@ -120,7 +120,7 @@ export const MatrixQuestion = ({
// Table rows
<tr className={`${rowIndex % 2 === 0 ? "bg-input-bg" : ""}`}>
<td
className="fb-text-heading fb-rounded-l-custom fb-max-w-40 fb-break-words fb-px-4 fb-py-2"
className="fb-text-heading fb-rounded-l-custom fb-max-w-40 fb-break-words fb-pr-4 fb-pl-2 fb-py-2"
dir="auto">
{getLocalizedValue(row, languageCode)}
</td>