mirror of
https://github.com/logto-io/logto.git
synced 2024-12-30 20:33:54 -05:00
test: integration test for connector list before manually setting up any connector (#1627)
Co-authored-by: Xiao Yijun <xiaoyijun@silverhand.io>
This commit is contained in:
parent
b88722674c
commit
a9b06a6129
2 changed files with 18 additions and 0 deletions
5
packages/integration-tests/src/connector-api.ts
Normal file
5
packages/integration-tests/src/connector-api.ts
Normal file
|
@ -0,0 +1,5 @@
|
|||
import { ConnectorDto } from '@logto/schemas';
|
||||
|
||||
import { authedAdminApi } from '@/api';
|
||||
|
||||
export const listConnectors = async () => authedAdminApi.get('connectors').json<ConnectorDto[]>();
|
13
packages/integration-tests/tests/connectors.test.ts
Normal file
13
packages/integration-tests/tests/connectors.test.ts
Normal file
|
@ -0,0 +1,13 @@
|
|||
import { listConnectors } from '@/connector-api';
|
||||
|
||||
test('connector flow', async () => {
|
||||
// List connectors after initializing a new Logto instance
|
||||
const connectorDtos = await listConnectors();
|
||||
|
||||
// There should be no connectors, or all connectors should be disabled.
|
||||
for (const connectorDto of connectorDtos) {
|
||||
expect(connectorDto.enabled).toBeFalsy();
|
||||
}
|
||||
|
||||
// Next up: set up a social connector
|
||||
});
|
Loading…
Reference in a new issue