mirror of
https://github.com/formbricks/formbricks.git
synced 2026-02-19 21:40:32 -06:00
chore: Improve Debug messages (#2451)
This commit is contained in:
@@ -15,7 +15,7 @@ export const CTASummary = ({ questionSummary }: CTASummaryProps) => {
|
||||
<div className="space-y-5 rounded-b-lg bg-white px-4 pb-6 pt-4 text-sm md:px-6 md:text-base">
|
||||
<div className="text flex justify-between px-2 pb-2">
|
||||
<div className="mr-8 flex space-x-1">
|
||||
<p className="font-semibold text-slate-700">Clickthrough Rate (CTR)</p>
|
||||
<p className="font-semibold text-slate-700">Click-through rate (CTR)</p>
|
||||
<div>
|
||||
<p className="rounded-lg bg-slate-100 px-2 text-slate-700">
|
||||
{convertFloatToNDecimal(questionSummary.ctr.percentage, 1)}%
|
||||
@@ -23,7 +23,7 @@ export const CTASummary = ({ questionSummary }: CTASummaryProps) => {
|
||||
</div>
|
||||
</div>
|
||||
<p className="flex w-32 items-end justify-end text-slate-600">
|
||||
{questionSummary.ctr.count} {questionSummary.ctr.count === 1 ? "response" : "responses"}
|
||||
{questionSummary.ctr.count} {questionSummary.ctr.count === 1 ? "click" : "clicks"}
|
||||
</p>
|
||||
</div>
|
||||
<ProgressBar barColor="bg-brand" progress={questionSummary.ctr.percentage / 100} />
|
||||
|
||||
@@ -124,7 +124,7 @@ test.describe("JS Package Test", async () => {
|
||||
await page.waitForTimeout(1000);
|
||||
await expect(page.getByRole("button", { name: "Responses50%" })).toBeVisible();
|
||||
await expect(page.getByText("1 Responses", { exact: true }).first()).toBeVisible();
|
||||
await expect(page.getByText("Clickthrough Rate (CTR)100%")).toBeVisible();
|
||||
await expect(page.getByText("Click-through rate (CTR)100%")).toBeVisible();
|
||||
await expect(page.getByText("Somewhat disappointed100%")).toBeVisible();
|
||||
await expect(page.getByText("Founder100%")).toBeVisible();
|
||||
await expect(page.getByText("People who believe that PMF").first()).toBeVisible();
|
||||
|
||||
@@ -35,7 +35,7 @@ export const triggerSurvey = async (survey: TSurvey, action?: string): Promise<v
|
||||
if (survey.displayPercentage) {
|
||||
const shouldDisplaySurvey = shouldDisplayBasedOnPercentage(survey.displayPercentage);
|
||||
if (!shouldDisplaySurvey) {
|
||||
logger.debug("Survey display skipped based on displayPercentage.");
|
||||
logger.debug(`Survey display of "${survey.name}" skipped based on displayPercentage.`);
|
||||
return; // skip displaying the survey
|
||||
}
|
||||
}
|
||||
@@ -50,7 +50,7 @@ const renderWidget = async (survey: TSurvey, action?: string) => {
|
||||
setIsSurveyRunning(true);
|
||||
|
||||
if (survey.delay) {
|
||||
logger.debug(`Delaying survey by ${survey.delay} seconds.`);
|
||||
logger.debug(`Delaying survey "${survey.name}" by ${survey.delay} seconds.`);
|
||||
}
|
||||
|
||||
const product = config.get().state.product;
|
||||
@@ -63,7 +63,7 @@ const renderWidget = async (survey: TSurvey, action?: string) => {
|
||||
const displayLanguage = getLanguageCode(survey, attributes);
|
||||
//if survey is not available in selected language, survey wont be shown
|
||||
if (!displayLanguage) {
|
||||
logger.debug("Survey not available in specified language.");
|
||||
logger.debug(`Survey "${survey.name}" is not available in specified language.`);
|
||||
setIsSurveyRunning(true);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user