From 3d428121096b811ba777bc222dd41b8183e8ad31 Mon Sep 17 00:00:00 2001 From: Dion Date: Wed, 23 Oct 2024 09:54:43 +0200 Subject: [PATCH 1/6] Nuget update packages --- starsky/build/_build.csproj | 2 +- starsky/starsky/starsky.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/starsky/build/_build.csproj b/starsky/build/_build.csproj index 83439605d..7e8a122ac 100644 --- a/starsky/build/_build.csproj +++ b/starsky/build/_build.csproj @@ -16,7 +16,7 @@ - + diff --git a/starsky/starsky/starsky.csproj b/starsky/starsky/starsky.csproj index 3b3094bbc..706b96829 100644 --- a/starsky/starsky/starsky.csproj +++ b/starsky/starsky/starsky.csproj @@ -61,7 +61,7 @@ - + From 82b1fdac39250d18ea266a81d8eae472d8d0ca3e Mon Sep 17 00:00:00 2001 From: DocsUpdateBot Date: Wed, 23 Oct 2024 08:11:53 +0000 Subject: [PATCH 2/6] [NugetPackagesListUpdate] Auto commited nugetPackages list --- starsky/nuget-packages-list.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/starsky/nuget-packages-list.json b/starsky/nuget-packages-list.json index 881d10e66..c339b4fc2 100644 --- a/starsky/nuget-packages-list.json +++ b/starsky/nuget-packages-list.json @@ -1,7 +1,7 @@ [ "Microsoft.AspNetCore.Mvc.NewtonsoftJson 8.0.10", "Microsoft.Extensions.Hosting.WindowsServices 8.0.1", - "Swashbuckle.AspNetCore 6.8.1", + "Swashbuckle.AspNetCore 6.9.0", "Microsoft.Extensions.Caching.Abstractions 8.0.0", "Microsoft.Extensions.Caching.Memory 8.0.1", "Microsoft.Extensions.Hosting.Abstractions 8.0.1", From cdac33a5e5bb890547115f23a26ae36d0f30c50a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Oct 2024 08:12:59 +0000 Subject: [PATCH 3/6] build(deps): bump http-proxy-middleware in /documentation Bumps [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware) from 2.0.6 to 2.0.7. - [Release notes](https://github.com/chimurai/http-proxy-middleware/releases) - [Changelog](https://github.com/chimurai/http-proxy-middleware/blob/v2.0.7/CHANGELOG.md) - [Commits](https://github.com/chimurai/http-proxy-middleware/compare/v2.0.6...v2.0.7) --- updated-dependencies: - dependency-name: http-proxy-middleware dependency-type: indirect ... Signed-off-by: dependabot[bot] --- documentation/package-lock.json | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/documentation/package-lock.json b/documentation/package-lock.json index 7fa63c995..0122d86f2 100644 --- a/documentation/package-lock.json +++ b/documentation/package-lock.json @@ -18,7 +18,7 @@ "react-dom": "^18.0.0" }, "devDependencies": { - "@docusaurus/module-type-aliases": "^3.5.2", + "@docusaurus/module-type-aliases": "3.5.2", "@docusaurus/tsconfig": "3.5.2", "@docusaurus/types": "3.0.0", "typescript": "~5.5.4" @@ -8237,10 +8237,9 @@ } }, "node_modules/http-proxy-middleware": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz", - "integrity": "sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==", - "license": "MIT", + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.7.tgz", + "integrity": "sha512-fgVY8AV7qU7z/MmXJ/rxwbrtQH4jBQ9m7kp3llF0liB7glmFeVZFBepQb32T3y8n8k2+AEYuMPCpinYW+/CuRA==", "dependencies": { "@types/http-proxy": "^1.17.8", "http-proxy": "^1.18.1", From b50076409f59493cdf4274a235d82cacf03ff9e8 Mon Sep 17 00:00:00 2001 From: Dion Date: Thu, 24 Oct 2024 16:19:41 +0200 Subject: [PATCH 4/6] add support for okAndSame status --- .../item-text-list-view.spec.tsx | 18 ++++++++++++++++++ .../item-text-list-view.tsx | 10 +++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/starsky/starsky/clientapp/src/components/molecules/item-text-list-view/item-text-list-view.spec.tsx b/starsky/starsky/clientapp/src/components/molecules/item-text-list-view/item-text-list-view.spec.tsx index ae7d00874..1febbb075 100644 --- a/starsky/starsky/clientapp/src/components/molecules/item-text-list-view/item-text-list-view.spec.tsx +++ b/starsky/starsky/clientapp/src/components/molecules/item-text-list-view/item-text-list-view.spec.tsx @@ -45,6 +45,24 @@ describe("ItemTextListView", () => { ); }); + it("list of no error item", () => { + const fileIndexItems = [ + { + filePath: "/test/image.jpg", + fileName: "image.jpg", + status: IExifStatus.ServerError, + isDirectory: false + } + ] as IFileIndexItem[]; + const list = render( {}} />); + + const item = screen.getByTestId("image.jpg-error-status"); + + expect(item).toBeFalsy(); + + list.unmount(); + }); + it("list of 1 directory item", () => { const fileIndexItems = [ { diff --git a/starsky/starsky/clientapp/src/components/molecules/item-text-list-view/item-text-list-view.tsx b/starsky/starsky/clientapp/src/components/molecules/item-text-list-view/item-text-list-view.tsx index 284244633..e0b688d72 100644 --- a/starsky/starsky/clientapp/src/components/molecules/item-text-list-view/item-text-list-view.tsx +++ b/starsky/starsky/clientapp/src/components/molecules/item-text-list-view/item-text-list-view.tsx @@ -1,9 +1,9 @@ +import { FunctionComponent } from "react"; import useGlobalSettings from "../../../hooks/use-global-settings"; import { IExifStatus } from "../../../interfaces/IExifStatus"; import { IFileIndexItem } from "../../../interfaces/IFileIndexItem"; import localization from "../../../localization/localization.json"; import { Language } from "../../../shared/language"; -import { FunctionComponent } from "react"; import { GetBoxClassName } from "./internal/get-box-class-name.ts"; interface ItemListProps { @@ -51,8 +51,12 @@ const ItemTextListView: FunctionComponent = (props) => { ) : null} {!item.isDirectory ? item.fileName : null} - {item.status !== IExifStatus.Ok && item.status !== IExifStatus.Default ? ( - {item.status} + {item.status !== IExifStatus.Ok && + item.status !== IExifStatus.Default && + item.status !== IExifStatus.OkAndSame ? ( + + {item.status} + ) : null} ))} From 66797364f1f7a856f966ee5ee93f3656232a48c7 Mon Sep 17 00:00:00 2001 From: Dion Date: Thu, 24 Oct 2024 16:24:02 +0200 Subject: [PATCH 5/6] add extra tests --- .../item-text-list-view.spec.tsx | 45 ++++++++++++------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/starsky/starsky/clientapp/src/components/molecules/item-text-list-view/item-text-list-view.spec.tsx b/starsky/starsky/clientapp/src/components/molecules/item-text-list-view/item-text-list-view.spec.tsx index 1febbb075..7bd31401f 100644 --- a/starsky/starsky/clientapp/src/components/molecules/item-text-list-view/item-text-list-view.spec.tsx +++ b/starsky/starsky/clientapp/src/components/molecules/item-text-list-view/item-text-list-view.spec.tsx @@ -45,23 +45,38 @@ describe("ItemTextListView", () => { ); }); - it("list of no error item", () => { - const fileIndexItems = [ - { - filePath: "/test/image.jpg", - fileName: "image.jpg", - status: IExifStatus.ServerError, - isDirectory: false + const statusCorrectlyTheoryData = [ + { status: IExifStatus.OkAndSame, shouldShowError: false }, + { status: IExifStatus.ServerError, shouldShowError: true }, + { status: IExifStatus.NotFoundSourceMissing, shouldShowError: true }, + { status: IExifStatus.Ok, shouldShowError: false }, + { status: IExifStatus.ReadOnly, shouldShowError: true } + ]; + + test.each(statusCorrectlyTheoryData)( + "error-status should render %s", + ({ status, shouldShowError }) => { + const fileIndexItems = [ + { + filePath: "/test/image.jpg", + fileName: "image.jpg", + status: status, + isDirectory: false + } + ] as IFileIndexItem[]; + const list = render( {}} />); + + const item = screen.queryByTestId("image.jpg-error-status"); + + if (shouldShowError) { + expect(item).toBeTruthy(); + } else { + expect(item).toBeFalsy(); } - ] as IFileIndexItem[]; - const list = render( {}} />); - - const item = screen.getByTestId("image.jpg-error-status"); - expect(item).toBeFalsy(); - - list.unmount(); - }); + list.unmount(); + } + ); it("list of 1 directory item", () => { const fileIndexItems = [ From 0e4da05fe378f47ddada7b568165cc5d20a88d42 Mon Sep 17 00:00:00 2001 From: Dion Date: Thu, 24 Oct 2024 16:26:48 +0200 Subject: [PATCH 6/6] keep a changelog --- history.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/history.md b/history.md index d1468b00a..874aec253 100644 --- a/history.md +++ b/history.md @@ -42,7 +42,8 @@ Semantic Versioning 2.0.0 is from version 0.1.6+ ## List of versions ## version 0.6.3 - _(Unreleased)_ - 2024-08-?? {#v0.6.3} -- nothing + +- [x] (Fixed) _Front-end_ OkAndSame status in Upload Modal gives the wrong status (PR #1783) ## version 0.6.2 - 2024-10-11 {#v0.6.2}