From d804cb0be1de06ef980984655ba4e317ea5e6574 Mon Sep 17 00:00:00 2001 From: Rajat Dabade Date: Wed, 14 Aug 2024 13:51:31 +0530 Subject: [PATCH] updated snapshot and fix test (#5031) * updated snapshot and fix test * Updated snapshot and removed unnecessary tests * chore: minor fix ci * refactor: updated the mac-os version supported by github actions * reverted: mac os version * refactor: updated mac os version and also changed docker-compose to docker compose --- .github/workflows/ci.yml | 5 +- .github/workflows/dev-release.yml | 2 +- .github/workflows/prod-release.yml | 2 +- Makefile | 18 +- .../__snapshots__/cardDialog.test.tsx.snap | 45 +- .../__snapshots__/centerPanel.test.tsx.snap | 16 +- .../__snapshots__/topBar.test.tsx.snap | 19 +- .../__snapshots__/workspace.test.tsx.snap | 214 +-- ...boardTemplateSelectorPreview.test.tsx.snap | 4 +- .../__snapshots__/cardDetail.test.tsx.snap | 6 +- .../kanban/__snapshots__/kanban.test.tsx.snap | 48 +- .../__snapshots__/kanbanCard.test.tsx.snap | 18 +- .../__snapshots__/addComments.test.tsx.snap | 2 +- .../addDescription.test.tsx.snap | 2 +- .../__snapshots__/addProperties.test.tsx.snap | 2 +- .../__snapshots__/addView.test.tsx.snap | 2 +- .../__snapshots__/copyLink.test.tsx.snap | 2 +- .../__snapshots__/shareBoard.test.tsx.snap | 2 +- .../channelPermissionsRow.test.tsx.snap | 445 ------ .../__snapshots__/shareBoard.test.tsx.snap | 1317 ++++------------- .../teamPermissionsRow.test.tsx.snap | 6 - .../userPermissionsRow.test.tsx.snap | 6 - .../components/shareBoard/shareBoard.test.tsx | 43 - webapp/src/components/workspace.test.tsx | 209 --- .../__snapshots__/welcomePage.test.tsx.snap | 8 +- 25 files changed, 346 insertions(+), 2097 deletions(-) delete mode 100644 webapp/src/components/shareBoard/__snapshots__/channelPermissionsRow.test.tsx.snap diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 05ff35f05b4..a2db9e5b2d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,8 +46,7 @@ jobs: with: path: "focalboard" - name: npm ci - run: | - cd focalboard/webapp && npm ci && cd - + run: cd focalboard/webapp && npm ci && cd - - name: Set up Go uses: actions/setup-go@v3 @@ -97,7 +96,7 @@ jobs: run: cd focalboard; make server-test-mini-${{matrix['db']}} ci-mac-server: - runs-on: macos-11 + runs-on: macos-12 strategy: matrix: diff --git a/.github/workflows/dev-release.yml b/.github/workflows/dev-release.yml index 54e4d3869e3..65e7bd4f8dd 100644 --- a/.github/workflows/dev-release.yml +++ b/.github/workflows/dev-release.yml @@ -66,7 +66,7 @@ jobs: path: ${{ github.workspace }}/focalboard/linux/dist/focalboard-linux.tar.gz macos: - runs-on: macos-11 + runs-on: macos-12 steps: diff --git a/.github/workflows/prod-release.yml b/.github/workflows/prod-release.yml index 3e076a066a0..9b466f3a855 100644 --- a/.github/workflows/prod-release.yml +++ b/.github/workflows/prod-release.yml @@ -63,7 +63,7 @@ jobs: path: ${{ github.workspace }}/focalboard/linux/dist/focalboard-linux.tar.gz macos: - runs-on: macos-11 + runs-on: macos-12 steps: diff --git a/Makefile b/Makefile index a77bc3b8e74..336e2935c69 100644 --- a/Makefile +++ b/Makefile @@ -142,11 +142,11 @@ server-test-mysql: export FOCALBOARD_STORE_TEST_DOCKER_PORT=44446 server-test-mysql: ## Run server tests using mysql @echo Starting docker container for mysql - docker-compose -f ./docker-testing/docker-compose-mysql.yml down -v --remove-orphans - docker-compose -f ./docker-testing/docker-compose-mysql.yml run start_dependencies + docker compose -f ./docker-testing/docker-compose-mysql.yml down -v --remove-orphans + docker compose -f ./docker-testing/docker-compose-mysql.yml run start_dependencies cd server; go test -tags '$(BUILD_TAGS)' -race -v -coverpkg=./... -coverprofile=server-mysql-profile.coverage -count=1 -timeout=30m ./... cd server; go tool cover -func server-mysql-profile.coverage - docker-compose -f ./docker-testing/docker-compose-mysql.yml down -v --remove-orphans + docker compose -f ./docker-testing/docker-compose-mysql.yml down -v --remove-orphans server-test-mariadb: export FOCALBOARD_UNIT_TESTING=1 server-test-mariadb: export FOCALBOARD_STORE_TEST_DB_TYPE=mariadb @@ -154,11 +154,11 @@ server-test-mariadb: export FOCALBOARD_STORE_TEST_DOCKER_PORT=44445 server-test-mariadb: templates-archive ## Run server tests using mysql @echo Starting docker container for mariadb - docker-compose -f ./docker-testing/docker-compose-mariadb.yml down -v --remove-orphans - docker-compose -f ./docker-testing/docker-compose-mariadb.yml run start_dependencies + docker compose -f ./docker-testing/docker-compose-mariadb.yml down -v --remove-orphans + docker compose -f ./docker-testing/docker-compose-mariadb.yml run start_dependencies cd server; go test -tags '$(BUILD_TAGS)' -race -v -coverpkg=./... -coverprofile=server-mariadb-profile.coverage -count=1 -timeout=30m ./... cd server; go tool cover -func server-mariadb-profile.coverage - docker-compose -f ./docker-testing/docker-compose-mariadb.yml down -v --remove-orphans + docker compose -f ./docker-testing/docker-compose-mariadb.yml down -v --remove-orphans server-test-postgres: export FOCALBOARD_UNIT_TESTING=1 server-test-postgres: export FOCALBOARD_STORE_TEST_DB_TYPE=postgres @@ -166,11 +166,11 @@ server-test-postgres: export FOCALBOARD_STORE_TEST_DOCKER_PORT=44447 server-test-postgres: ## Run server tests using postgres @echo Starting docker container for postgres - docker-compose -f ./docker-testing/docker-compose-postgres.yml down -v --remove-orphans - docker-compose -f ./docker-testing/docker-compose-postgres.yml run start_dependencies + docker compose -f ./docker-testing/docker-compose-postgres.yml down -v --remove-orphans + docker compose -f ./docker-testing/docker-compose-postgres.yml run start_dependencies cd server; go test -tags '$(BUILD_TAGS)' -race -v -coverpkg=./... -coverprofile=server-postgres-profile.coverage -count=1 -timeout=30m ./... cd server; go tool cover -func server-postgres-profile.coverage - docker-compose -f ./docker-testing/docker-compose-postgres.yml down -v --remove-orphans + docker compose -f ./docker-testing/docker-compose-postgres.yml down -v --remove-orphans webapp: ## Build webapp. cd webapp; npm run pack diff --git a/webapp/src/components/__snapshots__/cardDialog.test.tsx.snap b/webapp/src/components/__snapshots__/cardDialog.test.tsx.snap index defa8ebfd96..d5741064646 100644 --- a/webapp/src/components/__snapshots__/cardDialog.test.tsx.snap +++ b/webapp/src/components/__snapshots__/cardDialog.test.tsx.snap @@ -41,13 +41,6 @@ exports[`components/cardDialog already following card 1`] = ` Attach -
-
-
-
-
- -
+ />