feat: remove Learning module
This commit is contained in:
1 parent
bdc290c2cf
commit
bd0873f348
39 files changed
+104
-2278
No files matched your search
@@ -63,7 +63,6 @@ describe('App programming provider initialization gate', () => {
|
||||
moduleAccess: {
|
||||
programming: true,
|
||||
design: true,
|
||||
learning: true,
|
||||
robot: true,
|
||||
},
|
||||
init: vi.fn(),
|
||||
@@ -116,7 +115,6 @@ describe('App programming provider initialization gate', () => {
|
||||
moduleAccess: {
|
||||
programming: true,
|
||||
design: true,
|
||||
learning: true,
|
||||
robot: true,
|
||||
},
|
||||
});
|
||||
@@ -131,7 +129,6 @@ describe('App programming provider initialization gate', () => {
|
||||
moduleAccess: {
|
||||
programming: false,
|
||||
design: true,
|
||||
learning: true,
|
||||
robot: true,
|
||||
},
|
||||
});
|
||||
@@ -147,8 +144,6 @@ describe('App programming provider initialization gate', () => {
|
||||
['/chat', 'programming'],
|
||||
['/image-canvas', 'design'],
|
||||
['/image-prompts/example', 'design'],
|
||||
['/learning', 'learning'],
|
||||
['/learning/project/project-1', 'learning'],
|
||||
['/ai-hardware', 'robot'],
|
||||
['/ai-hardware/device-1', 'robot'],
|
||||
] as const)('redirects disabled %s routes before mounting their module', async (pathname, accessKey) => {
|
||||
@@ -156,7 +151,6 @@ describe('App programming provider initialization gate', () => {
|
||||
moduleAccess: {
|
||||
programming: true,
|
||||
design: true,
|
||||
learning: true,
|
||||
robot: true,
|
||||
[accessKey]: false,
|
||||
},
|
||||
@@ -171,12 +165,22 @@ describe('App programming provider initialization gate', () => {
|
||||
}
|
||||
});
|
||||
|
||||
it.each(['/learning', '/learning/project/project-1'])(
|
||||
'redirects retired Learning route %s to the module chooser',
|
||||
async (pathname) => {
|
||||
await renderAt(pathname);
|
||||
|
||||
expect(await screen.findByText('Module chooser')).toBeInTheDocument();
|
||||
expect(screen.queryByTestId('main-layout')).not.toBeInTheDocument();
|
||||
expect(initProviders).not.toHaveBeenCalled();
|
||||
},
|
||||
);
|
||||
|
||||
it('keeps global settings available when Programming is disabled', async () => {
|
||||
useAuthStore.setState({
|
||||
moduleAccess: {
|
||||
programming: false,
|
||||
design: true,
|
||||
learning: true,
|
||||
robot: true,
|
||||
},
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user