Skip to content

Commit 912d56b

Browse files
committed
Merge branch 'improvement/ARTESCA-16953-bump-core-ui' into tmp/octopus/w/133.0/improvement/ARTESCA-16953-bump-core-ui
2 parents b045793 + 62804ea commit 912d56b

15 files changed

+200
-183
lines changed

shell-ui/jest.config.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
module.exports = {
2-
transformIgnorePatterns: [
3-
'/node_modules/(?!vega-lite|@scality|pretty-bytes|uuid)',
4-
],
5-
setupFilesAfterEnv: ['./src/setupTests.ts'],
6-
clearMocks: true,
7-
moduleNameMapper: {
8-
'\\.(css|less)$': 'identity-obj-proxy',
9-
},
10-
testEnvironment: 'jsdom',
2+
transformIgnorePatterns: [
3+
"/node_modules/(?!vega-lite|@scality|pretty-bytes|uuid|@fortawesome)",
4+
],
5+
setupFilesAfterEnv: ["./src/setupTests.ts"],
6+
clearMocks: true,
7+
moduleNameMapper: {
8+
"\\.(css|less)$": "identity-obj-proxy",
9+
"^@fortawesome/free-solid-svg-icons/(.*)\\.js$": "@fortawesome/free-solid-svg-icons/$1",
10+
"^@fortawesome/free-regular-svg-icons/(.*)\\.js$": "@fortawesome/free-regular-svg-icons/$1",
11+
},
12+
testEnvironment: "jsdom",
1113
};

shell-ui/package-lock.json

Lines changed: 50 additions & 51 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

shell-ui/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"ts-node": "^10.9.2"
4747
},
4848
"dependencies": {
49-
"@scality/core-ui": "0.193.0",
49+
"@scality/core-ui": "0.197.0",
5050
"@scality/module-federation": "1.6.1",
5151
"downshift": "^8.0.0",
5252
"history": "^5.3.0",
@@ -58,8 +58,8 @@
5858
"react-error-boundary": "^4.0.2",
5959
"react-intl": "^5.15.3",
6060
"react-query": "^3.34.0",
61-
"react-router": "7.8.1",
62-
"react-router-dom": "7.8.1",
61+
"react-router": "7.13.0",
62+
"react-router-dom": "7.13.0",
6363
"styled-components": "^5.3.11",
6464
"typescript": "^5.6.3",
6565
"zod": "^4.0.17"

shell-ui/src/navbar/NotificationCenter.spec.tsx

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1-
import React, { PropsWithChildren } from 'react';
21
import { act, screen, waitFor, within } from '@testing-library/react';
3-
import NotificationCenterProvider, {
4-
InternalNotification,
5-
Notification,
6-
} from '../NotificationCenterProvider';
7-
import NotificationCenter from './NotificationCenter';
82
import userEvent from '@testing-library/user-event';
3+
import { PropsWithChildren } from 'react';
94
import { QueryClient } from 'react-query';
10-
import { prepareRenderMultipleHooks } from './__TESTS__/testMultipleHooks';
115
import { MemoryRouter, Route, Routes } from 'react-router-dom';
126
import { ShellHistoryProvider } from '../initFederation/ShellHistoryProvider';
13-
import { useNotificationCenter } from '../useNotificationCenter';
7+
import NotificationCenterProvider, {
8+
InternalNotification,
9+
Notification,
10+
} from '../NotificationCenterProvider';
1411
import { QueryClientProvider } from '../QueryClientProvider';
12+
import { useNotificationCenter } from '../useNotificationCenter';
13+
import { prepareRenderMultipleHooks } from './__TESTS__/testMultipleHooks';
14+
import NotificationCenter from './NotificationCenter';
15+
import {debug} from "jest-preview";
1516

16-
export const notificationCenterSelectors = {
17+
const notificationCenterSelectors = {
1718
notificationCenterButton: () =>
1819
screen.getByRole('button', { name: /notification center/i }),
1920
emptyNotificationCenterIcon: () =>
@@ -175,21 +176,23 @@ describe('NotificationCenter', () => {
175176
//E open again the notification center
176177
userEvent.click(notificationCenterSelectors.notificationCenterButton());
177178
//V the notification are marked as read
179+
debug();
180+
178181
expect(
179182
within(screen.getAllByRole('option')[0]).queryByRole('img', {
180-
name: /unread notification mark/i,
181-
}),
182-
).toBeNull();
183+
name: /unread notification mark/i,
184+
}),
185+
).not.toBeVisible();
183186
expect(
184187
within(screen.getAllByRole('option')[1]).queryByRole('img', {
185188
name: /unread notification mark/i,
186189
}),
187-
).toBeNull();
190+
).not.toBeVisible();
188191
expect(
189192
within(screen.getAllByRole('option')[2]).queryByRole('img', {
190193
name: /unread notification mark/i,
191194
}),
192-
).toBeNull();
195+
).not.toBeVisible();
193196
});
194197

195198
it('can be navigated with the keyboard', async () => {
@@ -241,7 +244,7 @@ describe('NotificationCenter', () => {
241244
within(lastNotification).queryByRole('img', {
242245
name: /unread notification mark/i,
243246
}),
244-
).toBeNull();
247+
).not.toBeVisible();
245248
});
246249

247250
it('should not display notifications with the same ID', async () => {
@@ -267,17 +270,17 @@ describe('NotificationCenter', () => {
267270
within(screen.getAllByRole('option')[0]).queryByRole('img', {
268271
name: /unread notification mark/i,
269272
}),
270-
).toBeNull();
273+
).not.toBeVisible();
271274
expect(
272275
within(screen.getAllByRole('option')[1]).queryByRole('img', {
273276
name: /unread notification mark/i,
274277
}),
275-
).toBeNull();
278+
).not.toBeVisible();
276279
expect(
277280
within(screen.getAllByRole('option')[2]).queryByRole('img', {
278281
name: /unread notification mark/i,
279282
}),
280-
).toBeNull();
283+
).not.toBeVisible();
281284
//E
282285
userEvent.click(notificationCenterSelectors.notificationCenterButton());
283286
//V

0 commit comments

Comments
 (0)