@equinor/fusion-framework-dev-portal 11.0.3 → 11.0.4
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 +47 -0
- package/dist/main.js +14779 -14675
- package/package.json +45 -43
- package/src/PersonSideSheet/sheets/roles/ClaimableRole.test.tsx +10 -12
- package/src/PersonSideSheet/sheets/roles/RolesSheetContent.test.tsx +13 -15
- package/src/version.ts +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/vitest.config.ts +21 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/fusion-framework-dev-portal",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./dist/main.js",
|
|
@@ -20,69 +20,71 @@
|
|
|
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",
|
|
23
24
|
"@equinor/fusion-react-context-selector": "^2.0.1",
|
|
24
25
|
"@equinor/fusion-react-progress-indicator": "^0.3.0",
|
|
25
26
|
"@equinor/fusion-react-side-sheet": "^2.0.0",
|
|
26
27
|
"@equinor/fusion-react-styles": "^2.1.0",
|
|
27
28
|
"@equinor/fusion-wc-chip": "^1.2.2",
|
|
28
29
|
"@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",
|
|
34
35
|
"dotenv": "^17.3.1",
|
|
35
|
-
"
|
|
36
|
+
"playwright": "^1.62.1",
|
|
36
37
|
"react": "^19.2.1",
|
|
37
38
|
"react-dom": "^19.2.1",
|
|
38
39
|
"rxjs": "^7.8.1",
|
|
39
|
-
"styled-components": "^6.3.11",
|
|
40
40
|
"semver": "^7.7.2",
|
|
41
|
+
"styled-components": "^6.3.11",
|
|
41
42
|
"tsx": "^4.19.3",
|
|
42
43
|
"typescript": "^7.0.2",
|
|
43
44
|
"vite": "^8.0.0",
|
|
44
45
|
"vitest": "^4.1.0",
|
|
45
|
-
"
|
|
46
|
-
"@equinor/fusion-framework-
|
|
47
|
-
"@equinor/fusion-framework
|
|
48
|
-
"@equinor/fusion-framework-
|
|
49
|
-
"@equinor/fusion-framework-module-
|
|
50
|
-
"@equinor/fusion-framework-module-
|
|
51
|
-
"@equinor/fusion-framework-module-
|
|
52
|
-
"@equinor/fusion-framework-
|
|
53
|
-
"@equinor/fusion-framework-module-
|
|
54
|
-
"@equinor/fusion-framework-module-
|
|
55
|
-
"@equinor/fusion-framework-module-
|
|
56
|
-
"@equinor/fusion-framework-module-
|
|
57
|
-
"@equinor/fusion-framework-module-
|
|
58
|
-
"@equinor/fusion-framework-
|
|
59
|
-
"@equinor/fusion-framework-react
|
|
60
|
-
"@equinor/fusion-framework-react-components-
|
|
61
|
-
"@equinor/fusion-framework-react-module-bookmark": "
|
|
62
|
-
"@equinor/fusion-framework-react-
|
|
63
|
-
"@equinor/fusion-
|
|
64
|
-
"@equinor/fusion-query": "7.0.
|
|
46
|
+
"vitest-browser-react": "^2.2.0",
|
|
47
|
+
"@equinor/fusion-framework-app": "13.1.0",
|
|
48
|
+
"@equinor/fusion-framework": "8.1.0",
|
|
49
|
+
"@equinor/fusion-framework-dev-server": "2.1.0",
|
|
50
|
+
"@equinor/fusion-framework-module-ag-grid": "37.1.0",
|
|
51
|
+
"@equinor/fusion-framework-module-analytics": "3.1.0",
|
|
52
|
+
"@equinor/fusion-framework-module-app": "8.1.0",
|
|
53
|
+
"@equinor/fusion-framework-module-feature-flag": "2.1.0",
|
|
54
|
+
"@equinor/fusion-framework-module-navigation": "7.0.9",
|
|
55
|
+
"@equinor/fusion-framework-module-services": "8.1.1",
|
|
56
|
+
"@equinor/fusion-framework-module-telemetry": "7.1.0",
|
|
57
|
+
"@equinor/fusion-framework-module-bookmark": "4.1.0",
|
|
58
|
+
"@equinor/fusion-framework-module-context": "9.0.0",
|
|
59
|
+
"@equinor/fusion-framework-plugin-context-navigation": "1.0.2",
|
|
60
|
+
"@equinor/fusion-framework-react": "9.0.0",
|
|
61
|
+
"@equinor/fusion-framework-react-components-bookmark": "2.0.4",
|
|
62
|
+
"@equinor/fusion-framework-react-module-bookmark": "7.0.0",
|
|
63
|
+
"@equinor/fusion-framework-react-components-people-provider": "2.0.5",
|
|
64
|
+
"@equinor/fusion-framework-react-router": "2.4.1",
|
|
65
|
+
"@equinor/fusion-query": "7.0.4",
|
|
66
|
+
"@equinor/fusion-observable": "9.2.1"
|
|
65
67
|
},
|
|
66
68
|
"peerDependencies": {
|
|
67
|
-
"@equinor/fusion-framework": "8.0
|
|
68
|
-
"@equinor/fusion-framework-app": "13.0
|
|
69
|
-
"@equinor/fusion-framework-
|
|
70
|
-
"@equinor/fusion-framework-module-
|
|
71
|
-
"@equinor/fusion-framework-module-
|
|
72
|
-
"@equinor/fusion-framework-module-
|
|
73
|
-
"@equinor/fusion-framework-
|
|
74
|
-
"@equinor/fusion-framework-module-context": "
|
|
75
|
-
"@equinor/fusion-framework-module-feature-flag": "2.0
|
|
76
|
-
"@equinor/fusion-framework-
|
|
77
|
-
"@equinor/fusion-framework-module-
|
|
78
|
-
"@equinor/fusion-framework-module-
|
|
79
|
-
"@equinor/fusion-framework-
|
|
80
|
-
"@equinor/fusion-framework-react
|
|
81
|
-
"@equinor/fusion-framework-react-components-people-provider": "2.0.
|
|
82
|
-
"@equinor/fusion-framework-react-
|
|
83
|
-
"@equinor/fusion-
|
|
84
|
-
"@equinor/fusion-
|
|
85
|
-
"@equinor/fusion-query": "7.0.
|
|
69
|
+
"@equinor/fusion-framework": "8.1.0",
|
|
70
|
+
"@equinor/fusion-framework-app": "13.1.0",
|
|
71
|
+
"@equinor/fusion-framework-dev-server": "2.1.0",
|
|
72
|
+
"@equinor/fusion-framework-module-analytics": "3.1.0",
|
|
73
|
+
"@equinor/fusion-framework-module-app": "8.1.0",
|
|
74
|
+
"@equinor/fusion-framework-module-ag-grid": "37.1.0",
|
|
75
|
+
"@equinor/fusion-framework-module-bookmark": "4.1.0",
|
|
76
|
+
"@equinor/fusion-framework-module-context": "9.0.0",
|
|
77
|
+
"@equinor/fusion-framework-module-feature-flag": "2.1.0",
|
|
78
|
+
"@equinor/fusion-framework-module-services": "8.1.1",
|
|
79
|
+
"@equinor/fusion-framework-module-telemetry": "7.1.0",
|
|
80
|
+
"@equinor/fusion-framework-module-navigation": "7.0.9",
|
|
81
|
+
"@equinor/fusion-framework-plugin-context-navigation": "1.0.2",
|
|
82
|
+
"@equinor/fusion-framework-react": "9.0.0",
|
|
83
|
+
"@equinor/fusion-framework-react-components-people-provider": "2.0.5",
|
|
84
|
+
"@equinor/fusion-framework-react-components-bookmark": "2.0.4",
|
|
85
|
+
"@equinor/fusion-framework-react-module-bookmark": "7.0.0",
|
|
86
|
+
"@equinor/fusion-observable": "9.2.1",
|
|
87
|
+
"@equinor/fusion-query": "7.0.4"
|
|
86
88
|
},
|
|
87
89
|
"peerDependenciesMeta": {
|
|
88
90
|
"@equinor/fusion-framework": {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cleanup,
|
|
1
|
+
import { cleanup, render } from 'vitest-browser-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
|
-
render(<ClaimableRole assignment={assignment} onChange={vi.fn()} />);
|
|
46
|
+
const screen = await render(<ClaimableRole assignment={assignment} onChange={vi.fn()} />);
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
await screen.getByLabelText('Activate Developer role').click();
|
|
49
|
+
await screen.getByRole('button', { name: 'Activate' }).click();
|
|
50
50
|
|
|
51
|
-
expect(
|
|
51
|
+
await expect.element(screen.getByText('Reason is required.')).toBeVisible();
|
|
52
52
|
expect(json).not.toHaveBeenCalled();
|
|
53
53
|
});
|
|
54
54
|
|
|
@@ -57,15 +57,13 @@ describe('ClaimableRole', () => {
|
|
|
57
57
|
const onChange = vi.fn();
|
|
58
58
|
mocks.createClient.mockResolvedValue({ json });
|
|
59
59
|
|
|
60
|
-
render(<ClaimableRole assignment={assignment} onChange={onChange} />);
|
|
60
|
+
const screen = await render(<ClaimableRole assignment={assignment} onChange={onChange} />);
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
});
|
|
66
|
-
fireEvent.click(screen.getByRole('button', { name: 'Activate' }));
|
|
62
|
+
await screen.getByLabelText('Activate Developer role').click();
|
|
63
|
+
await screen.getByLabelText('Reason for activation').fill('Testing role-dependent behavior');
|
|
64
|
+
await screen.getByRole('button', { name: 'Activate' }).click();
|
|
67
65
|
|
|
68
|
-
await waitFor(() =>
|
|
66
|
+
await vi.waitFor(() =>
|
|
69
67
|
expect(onChange).toHaveBeenCalledWith({
|
|
70
68
|
...assignment,
|
|
71
69
|
isActive: true,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cleanup,
|
|
1
|
+
import { cleanup, render } from 'vitest-browser-react';
|
|
2
2
|
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
|
3
3
|
|
|
4
4
|
import { RolesSheetContent } from './RolesSheetContent';
|
|
@@ -39,10 +39,9 @@ describe('RolesSheetContent', () => {
|
|
|
39
39
|
const json = vi.fn().mockResolvedValue([]);
|
|
40
40
|
mocks.createClient.mockResolvedValue({ json });
|
|
41
41
|
|
|
42
|
-
render(<RolesSheetContent navigate={vi.fn()} />);
|
|
42
|
+
const screen = await render(<RolesSheetContent navigate={vi.fn()} />);
|
|
43
43
|
|
|
44
|
-
expect(screen.
|
|
45
|
-
expect(await screen.findByText('You have no available roles')).toBeTruthy();
|
|
44
|
+
await expect.element(screen.getByText('You have no available roles')).toBeVisible();
|
|
46
45
|
expect(json).toHaveBeenCalledTimes(2);
|
|
47
46
|
});
|
|
48
47
|
|
|
@@ -53,14 +52,13 @@ describe('RolesSheetContent', () => {
|
|
|
53
52
|
.mockResolvedValue([]);
|
|
54
53
|
mocks.createClient.mockResolvedValue({ json });
|
|
55
54
|
|
|
56
|
-
render(<RolesSheetContent navigate={vi.fn()} />);
|
|
55
|
+
const screen = await render(<RolesSheetContent navigate={vi.fn()} />);
|
|
57
56
|
|
|
58
|
-
expect(
|
|
59
|
-
|
|
57
|
+
await expect.element(screen.getByText('Roles service unavailable')).toBeVisible();
|
|
58
|
+
await screen.getByRole('button', { name: 'Retry' }).click();
|
|
60
59
|
|
|
61
|
-
expect(
|
|
62
|
-
await
|
|
63
|
-
expect(await screen.findByText('You have no available roles')).toBeTruthy();
|
|
60
|
+
await vi.waitFor(() => expect(mocks.createClient).toHaveBeenCalledTimes(2));
|
|
61
|
+
await expect.element(screen.getByText('You have no available roles')).toBeVisible();
|
|
64
62
|
});
|
|
65
63
|
|
|
66
64
|
it('hides stale assignments while loading roles for a changed account', async () => {
|
|
@@ -73,14 +71,14 @@ describe('RolesSheetContent', () => {
|
|
|
73
71
|
.mockResolvedValueOnce({ json: initialJson })
|
|
74
72
|
.mockResolvedValueOnce({ json: pendingJson });
|
|
75
73
|
|
|
76
|
-
const
|
|
74
|
+
const screen = await render(<RolesSheetContent navigate={vi.fn()} />);
|
|
77
75
|
|
|
78
|
-
expect(
|
|
76
|
+
await expect.element(screen.getByText('Claimable role')).toBeVisible();
|
|
79
77
|
|
|
80
78
|
mocks.currentUser.localAccountId = 'next-account-id';
|
|
81
|
-
rerender(<RolesSheetContent navigate={vi.fn()} />);
|
|
79
|
+
await screen.rerender(<RolesSheetContent navigate={vi.fn()} />);
|
|
82
80
|
|
|
83
|
-
expect(screen.getByLabelText('Loading roles')).
|
|
84
|
-
expect(screen.
|
|
81
|
+
await expect.element(screen.getByLabelText('Loading roles')).toBeVisible();
|
|
82
|
+
await expect.element(screen.getByText('Claimable role')).not.toBeInTheDocument();
|
|
85
83
|
});
|
|
86
84
|
});
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by genversion.
|
|
2
|
-
export const version = '11.0.
|
|
2
|
+
export const version = '11.0.4';
|