@equinor/fusion-framework-dev-portal 11.0.0-next.2 → 11.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -70
- package/dist/main.js +12730 -12818
- package/package.json +43 -45
- package/src/PersonSideSheet/sheets/roles/ClaimableRole.test.tsx +12 -10
- package/src/PersonSideSheet/sheets/roles/RolesSheetContent.test.tsx +15 -13
- package/src/version.ts +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/vitest.config.ts +3 -21
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/fusion-framework-dev-portal",
|
|
3
|
-
"version": "11.0.0
|
|
3
|
+
"version": "11.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./dist/main.js",
|
|
@@ -20,71 +20,69 @@
|
|
|
20
20
|
"@equinor/eds-core-react": "^2.3.7",
|
|
21
21
|
"@equinor/eds-icons": "^1.3.0",
|
|
22
22
|
"@equinor/eds-tokens": "^2.2.0",
|
|
23
|
-
"@equinor/eds-utils": "^2.2.1",
|
|
24
23
|
"@equinor/fusion-react-context-selector": "^2.0.1",
|
|
25
24
|
"@equinor/fusion-react-progress-indicator": "^0.3.0",
|
|
26
25
|
"@equinor/fusion-react-side-sheet": "^2.0.0",
|
|
27
26
|
"@equinor/fusion-react-styles": "^2.1.0",
|
|
28
27
|
"@equinor/fusion-wc-chip": "^1.2.2",
|
|
29
28
|
"@equinor/fusion-wc-person": "^3.5.5",
|
|
29
|
+
"@testing-library/react": "^16.0.0",
|
|
30
30
|
"@types/react": "^19.2.7",
|
|
31
31
|
"@types/react-dom": "^19.2.3",
|
|
32
32
|
"@types/semver": "^7.7.1",
|
|
33
33
|
"@vitejs/plugin-react": "^6.0.1",
|
|
34
|
-
"@vitest/browser-playwright": "^4.1.0",
|
|
35
34
|
"dotenv": "^17.3.1",
|
|
36
|
-
"
|
|
35
|
+
"happy-dom": "^20.8.4",
|
|
37
36
|
"react": "^19.2.1",
|
|
38
37
|
"react-dom": "^19.2.1",
|
|
39
38
|
"rxjs": "^7.8.1",
|
|
40
|
-
"semver": "^7.7.2",
|
|
41
39
|
"styled-components": "^6.3.11",
|
|
40
|
+
"semver": "^7.7.2",
|
|
42
41
|
"tsx": "^4.19.3",
|
|
43
42
|
"typescript": "^7.0.2",
|
|
44
43
|
"vite": "^8.0.0",
|
|
45
44
|
"vitest": "^4.1.0",
|
|
46
|
-
"
|
|
47
|
-
"@equinor/fusion-framework-app": "
|
|
48
|
-
"@equinor/fusion-framework-dev-server": "2.0.
|
|
49
|
-
"@equinor/fusion-framework-module-ag-grid": "37.
|
|
50
|
-
"@equinor/fusion-framework-module-analytics": "3.
|
|
51
|
-
"@equinor/fusion-framework-module-
|
|
52
|
-
"@equinor/fusion-framework-module-
|
|
53
|
-
"@equinor/fusion-framework-module-
|
|
54
|
-
"@equinor/fusion-framework-
|
|
55
|
-
"@equinor/fusion-framework-module-
|
|
56
|
-
"@equinor/fusion-framework": "
|
|
57
|
-
"@equinor/fusion-framework-module-services": "8.1.
|
|
58
|
-
"@equinor/fusion-framework-
|
|
59
|
-
"@equinor/fusion-framework-react": "
|
|
60
|
-
"@equinor/fusion-framework-
|
|
61
|
-
"@equinor/fusion-framework-react-
|
|
62
|
-
"@equinor/fusion-
|
|
63
|
-
"@equinor/fusion-framework-react
|
|
64
|
-
"@equinor/fusion-framework-react-
|
|
65
|
-
"@equinor/fusion-query": "7.0.
|
|
66
|
-
"@equinor/fusion-observable": "9.1.2-next.1"
|
|
45
|
+
"@equinor/fusion-framework": "8.0.15",
|
|
46
|
+
"@equinor/fusion-framework-app": "13.0.1",
|
|
47
|
+
"@equinor/fusion-framework-dev-server": "2.0.18",
|
|
48
|
+
"@equinor/fusion-framework-module-ag-grid": "37.0.1",
|
|
49
|
+
"@equinor/fusion-framework-module-analytics": "3.0.6",
|
|
50
|
+
"@equinor/fusion-framework-module-app": "8.0.4",
|
|
51
|
+
"@equinor/fusion-framework-module-context": "8.0.3",
|
|
52
|
+
"@equinor/fusion-framework-module-bookmark": "4.0.4",
|
|
53
|
+
"@equinor/fusion-framework-plugin-context-navigation": "1.0.0",
|
|
54
|
+
"@equinor/fusion-framework-module-feature-flag": "2.0.3",
|
|
55
|
+
"@equinor/fusion-framework-module-navigation": "7.0.7",
|
|
56
|
+
"@equinor/fusion-framework-module-services": "8.1.0",
|
|
57
|
+
"@equinor/fusion-framework-module-telemetry": "7.0.2",
|
|
58
|
+
"@equinor/fusion-framework-react-components-people-provider": "2.0.4",
|
|
59
|
+
"@equinor/fusion-framework-react-router": "2.4.0",
|
|
60
|
+
"@equinor/fusion-framework-react-module-bookmark": "6.0.1",
|
|
61
|
+
"@equinor/fusion-observable": "9.1.1",
|
|
62
|
+
"@equinor/fusion-framework-react": "8.0.1",
|
|
63
|
+
"@equinor/fusion-framework-react-components-bookmark": "2.0.3",
|
|
64
|
+
"@equinor/fusion-query": "7.0.3"
|
|
67
65
|
},
|
|
68
66
|
"peerDependencies": {
|
|
69
|
-
"@equinor/fusion-framework": "8.
|
|
70
|
-
"@equinor/fusion-framework-
|
|
71
|
-
"@equinor/fusion-framework-
|
|
72
|
-
"@equinor/fusion-framework-module-ag-grid": "37.
|
|
73
|
-
"@equinor/fusion-framework-module-analytics": "3.
|
|
74
|
-
"@equinor/fusion-framework-module-
|
|
75
|
-
"@equinor/fusion-framework-module-
|
|
76
|
-
"@equinor/fusion-framework-module-
|
|
77
|
-
"@equinor/fusion-framework-
|
|
78
|
-
"@equinor/fusion-framework-module-
|
|
79
|
-
"@equinor/fusion-framework-module-services": "8.1.
|
|
80
|
-
"@equinor/fusion-framework-
|
|
81
|
-
"@equinor/fusion-framework-
|
|
82
|
-
"@equinor/fusion-framework-
|
|
83
|
-
"@equinor/fusion-framework-react-components-
|
|
84
|
-
"@equinor/fusion-
|
|
85
|
-
"@equinor/fusion-framework-react-module-bookmark": "
|
|
86
|
-
"@equinor/fusion-
|
|
87
|
-
"@equinor/fusion-query": "7.0.
|
|
67
|
+
"@equinor/fusion-framework": "8.0.15",
|
|
68
|
+
"@equinor/fusion-framework-app": "13.0.1",
|
|
69
|
+
"@equinor/fusion-framework-dev-server": "2.0.18",
|
|
70
|
+
"@equinor/fusion-framework-module-ag-grid": "37.0.1",
|
|
71
|
+
"@equinor/fusion-framework-module-analytics": "3.0.6",
|
|
72
|
+
"@equinor/fusion-framework-module-app": "8.0.4",
|
|
73
|
+
"@equinor/fusion-framework-module-bookmark": "4.0.4",
|
|
74
|
+
"@equinor/fusion-framework-module-context": "8.0.3",
|
|
75
|
+
"@equinor/fusion-framework-plugin-context-navigation": "1.0.0",
|
|
76
|
+
"@equinor/fusion-framework-module-feature-flag": "2.0.3",
|
|
77
|
+
"@equinor/fusion-framework-module-services": "8.1.0",
|
|
78
|
+
"@equinor/fusion-framework-module-navigation": "7.0.7",
|
|
79
|
+
"@equinor/fusion-framework-module-telemetry": "7.0.2",
|
|
80
|
+
"@equinor/fusion-framework-react-components-bookmark": "2.0.3",
|
|
81
|
+
"@equinor/fusion-framework-react-components-people-provider": "2.0.4",
|
|
82
|
+
"@equinor/fusion-observable": "9.1.1",
|
|
83
|
+
"@equinor/fusion-framework-react-module-bookmark": "6.0.1",
|
|
84
|
+
"@equinor/fusion-framework-react": "8.0.1",
|
|
85
|
+
"@equinor/fusion-query": "7.0.3"
|
|
88
86
|
},
|
|
89
87
|
"peerDependenciesMeta": {
|
|
90
88
|
"@equinor/fusion-framework": {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cleanup, render } from '
|
|
1
|
+
import { cleanup, fireEvent, render, screen, waitFor } from '@testing-library/react';
|
|
2
2
|
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
|
3
3
|
|
|
4
4
|
import { ClaimableRole } from './ClaimableRole';
|
|
@@ -43,12 +43,12 @@ describe('ClaimableRole', () => {
|
|
|
43
43
|
const json = vi.fn();
|
|
44
44
|
mocks.createClient.mockResolvedValue({ json });
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
render(<ClaimableRole assignment={assignment} onChange={vi.fn()} />);
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
fireEvent.click(screen.getByLabelText('Activate Developer role'));
|
|
49
|
+
fireEvent.click(screen.getByRole('button', { name: 'Activate' }));
|
|
50
50
|
|
|
51
|
-
await
|
|
51
|
+
expect(await screen.findByText('Reason is required.')).toBeTruthy();
|
|
52
52
|
expect(json).not.toHaveBeenCalled();
|
|
53
53
|
});
|
|
54
54
|
|
|
@@ -57,13 +57,15 @@ describe('ClaimableRole', () => {
|
|
|
57
57
|
const onChange = vi.fn();
|
|
58
58
|
mocks.createClient.mockResolvedValue({ json });
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
render(<ClaimableRole assignment={assignment} onChange={onChange} />);
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
fireEvent.click(screen.getByLabelText('Activate Developer role'));
|
|
63
|
+
fireEvent.change(screen.getByLabelText('Reason for activation'), {
|
|
64
|
+
target: { value: 'Testing role-dependent behavior' },
|
|
65
|
+
});
|
|
66
|
+
fireEvent.click(screen.getByRole('button', { name: 'Activate' }));
|
|
65
67
|
|
|
66
|
-
await
|
|
68
|
+
await waitFor(() =>
|
|
67
69
|
expect(onChange).toHaveBeenCalledWith({
|
|
68
70
|
...assignment,
|
|
69
71
|
isActive: true,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cleanup, render } from '
|
|
1
|
+
import { cleanup, fireEvent, render, screen, waitFor } from '@testing-library/react';
|
|
2
2
|
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
|
3
3
|
|
|
4
4
|
import { RolesSheetContent } from './RolesSheetContent';
|
|
@@ -39,9 +39,10 @@ describe('RolesSheetContent', () => {
|
|
|
39
39
|
const json = vi.fn().mockResolvedValue([]);
|
|
40
40
|
mocks.createClient.mockResolvedValue({ json });
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
render(<RolesSheetContent navigate={vi.fn()} />);
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
expect(screen.getByLabelText('Loading roles')).toBeTruthy();
|
|
45
|
+
expect(await screen.findByText('You have no available roles')).toBeTruthy();
|
|
45
46
|
expect(json).toHaveBeenCalledTimes(2);
|
|
46
47
|
});
|
|
47
48
|
|
|
@@ -52,13 +53,14 @@ describe('RolesSheetContent', () => {
|
|
|
52
53
|
.mockResolvedValue([]);
|
|
53
54
|
mocks.createClient.mockResolvedValue({ json });
|
|
54
55
|
|
|
55
|
-
|
|
56
|
+
render(<RolesSheetContent navigate={vi.fn()} />);
|
|
56
57
|
|
|
57
|
-
await
|
|
58
|
-
|
|
58
|
+
expect(await screen.findByText('Roles service unavailable')).toBeTruthy();
|
|
59
|
+
fireEvent.click(screen.getByRole('button', { name: 'Retry' }));
|
|
59
60
|
|
|
60
|
-
|
|
61
|
-
await
|
|
61
|
+
expect(screen.getByLabelText('Loading roles')).toBeTruthy();
|
|
62
|
+
await waitFor(() => expect(mocks.createClient).toHaveBeenCalledTimes(2));
|
|
63
|
+
expect(await screen.findByText('You have no available roles')).toBeTruthy();
|
|
62
64
|
});
|
|
63
65
|
|
|
64
66
|
it('hides stale assignments while loading roles for a changed account', async () => {
|
|
@@ -71,14 +73,14 @@ describe('RolesSheetContent', () => {
|
|
|
71
73
|
.mockResolvedValueOnce({ json: initialJson })
|
|
72
74
|
.mockResolvedValueOnce({ json: pendingJson });
|
|
73
75
|
|
|
74
|
-
const
|
|
76
|
+
const { rerender } = render(<RolesSheetContent navigate={vi.fn()} />);
|
|
75
77
|
|
|
76
|
-
await
|
|
78
|
+
expect(await screen.findByText('Claimable role')).toBeTruthy();
|
|
77
79
|
|
|
78
80
|
mocks.currentUser.localAccountId = 'next-account-id';
|
|
79
|
-
|
|
81
|
+
rerender(<RolesSheetContent navigate={vi.fn()} />);
|
|
80
82
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
+
expect(screen.getByLabelText('Loading roles')).toBeTruthy();
|
|
84
|
+
expect(screen.queryByText('Claimable role')).toBeNull();
|
|
83
85
|
});
|
|
84
86
|
});
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by genversion.
|
|
2
|
-
export const version = '11.0.0
|
|
2
|
+
export const version = '11.0.0';
|