|
5 | 5 | * Licensed under the Apache License, Version 2.0. |
6 | 6 | * you may not use this file except in compliance with the License. |
7 | 7 | */ |
8 | | -import { expect, test } from '@jest/globals'; |
9 | | - |
10 | | -import { coreClientActivityManifest } from '@cloudbeaver/core-client-activity'; |
11 | | -import { coreLocalizationManifest } from '@cloudbeaver/core-localization'; |
12 | | -import { coreRootManifest, ServerConfigResource } from '@cloudbeaver/core-root'; |
13 | | -import { createGQLEndpoint } from '@cloudbeaver/core-root/__custom_mocks__/createGQLEndpoint.js'; |
14 | | -import '@cloudbeaver/core-root/__custom_mocks__/expectWebsocketClosedMessage.js'; |
15 | | -import { mockAppInit } from '@cloudbeaver/core-root/__custom_mocks__/mockAppInit.js'; |
16 | | -import { mockGraphQL } from '@cloudbeaver/core-root/__custom_mocks__/mockGraphQL.js'; |
17 | | -import { mockServerConfig } from '@cloudbeaver/core-root/__custom_mocks__/resolvers/mockServerConfig.js'; |
18 | | -import { coreRoutingManifest } from '@cloudbeaver/core-routing'; |
19 | | -import { coreSDKManifest } from '@cloudbeaver/core-sdk'; |
20 | | -import { coreSettingsManifest } from '@cloudbeaver/core-settings'; |
21 | | -import { expectNoDeprecatedSettingMessage } from '@cloudbeaver/core-settings/__custom_mocks__/expectDeprecatedSettingMessage.js'; |
22 | | -import { createApp } from '@cloudbeaver/tests-runner'; |
23 | | - |
24 | | -import { mockAuthentication } from './__custom_mocks__/mockAuthentication.js'; |
25 | | -import { AuthSettingsService } from './AuthSettingsService.js'; |
26 | | -import { coreAuthenticationManifest } from './manifest.js'; |
27 | | - |
28 | | -const endpoint = createGQLEndpoint(); |
29 | | -const server = mockGraphQL(...mockAppInit(endpoint), ...mockAuthentication(endpoint)); |
30 | | -const app = createApp( |
31 | | - coreAuthenticationManifest, |
32 | | - coreRootManifest, |
33 | | - coreSDKManifest, |
34 | | - coreSettingsManifest, |
35 | | - coreRoutingManifest, |
36 | | - coreLocalizationManifest, |
37 | | - coreClientActivityManifest, |
38 | | -); |
39 | | - |
40 | | -const equalConfig = { |
41 | | - 'core.authentication.disableAnonymousAccess': true, |
42 | | -}; |
43 | | - |
44 | | -test('Read settings', async () => { |
45 | | - const settings = app.serviceProvider.getService(AuthSettingsService); |
46 | | - const config = app.serviceProvider.getService(ServerConfigResource); |
47 | | - |
48 | | - server.use(endpoint.query('serverConfig', mockServerConfig(equalConfig))); |
49 | | - |
50 | | - await config.refresh(); |
51 | | - |
52 | | - expect(settings.disableAnonymousAccess).toBe(true); |
53 | | - expectNoDeprecatedSettingMessage(); |
54 | | -}); |
| 8 | +// import { expect, test } from '@jest/globals'; |
| 9 | + |
| 10 | +// import { coreClientActivityManifest } from '@cloudbeaver/core-client-activity'; |
| 11 | +// import { coreLocalizationManifest } from '@cloudbeaver/core-localization'; |
| 12 | +// import { coreRootManifest, ServerConfigResource } from '@cloudbeaver/core-root'; |
| 13 | +// import { createGQLEndpoint } from '@cloudbeaver/core-root/__custom_mocks__/createGQLEndpoint.js'; |
| 14 | +// import '@cloudbeaver/core-root/__custom_mocks__/expectWebsocketClosedMessage.js'; |
| 15 | +// import { mockAppInit } from '@cloudbeaver/core-root/__custom_mocks__/mockAppInit.js'; |
| 16 | +// import { mockGraphQL } from '@cloudbeaver/core-root/__custom_mocks__/mockGraphQL.js'; |
| 17 | +// import { mockServerConfig } from '@cloudbeaver/core-root/__custom_mocks__/resolvers/mockServerConfig.js'; |
| 18 | +// import { coreRoutingManifest } from '@cloudbeaver/core-routing'; |
| 19 | +// import { coreSDKManifest } from '@cloudbeaver/core-sdk'; |
| 20 | +// import { coreSettingsManifest } from '@cloudbeaver/core-settings'; |
| 21 | +// import { expectNoDeprecatedSettingMessage } from '@cloudbeaver/core-settings/__custom_mocks__/expectDeprecatedSettingMessage.js'; |
| 22 | +// import { createApp } from '@cloudbeaver/tests-runner'; |
| 23 | + |
| 24 | +// import { mockAuthentication } from './__custom_mocks__/mockAuthentication.js'; |
| 25 | +// import { AuthSettingsService } from './AuthSettingsService.js'; |
| 26 | +// import { coreAuthenticationManifest } from './manifest.js'; |
| 27 | + |
| 28 | +// const endpoint = createGQLEndpoint(); |
| 29 | +// const server = mockGraphQL(...mockAppInit(endpoint), ...mockAuthentication(endpoint)); |
| 30 | +// const app = createApp( |
| 31 | +// coreAuthenticationManifest, |
| 32 | +// coreRootManifest, |
| 33 | +// coreSDKManifest, |
| 34 | +// coreSettingsManifest, |
| 35 | +// coreRoutingManifest, |
| 36 | +// coreLocalizationManifest, |
| 37 | +// coreClientActivityManifest, |
| 38 | +// ); |
| 39 | + |
| 40 | +// const equalConfig = { |
| 41 | +// 'core.authentication.disableAnonymousAccess': true, |
| 42 | +// }; |
| 43 | + |
| 44 | +// test('Read settings', async () => { |
| 45 | +// const settings = app.serviceProvider.getService(AuthSettingsService); |
| 46 | +// const config = app.serviceProvider.getService(ServerConfigResource); |
| 47 | + |
| 48 | +// server.use(endpoint.query('serverConfig', mockServerConfig(equalConfig))); |
| 49 | + |
| 50 | +// await config.refresh(); |
| 51 | + |
| 52 | +// expect(settings.disableAnonymousAccess).toBe(true); |
| 53 | +// expectNoDeprecatedSettingMessage(); |
| 54 | +// }); |
0 commit comments