refactor(editor): Add skip option to activation modal (#6092)

 Add skip option to activation modal
This commit is contained in:
Iván Ovejero 2023-04-27 21:21:53 +02:00 committed by GitHub
parent af097ae22c
commit 39b544271d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 0 deletions

View file

@ -57,6 +57,7 @@ describe('User activation survey', () => {
cy.wait(['@getWorkflows', '@getCredentials', '@getActive']);
userActivationSurveyModal.getters.modalContainer().should('be.visible');
userActivationSurveyModal.getters.feedbackInput().should('be.visible');
userActivationSurveyModal.getters.skipButton().should('be.visible');
userActivationSurveyModal.getters.feedbackInput().type('testing');
userActivationSurveyModal.getters.feedbackInput().should('have.value', 'testing');
userActivationSurveyModal.getters.sendFeedbackButton().click();

View file

@ -5,5 +5,6 @@ export class UserActivationSurveyModal extends BasePage {
modalContainer: () => cy.getByTestId('userActivationSurvey-modal').last(),
feedbackInput: () => cy.getByTestId('activation-feedback-input').find('textarea'),
sendFeedbackButton: () => cy.getByTestId('send-activation-feedback-button'),
skipButton: () => cy.getByTestId('skip-button'),
};
}

View file

@ -47,6 +47,13 @@
</template>
<template #footer>
<div :class="$style.modalFooter">
<n8n-button
size="large"
type="secondary"
data-test-id="skip-button"
:label="locale.baseText('userActivationSurveyModal.form.button.skip')"
@click="onSkip"
/>
<n8n-button
:disabled="!hasAnyChanges"
@click="onShareFeedback"
@ -100,6 +107,10 @@ const onShareFeedback = () => {
modalBus.emit('close');
};
const onSkip = () => {
modalBus.emit('close');
};
const getCurrentSettings = () => {
return userStore.currentUser?.settings;
};

View file

@ -1806,6 +1806,7 @@
"userActivationSurveyModal.description.savedTime": "for the first time. Looks like n8n just saved you some time! Can you help us make n8n even better and answer the following question?",
"userActivationSurveyModal.form.label": "What almost stopped you from creating this workflow?",
"userActivationSurveyModal.form.button.shareFeedback": "Share feedback",
"userActivationSurveyModal.form.button.skip": "Skip",
"userActivationSurveyModal.sharedFeedback.success": "Thanks for your feedback",
"userActivationSurveyModal.sharedFeedback.error": "Problem sharing feedback, try again",
"sso.login.divider": "or",