Skip to content

Commit

Permalink
[MM-37788] - Remove support email step in admin onboarding (mattermos…
Browse files Browse the repository at this point in the history
…t#8556)

* [MM-37788] - Remove support email step in admin onboarding

* fix translations
  • Loading branch information
AGMETEOR authored Aug 13, 2021
1 parent d0a114d commit 8cdc8f0
Show file tree
Hide file tree
Showing 12 changed files with 9 additions and 351 deletions.
2 changes: 1 addition & 1 deletion components/next_steps_view/steps.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ describe('components/next_steps_view/steps', () => {
},
},
};
expect(getSteps(state as any)).toHaveLength(5);
expect(getSteps(state as any)).toHaveLength(4);
});

test('should only show the complete_profile_step to guest users', () => {
Expand Down
11 changes: 0 additions & 11 deletions components/next_steps_view/steps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import SetupPreferencesStep from './steps/setup_preferences_step/setup_preferenc
import InviteMembersStep from './steps/invite_members_step';
import TeamProfileStep from './steps/team_profile_step';
import EnableNotificationsStep from './steps/enable_notifications_step/enable_notifications_step';
import EnterSupportEmail from './steps/enter_support_email/enter_support_email';

import {isStepForUser} from './step_helpers';

Expand Down Expand Up @@ -92,16 +91,6 @@ export const Steps: StepType[] = [
component: InviteMembersStep,
visible: true,
},
{
id: RecommendedNextSteps.ENTER_SUPPORT_EMAIL,
title: localizeMessage(
'next_steps_view.titles.enterSupportEmail',
'Enter support email',
),
roles: ['first_admin'],
component: EnterSupportEmail,
visible: true,
},
];

export const isFirstAdmin = createSelector(
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,8 @@ class InviteMembersStep extends React.PureComponent<Props, State> {
onClick={this.onFinish}
>
<FormattedMessage
id='next_steps_view.invite_members_step.next'
defaultMessage='Next'
id='next_steps_view.invite_members_step.finish'
defaultMessage='Finish'
/>
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ describe('Cloud Onboarding - Sysadmin', () => {
'notification_setup',
'team_setup',
'invite_members',
'enter_support_email',
'hide',
'skip',
];
Expand All @@ -63,7 +62,7 @@ describe('Cloud Onboarding - Sysadmin', () => {
cy.findByTestId('CompleteProfileStep__saveProfileButton').should('be.visible').and('not.be.disabled').click();

// * Step counter should increment
cy.get('.SidebarNextSteps .SidebarNextSteps__middle').should('contain', '1 / 5 steps complete');
cy.get('.SidebarNextSteps .SidebarNextSteps__middle').should('contain', '1 / 4 steps complete');

// * Check to make sure card is expanded
cy.get('.Card__body.expanded .TeamProfileStep').should('be.visible');
Expand All @@ -78,15 +77,15 @@ describe('Cloud Onboarding - Sysadmin', () => {
cy.findByTestId('TeamProfileStep__saveTeamButton').should('be.visible').and('not.be.disabled').click();

// * Step counter should increment
cy.get('.SidebarNextSteps .SidebarNextSteps__middle').should('contain', '2 / 5 steps complete');
cy.get('.SidebarNextSteps .SidebarNextSteps__middle').should('contain', '2 / 4 steps complete');

// * Check to make sure card is expanded
cy.findByText('We recommend enabling desktop notifications so you don’t miss any important communications.').should('be.visible');

cy.findByRole('button', {name: 'Set up notifications'}).should('be.visible').click();

// * Step counter should increment
cy.get('.SidebarNextSteps .SidebarNextSteps__middle').should('contain', '3 / 5 steps complete');
cy.get('.SidebarNextSteps .SidebarNextSteps__middle').should('contain', '3 / 4 steps complete');

// * Check to make sure card is expanded
cy.get('.Card__body.expanded .InviteMembersStep').should('be.visible');
Expand All @@ -95,19 +94,7 @@ describe('Cloud Onboarding - Sysadmin', () => {
cy.findByTestId('InviteMembersStep__finishButton').should('be.visible').and('not.be.disabled').click();

// * Step counter should increment
cy.get('.SidebarNextSteps .SidebarNextSteps__middle').should('contain', '4 / 5 steps complete');

// * Check to make sure card is expanded
cy.get('.Card__body.expanded .EnterSupportEmailStep').should('be.visible');

// # Enter email addresses
cy.get('#input_enter_support_email').should('be.visible').type('[email protected]');

// # Click Finish button
cy.findByTestId('EnterSupportEmailStep__finishButton').should('be.visible').and('not.be.disabled').click();

// * Step counter should increment
cy.get('.SidebarNextSteps .SidebarNextSteps__middle').should('contain', '5 / 5 steps complete');
cy.get('.SidebarNextSteps .SidebarNextSteps__middle').should('contain', '4 / 4 steps complete');

// * Should show Tips and Next Steps
cy.findByText('Tips & Next Steps').should('be.visible');
Expand Down Expand Up @@ -137,7 +124,7 @@ describe('Cloud Onboarding - Sysadmin', () => {
cy.get('.Card__body.expanded .TeamProfileStep').should('exist').should('be.visible');

// * Step counter should not increment
cy.get('.SidebarNextSteps .SidebarNextSteps__middle').should('contain', '0 / 5 steps complete');
cy.get('.SidebarNextSteps .SidebarNextSteps__middle').should('contain', '0 / 4 steps complete');
});

it('MM-T3328 Sysadmin - Skip Getting Started', () => {
Expand Down
Loading

0 comments on commit 8cdc8f0

Please sign in to comment.