feat(editor): Add follow up question nps (#17459)

This commit is contained in:
Nikhil Kuriakose
2025-07-25 17:26:40 +02:00
committed by GitHub
parent d29e583c45
commit e18ffe809c
4 changed files with 68 additions and 43 deletions

View File

@@ -3,8 +3,9 @@ import { clearNotifications } from '../pages/notifications';
import {
getNpsSurvey,
getNpsSurveyClose,
getNpsSurveyEmail,
getNpsSurveyFeedback,
getNpsSurveyRatings,
getNpsSurveySubmit,
} from '../pages/npsSurvey';
import { WorkflowPage } from '../pages/workflow';
@@ -22,7 +23,7 @@ describe('NpsSurvey', () => {
cy.signin(INSTANCE_ADMIN);
});
it('shows nps survey to recently activated user and can submit email ', () => {
it('shows nps survey to recently activated user and can submit feedback ', () => {
cy.intercept('/rest/settings', { middleware: true }, (req) => {
req.on('response', (res) => {
if (res.body.data) {
@@ -56,8 +57,8 @@ describe('NpsSurvey', () => {
getNpsSurveyRatings().find('button').should('have.length', 11);
getNpsSurveyRatings().find('button').first().click();
getNpsSurveyEmail().find('input').type('test@n8n.io');
getNpsSurveyEmail().find('button').click();
getNpsSurveyFeedback().find('textarea').type('n8n is the best');
getNpsSurveySubmit().find('button').click();
// test that modal does not show up again until 6 months later
workflowPage.actions.visit(true, NOW + ONE_DAY);

View File

@@ -6,7 +6,8 @@ export const getNpsSurvey = () => cy.getByTestId('nps-survey-modal');
export const getNpsSurveyRatings = () => cy.getByTestId('nps-survey-ratings');
export const getNpsSurveyEmail = () => cy.getByTestId('nps-survey-email');
export const getNpsSurveyFeedback = () => cy.getByTestId('nps-survey-feedback');
export const getNpsSurveySubmit = () => cy.getByTestId('nps-survey-feedback-button');
export const getNpsSurveyClose = () =>
cy.getByTestId('nps-survey-modal').find('button.el-drawer__close-btn');