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

Add CSAT banner for 716 days after having a Plus subscription #5586

Merged
merged 5 commits into from
Feb 4, 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
6 changes: 3 additions & 3 deletions src/app/components/client/csat_survey/CsatSurvey.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe("CSAT survey banner: Automatic Removal", () => {
expect(answerButton).toBeInTheDocument();
});

it.each([90, 180, 351])(
it.each([90, 180, 351, 716])(
"displays the survey to users with automatic data removal enabled for at least n days",
(dayCount) => {
const ComposedCsatSurvey = composeStory(CsatSurveyAutomaticRemoval, Meta);
Expand Down Expand Up @@ -115,7 +115,7 @@ describe("CSAT survey banner: Automatic Removal", () => {
it("shows the correct follow-up feedback link for response “Satisfied”", async () => {
const user = userEvent.setup();
const ComposedCsatSurvey = composeStory(CsatSurveyAutomaticRemoval, Meta);
render(<ComposedCsatSurvey elapsedTimeInDaysSinceInitialScan={91} />);
render(<ComposedCsatSurvey elapsedTimeInDaysSinceInitialScan={716} />);

const answerButton = screen.getByRole("button", {
name: "Satisfied",
Expand All @@ -128,7 +128,7 @@ describe("CSAT survey banner: Automatic Removal", () => {
expect(feedbackLink).toBeInTheDocument();
expect(feedbackLink).toHaveAttribute(
"href",
"https://survey.alchemer.com/s3/7718223/fbbb597a762a",
"https://survey.alchemer.com/s3/8176616/091e554aa6ab",
);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
} from "./csatSurvey";

export type AutomaticRemovalVariation = {
id: "initial" | "3-months" | "6-months" | "12-months";
id: "initial" | "3-months" | "6-months" | "12-months" | "24-months";
showForUser: UserType[];
showOnTab: TabType[];
daysThreshold: number;
Expand Down Expand Up @@ -87,6 +87,20 @@ const surveyData: SurveyData = {
"very-satisfied": "https://survey.alchemer.com/s3/7718562/002e20b6b82f",
},
},
{
id: "24-months",
showForUser: ["plus-user"],
showOnTab: ["fixed"],
daysThreshold: 716,
followUpSurveyOptions: {
"very-dissatisfied":
"https://survey.alchemer.com/s3/8176616/edb0c3f18778",
dissatisfied: "https://survey.alchemer.com/s3/8176616/9b6ca1d007a5",
neutral: "https://survey.alchemer.com/s3/8176616/37955cef0c5e",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your PR description says this should follow the pattern 7714663, but I'm seeing the value mentioned here: 8176616. I'm assuming that this is correct.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch: It is implemented correctly and mentioned wrongly in the PR description — 8176616 is right. I just updated it.

satisfied: "https://survey.alchemer.com/s3/8176616/091e554aa6ab",
"very-satisfied": "https://survey.alchemer.com/s3/8176616/7ac85d1249cd",
},
},
],
};

Expand Down
Loading