Skip to content

Commit

Permalink
1.13.13 release
Browse files Browse the repository at this point in the history
  • Loading branch information
karamem0 committed Nov 15, 2024
1 parent d862711 commit 7136e45
Show file tree
Hide file tree
Showing 76 changed files with 2,692 additions and 1,331 deletions.
2 changes: 1 addition & 1 deletion README.ja-jp.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Hitofude

[![.github/workflows/workflow.yml](https://github.com/karamem0/hitofude/actions/workflows/workflow.yml/badge.svg)](https://github.com/karamem0/hitofude/actions/workflows/workflow.yml)
[![.github/workflows/develop.yml](https://github.com/karamem0/hitofude/actions/workflows/develop.yml/badge.svg)](https://github.com/karamem0/hitofude/actions/workflows/develop.yml)
[![codecov](https://codecov.io/gh/karamem0/hitofude/graph/badge.svg?token=T44FVSHRYS)](https://codecov.io/gh/karamem0/hitofude)
[![License](https://img.shields.io/github/license/karamem0/hitofude.svg)](https://github.com/karamem0/hitofude/blob/main/LICENSE)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Hitofude

[![.github/workflows/trigger.yml](https://github.com/karamem0/hitofude/actions/workflows/trigger.yml/badge.svg)](https://github.com/karamem0/hitofude/actions/workflows/trigger.yml)
[![.github/workflows/develop.yml](https://github.com/karamem0/hitofude/actions/workflows/develop.yml/badge.svg)](https://github.com/karamem0/hitofude/actions/workflows/develop.yml)
[![codecov](https://codecov.io/gh/karamem0/hitofude/graph/badge.svg?token=T44FVSHRYS)](https://codecov.io/gh/karamem0/hitofude)
[![License](https://img.shields.io/github/license/karamem0/hitofude.svg)](https://github.com/karamem0/hitofude/blob/main/LICENSE)

Expand Down
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export default [
],
'@stylistic/indent-binary-ops': [
'error',
4
2
],
'@stylistic/jsx-closing-bracket-location': [
'error',
Expand Down
1,881 changes: 954 additions & 927 deletions package-lock.json

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
"dependencies": {
"@automapper/core": "^8.8.1",
"@automapper/pojos": "^8.8.1",
"@azure/msal-browser": "^3.26.1",
"@azure/msal-react": "^2.1.1",
"@fluentui/react-components": "^9.55.1",
"@azure/msal-browser": "^3.27.0",
"@azure/msal-react": "^2.2.0",
"@fluentui/react-components": "^9.56.0",
"@fluentui/react-icons-mdl2": "^1.3.80",
"@fluentui/react-icons-mdl2-branded": "^1.2.82",
"@microsoft/applicationinsights-react-js": "^17.3.4",
Expand All @@ -34,12 +34,12 @@
"monaco-editor": "^0.52.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-dropzone": "^14.3.1",
"react-dropzone": "^14.3.5",
"react-error-boundary": "^4.1.2",
"react-hook-form": "^7.53.1",
"react-intl": "^6.8.4",
"react-hook-form": "^7.53.2",
"react-intl": "^6.8.7",
"react-markdown": "^9.0.1",
"react-router-dom": "^6.27.0",
"react-router-dom": "^6.28.0",
"react-syntax-highlighter": "^15.6.1",
"react-use": "^17.5.1",
"rehype-raw": "^7.0.0",
Expand All @@ -58,7 +58,7 @@
"@eslint/compat": "1.1.1",
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.14.0",
"@formatjs/cli": "^6.3.5",
"@formatjs/cli": "^6.3.8",
"@microsoft/microsoft-graph-types": "^2.40.0",
"@stylistic/eslint-plugin": "^2.10.1",
"@testing-library/jest-dom": "^6.6.3",
Expand All @@ -70,30 +70,30 @@
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/react-syntax-highlighter": "^15.5.13",
"@typescript-eslint/eslint-plugin": "^8.12.2",
"@typescript-eslint/parser": "^8.12.2",
"@typescript-eslint/eslint-plugin": "^8.13.0",
"@typescript-eslint/parser": "^8.13.0",
"@vitejs/plugin-react": "^4.3.3",
"babel-jest": "^29.7.0",
"babel-plugin-formatjs": "^10.5.22",
"babel-plugin-formatjs": "^10.5.24",
"eslint": "^8.57.1",
"eslint-plugin-hooks": "^0.4.3",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-sonarjs": "^2.0.4",
"eslint-plugin-testing-library": "^6.4.0",
"globals": "^15.11.0",
"globals": "^15.12.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jest-junit": "^16.0.0",
"postcss": "^8.4.47",
"postcss-styled-syntax": "^0.6.4",
"postcss": "^8.4.48",
"postcss-styled-syntax": "^0.7.0",
"sass": "^1.80.6",
"stylelint": "^16.10.0",
"stylelint-config-recess-order": "^5.1.1",
"stylelint-config-standard-scss": "^13.1.0",
"typescript": "^5.6.3",
"vite": "^5.4.10"
"vite": "^5.4.11"
},
"volta": {
"node": "20.18.0"
Expand Down
2 changes: 1 addition & 1 deletion src/common/components/Communication.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import Presenter from './Communication.presenter';
import ThemeProvider from '../../providers/ThemeProvider';
import { render } from '@testing-library/react';

it('should create shapshot', async () => {
it('should create a shapshot', () => {
const params = {
description: 'Something went wrong',
image: 'https://example.com/image.png',
Expand Down
19 changes: 18 additions & 1 deletion src/common/components/ErrorNotification.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,24 @@ import Presenter from './ErrorNotification.presenter';
import ThemeProvider from '../../providers/ThemeProvider';
import { render } from '@testing-library/react';

it('should create shapshot', async () => {
it('should create a shapshot when the message parameter is not undedined', () => {
const params = {
message: {
id: 'ErrorMessage',
defaultMessage: 'Something went wrong'
}
};
const { asFragment } = render(
<IntlProvider>
<ThemeProvider>
<Presenter {...params} />
</ThemeProvider>
</IntlProvider>
);
expect(asFragment()).toMatchSnapshot();
});

it('should create a shapshot when the message parameter is undedined', () => {
const params = {
message: {
id: 'ErrorMessage',
Expand Down
6 changes: 3 additions & 3 deletions src/common/components/ImageViewer.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@

import React from 'react';

import ImageViewer from './ImageViewer.presenter';
import IntlProvider from '../../providers/IntlProvider';
import Presenter from './ImageViewer.presenter';
import ThemeProvider from '../../providers/ThemeProvider';
import { render } from '@testing-library/react';

it('should create shapshot', async () => {
it('should create a shapshot', () => {
const params = {
alt: 'image',
className: 'image',
Expand All @@ -22,7 +22,7 @@ it('should create shapshot', async () => {
const { asFragment } = render(
<IntlProvider>
<ThemeProvider>
<ImageViewer {...params} />
<Presenter {...params} />
</ThemeProvider>
</IntlProvider>
);
Expand Down
13 changes: 8 additions & 5 deletions src/common/components/Loader.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@

import React from 'react';

import '@testing-library/jest-dom';
import { render, screen } from '@testing-library/react';
import IntlProvider from '../../providers/IntlProvider';
import Presenter from './Loader.presenter';
import ThemeProvider from '../../providers/ThemeProvider';
import { render } from '@testing-library/react';

it('should create shapshot if loading is "true"', async () => {
it('should create a shapshot when the loading parameter is true', () => {
const params = {
children: (
<div data-testid="children" />
<div data-testid="test-Children" />
),
loading: true
};
Expand All @@ -28,12 +29,13 @@ it('should create shapshot if loading is "true"', async () => {
</IntlProvider>
);
expect(asFragment()).toMatchSnapshot();
expect(screen.queryByTestId('test-Children')).not.toBeInTheDocument();
});

it('should create shapshot if loading is "false"', async () => {
it('should create a shapshot when the loading parameter is false', () => {
const params = {
children: (
<div data-testid="children" />
<div data-testid="test-Children" />
),
loading: false
};
Expand All @@ -45,4 +47,5 @@ it('should create shapshot if loading is "false"', async () => {
</IntlProvider>
);
expect(asFragment()).toMatchSnapshot();
expect(screen.getByTestId('test-Children')).toBeInTheDocument();
});
4 changes: 2 additions & 2 deletions src/common/components/Mermaid.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import Presenter from './Mermaid.presenter';
import ThemeProvider from '../../providers/ThemeProvider';
import { render } from '@testing-library/react';

it('should create shapshot', async () => {
it('should create a shapshot', () => {
const params = {
children: (
<div data-testid="children" />
<div data-testid="test-Children" />
)
};
const { asFragment } = render(
Expand Down
51 changes: 51 additions & 0 deletions src/common/components/ModalDialog.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
//
// Copyright (c) 2023-2024 karamem0
//
// This software is released under the MIT License.
//
// https://github.com/karamem0/hitofude/blob/main/LICENSE
//

import React from 'react';

import '@testing-library/jest-dom';
import { render, screen } from '@testing-library/react';
import IntlProvider from '../../providers/IntlProvider';
import Presenter from './ModalDialog.presenter';
import ThemeProvider from '../../providers/ThemeProvider';

it('should create a shapshot when the open parameter is true', () => {
const params = {
children: (
<div data-testid="test-Children" />
),
open: true
};
const { asFragment } = render(
<IntlProvider>
<ThemeProvider>
<Presenter {...params} />
</ThemeProvider>
</IntlProvider>
);
expect(asFragment()).toMatchSnapshot();
expect(screen.getByTestId('test-Children')).toBeInTheDocument();
});

it('should create a shapshot when the open parameter is false', () => {
const params = {
children: (
<div data-testid="test-Children" />
),
open: false
};
const { asFragment } = render(
<IntlProvider>
<ThemeProvider>
<Presenter {...params} />
</ThemeProvider>
</IntlProvider>
);
expect(asFragment()).toMatchSnapshot();
expect(screen.queryByTestId('test-Children')).not.toBeInTheDocument();
});
51 changes: 51 additions & 0 deletions src/common/components/MsalAdapter.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
//
// Copyright (c) 2023-2024 karamem0
//
// This software is released under the MIT License.
//
// https://github.com/karamem0/hitofude/blob/main/LICENSE
//

import React from 'react';

import '@testing-library/jest-dom';
import { render, screen } from '@testing-library/react';
import IntlProvider from '../../providers/IntlProvider';
import Presenter from './MsalAdapter.presenter';
import ThemeProvider from '../../providers/ThemeProvider';

it('should create a shapshot when the loading parameter is true', () => {
const params = {
children: (
<div data-testid="test-Children" />
),
loading: true
};
const { asFragment } = render(
<IntlProvider>
<ThemeProvider>
<Presenter {...params} />
</ThemeProvider>
</IntlProvider>
);
expect(asFragment()).toMatchSnapshot();
expect(screen.queryByTestId('test-Children')).not.toBeInTheDocument();
});

it('should create a shapshot when the loading parameter is false', () => {
const params = {
children: (
<div data-testid="test-Children" />
),
loading: false
};
const { asFragment } = render(
<IntlProvider>
<ThemeProvider>
<Presenter {...params} />
</ThemeProvider>
</IntlProvider>
);
expect(asFragment()).toMatchSnapshot();
expect(screen.getByTestId('test-Children')).toBeInTheDocument();
});
18 changes: 10 additions & 8 deletions src/common/components/ProgressDialog.presenter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ import { useIntl } from 'react-intl';
import { useTheme } from '../../providers/ThemeProvider';

interface ProgressDialogProps {
value?: ProgressType
mountNode?: HTMLElement,
type?: ProgressType
}

function ProgressDialog(props: Readonly<ProgressDialogProps>) {

const {
value
mountNode,
type
} = props;

const intl = useIntl();
Expand All @@ -41,9 +43,9 @@ function ProgressDialog(props: Readonly<ProgressDialogProps>) {

return (
<Dialog
modalType="alert"
open={!!value}>
<DialogSurface>
modalType="modal"
open={type != null}>
<DialogSurface mountNode={mountNode}>
<DialogBody>
<DialogContent
css={css`
Expand All @@ -62,10 +64,10 @@ function ProgressDialog(props: Readonly<ProgressDialogProps>) {
`}>
{
(() => {
switch (value) {
case ProgressType.save:
switch (type) {
case 'save':
return intl.formatMessage(messages.Saving);
case ProgressType.upload:
case 'upload':
return intl.formatMessage(messages.Uploading);
default:
return null;
Expand Down
Loading

0 comments on commit 7136e45

Please sign in to comment.