import { createOptions, setupTokens, TestTokens, TestProjectId, TestTenantId, TestOrgId } from '../test.config'; import { AdapterService } from '../api/adapter.service'; jest.setTimeout(10000); const factory = createOptions(); const service = new AdapterService(factory); beforeAll(async () => { await setupTokens(); console.log('tokens are loaded'); // console.log(TestTokens); }); test('加载适配器列表', async () => { const articles = await service.loadAdapterMenuList(TestProjectId, TestTenantId, TestOrgId); // console.log('loadAdapterMenu', articles); }); test('加载某项内容', async () => { const articles = await service.loadMenuContent(TestProjectId, 'labor', TestTenantId); // console.log('loadOneContent', articles); }); test('保存某项内容', async () => { const articles = await service.saveMenuContent(TestProjectId, 'safety', 'glodonSafety', { arguments: '', enable: false, tenantId: Number(TestTenantId) }); console.log('保存某项内容', articles); });