1
0
mirror of https://github.com/mattermost/focalboard.git synced 2025-04-11 11:19:56 +02:00

Fixed a bug where images of the welcome board were not copied over. (#2453)

* Fixed a buig where images of welcome board were not copied over

* Lint fixes

* Fixed test

* Fixed test
This commit is contained in:
Harshil Sharma 2022-03-08 11:30:49 +05:30 committed by GitHub
parent 5c4b5585c8
commit a30fef5848
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -85,6 +85,10 @@ func (a *App) createWelcomeBoard(userID, workspaceID string) (string, error) {
blocks = model.GenerateBlockIDs(blocks, a.logger)
if errUpdateFileIDs := a.CopyCardFiles(onboardingBoardID, workspaceID, blocks); errUpdateFileIDs != nil {
return "", errUpdateFileIDs
}
// we're copying from a global template, so we need to set the
// `isTemplate` flag to false on the board
var welcomeBoardID string

View File

@ -38,6 +38,8 @@ func TestPrepareOnboardingTour(t *testing.T) {
"user_id_1",
).Return(nil)
th.Store.EXPECT().GetBlock(gomock.Any(), "block_id_1").Return(&welcomeBoard, nil)
th.Store.EXPECT().CreatePrivateWorkspace("user_id_1").Return("workspace_id_1", nil)
userPropPatch := model.UserPropPatch{
@ -86,6 +88,8 @@ func TestCreateWelcomeBoard(t *testing.T) {
"user_id_1",
).Return(nil)
th.Store.EXPECT().GetBlock(gomock.Any(), "block_id_1").Return(&welcomeBoard, nil)
boardID, err := th.App.createWelcomeBoard("user_id_1", "workspace_id_1")
assert.Nil(t, err)
assert.NotEmpty(t, boardID)