[MM-51233] Updates for Trial Requests (#22620)
* Add new trial form to enrich trial requests with more customer info * Update snapshots * One more addition * Fixes from PR feedback * Fix types, i18n, update e2e tests * Fix linter * Fix i18n? * Fix blank translation * update snapshot * Update snapshot properly * Remove inapplicable test * Fix business email validation only happening once * UX Feedback * Fix linter * Fix linter again, not working locally * FIX LINTER * Move isvalid check until after some fields are set * Fix for overlapping modals * Fix linter * UX feedback * UX Feedback * Fix typo in error modal * [MM-51551] Add new Trial Form to Playbooks trial requests (#22650) * Playbooks start trial entrypoints opens new trial form modal * Fix style --------- Co-authored-by: Mattermost Build <build@mattermost.com> * [MM-51347] Trial form error modal for embargoed and air gapped entities (#22656) * Playbooks start trial entrypoints opens new trial form modal * Add support for air gapped environments when making trial requests * Add specific handling for embargoed entities * undo some code * Fix linter * Fix types * Fix style * Updates because TE has to upgrade to E0 before it can activate a trial --------- Co-authored-by: Mattermost Build <build@mattermost.com> --------- Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
@@ -328,30 +328,6 @@ func Test_requestTrial(t *testing.T) {
|
||||
}
|
||||
|
||||
func Test_validateBusinessEmail(t *testing.T) {
|
||||
t.Run("Returns forbidden for non admin executors", func(t *testing.T) {
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
th.Client.Login(th.BasicUser.Email, th.BasicUser.Password)
|
||||
|
||||
invalidEmail := model.ValidateBusinessEmailRequest{Email: "invalid@gmail.com"}
|
||||
|
||||
th.App.Srv().SetLicense(model.NewTestLicense("cloud"))
|
||||
|
||||
cloud := mocks.CloudInterface{}
|
||||
|
||||
cloud.Mock.On("ValidateBusinessEmail", th.SystemAdminUser.Id, invalidEmail.Email).Return(errors.New("invalid email"))
|
||||
|
||||
cloudImpl := th.App.Srv().Cloud
|
||||
defer func() {
|
||||
th.App.Srv().Cloud = cloudImpl
|
||||
}()
|
||||
th.App.Srv().Cloud = &cloud
|
||||
|
||||
res, err := th.Client.ValidateBusinessEmail(&invalidEmail)
|
||||
require.Error(t, err)
|
||||
require.Equal(t, http.StatusForbidden, res.StatusCode, "403")
|
||||
})
|
||||
|
||||
t.Run("Returns forbidden for invalid business email", func(t *testing.T) {
|
||||
th := Setup(t).InitBasic()
|
||||
|
||||
Ссылка в новой задаче
Block a user