From cb847e581a83b76c5f1cfc1e9fbc0607233fcc37 Mon Sep 17 00:00:00 2001
From: dklimpel <5740567+dklimpel@users.noreply.github.com>
Date: Mon, 2 Jun 2025 23:20:07 +0200
Subject: [PATCH 1/8] ci: bump NodeJs to v22 (LTS)
---
.github/workflows/build-test.yml | 2 +-
.github/workflows/node.js.yml | 28 ++++++++++++++++++++++++++++
2 files changed, 29 insertions(+), 1 deletion(-)
create mode 100644 .github/workflows/node.js.yml
diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml
index f8645ec5..6ceca690 100644
--- a/.github/workflows/build-test.yml
+++ b/.github/workflows/build-test.yml
@@ -17,7 +17,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v4
with:
- node-version: "18"
+ node-version: "22"
- name: Install dependencies
run: yarn --immutable
- name: Run checks
diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml
new file mode 100644
index 00000000..6f21d058
--- /dev/null
+++ b/.github/workflows/node.js.yml
@@ -0,0 +1,28 @@
+name: Create release tarball and attach to tag
+
+on:
+ push:
+ tags:
+ - "*"
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-node@v2
+ with:
+ node-version: "22"
+ - run: yarn install
+ - run: yarn build
+ - run: |
+ version=`git describe --dirty --tags || echo unknown`
+ mkdir -p dist
+ cp -r build synapse-admin-$version
+ tar chvzf dist/synapse-admin-$version.tar.gz synapse-admin-$version
+ - uses: softprops/action-gh-release@b7e450da2a4b4cb4bfbae528f788167786cfcedf
+ with:
+ files: dist/*.tar.gz
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
From 9b06d131b831b0e2a094edd0211469a95e5a77c2 Mon Sep 17 00:00:00 2001
From: dklimpel <5740567+dklimpel@users.noreply.github.com>
Date: Mon, 2 Jun 2025 23:33:55 +0200
Subject: [PATCH 2/8] fix files
---
.github/workflows/github-release.yml | 2 +-
.github/workflows/node.js.yml | 28 ----------------------------
2 files changed, 1 insertion(+), 29 deletions(-)
delete mode 100644 .github/workflows/node.js.yml
diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml
index 16cea5fa..18c96d37 100644
--- a/.github/workflows/github-release.yml
+++ b/.github/workflows/github-release.yml
@@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
- node-version: "20"
+ node-version: "22"
- run: yarn install --immutable
- run: yarn build
- run: |
diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml
deleted file mode 100644
index 6f21d058..00000000
--- a/.github/workflows/node.js.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-name: Create release tarball and attach to tag
-
-on:
- push:
- tags:
- - "*"
-
-jobs:
- build:
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v2
- - uses: actions/setup-node@v2
- with:
- node-version: "22"
- - run: yarn install
- - run: yarn build
- - run: |
- version=`git describe --dirty --tags || echo unknown`
- mkdir -p dist
- cp -r build synapse-admin-$version
- tar chvzf dist/synapse-admin-$version.tar.gz synapse-admin-$version
- - uses: softprops/action-gh-release@b7e450da2a4b4cb4bfbae528f788167786cfcedf
- with:
- files: dist/*.tar.gz
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
From 00312600eaef9bd2ced60fcbdb4b8bcdde8114f6 Mon Sep 17 00:00:00 2001
From: dklimpel <5740567+dklimpel@users.noreply.github.com>
Date: Mon, 2 Jun 2025 23:38:31 +0200
Subject: [PATCH 3/8] bump edge_ghpage.yaml
---
.github/workflows/edge_ghpage.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/edge_ghpage.yml b/.github/workflows/edge_ghpage.yml
index e7f79283..fbab4047 100644
--- a/.github/workflows/edge_ghpage.yml
+++ b/.github/workflows/edge_ghpage.yml
@@ -18,7 +18,7 @@ jobs:
fetch-tags: true
- uses: actions/setup-node@v4
with:
- node-version: "20"
+ node-version: "22"
- name: Install and Build 🔧
run: |
yarn install --immutable
From 44bd1ed5697ca9fc56eb000cb60991a4cac5ad39 Mon Sep 17 00:00:00 2001
From: Dirk Klimpel <5740567+dklimpel@users.noreply.github.com>
Date: Tue, 3 Jun 2025 16:57:22 +0200
Subject: [PATCH 4/8] uses MemoryRouter
---
src/App.test.tsx | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/App.test.tsx b/src/App.test.tsx
index 6e347805..fc0a47ce 100644
--- a/src/App.test.tsx
+++ b/src/App.test.tsx
@@ -1,4 +1,5 @@
import { render, screen } from "@testing-library/react";
+import { MemoryRouter } from 'react-router-dom';
import fetchMock from "jest-fetch-mock";
fetchMock.enableMocks();
@@ -6,7 +7,11 @@ import App from "./App";
describe("App", () => {
it("renders", async () => {
- render();
+ render(
+
+
+
+ );
await screen.findAllByText("Welcome to Synapse-admin");
});
});
From a5cc7a9f9fae68db4e15783261efbb10440607c8 Mon Sep 17 00:00:00 2001
From: Dirk Klimpel <5740567+dklimpel@users.noreply.github.com>
Date: Tue, 3 Jun 2025 17:07:40 +0200
Subject: [PATCH 5/8] add assert
---
src/App.test.tsx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/App.test.tsx b/src/App.test.tsx
index fc0a47ce..91d531d7 100644
--- a/src/App.test.tsx
+++ b/src/App.test.tsx
@@ -12,6 +12,7 @@ describe("App", () => {
);
- await screen.findAllByText("Welcome to Synapse-admin");
+ const heading = await await screen.findAllByText("Welcome to Synapse-admin");
+ expect(heading).toBeInTheDocument();
});
});
From 3c2432e54674084966e9259e110cc409efcff0b5 Mon Sep 17 00:00:00 2001
From: Dirk Klimpel <5740567+dklimpel@users.noreply.github.com>
Date: Tue, 3 Jun 2025 17:09:57 +0200
Subject: [PATCH 6/8] typos
---
src/App.test.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/App.test.tsx b/src/App.test.tsx
index 91d531d7..7f6e19d2 100644
--- a/src/App.test.tsx
+++ b/src/App.test.tsx
@@ -12,7 +12,7 @@ describe("App", () => {
);
- const heading = await await screen.findAllByText("Welcome to Synapse-admin");
+ const heading = await screen.findAllByText("Welcome to Synapse-admin");
expect(heading).toBeInTheDocument();
});
});
From 8b5e5c3d82ac63f8af43284195c08a1933b1fb0c Mon Sep 17 00:00:00 2001
From: Dirk Klimpel <5740567+dklimpel@users.noreply.github.com>
Date: Tue, 3 Jun 2025 17:15:21 +0200
Subject: [PATCH 7/8] change test func
---
src/App.test.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/App.test.tsx b/src/App.test.tsx
index 7f6e19d2..e555d4fc 100644
--- a/src/App.test.tsx
+++ b/src/App.test.tsx
@@ -12,7 +12,7 @@ describe("App", () => {
);
- const heading = await screen.findAllByText("Welcome to Synapse-admin");
+ const heading = await screen.findByText("Welcome to Synapse-admin");
expect(heading).toBeInTheDocument();
});
});
From 352878ff28d96fb85e377d280c5f1e0a8c429f47 Mon Sep 17 00:00:00 2001
From: dklimpel <5740567+dklimpel@users.noreply.github.com>
Date: Tue, 3 Jun 2025 18:54:43 +0200
Subject: [PATCH 8/8] fix logout
---
src/App.test.tsx | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/App.test.tsx b/src/App.test.tsx
index e555d4fc..327eced9 100644
--- a/src/App.test.tsx
+++ b/src/App.test.tsx
@@ -5,6 +5,13 @@ fetchMock.enableMocks();
import App from "./App";
+jest.mock("./synapse/authProvider", () => ({
+ __esModule: true,
+ default: {
+ logout: jest.fn().mockResolvedValue(undefined),
+ },
+}));
+
describe("App", () => {
it("renders", async () => {
render(