Skip to content

Commit

Permalink
fix(test): fix the integration tests
Browse files Browse the repository at this point in the history
fix the integration tests
  • Loading branch information
simeng-li committed Aug 1, 2024
1 parent 333b879 commit 1d3d50e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { HTTPError } from 'ky';

import {
createApplication,
getApplication,
updateApplication,
deleteApplication,
getApplication,
getApplications,
updateApplication,
} from '#src/api/index.js';
import { expectRejects } from '#src/helpers/index.js';

Expand Down Expand Up @@ -108,6 +108,7 @@ describe('application APIs', () => {
await updateApplication(application.id, {
description: newApplicationDescription,
oidcClientMetadata: {
...application.oidcClientMetadata,
redirectUris: newRedirectUris,
},
customClientMetadata: { rotateRefreshToken: true, refreshTokenTtlInDays: 10 },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
* from the Console and check if the backchannel logout endpoint is called.
*/

import { type Server, type RequestListener, createServer } from 'node:http';
import { createServer, type RequestListener, type Server } from 'node:http';

import { adminConsoleApplicationId } from '@logto/schemas';

import { authedAdminTenantApi } from '#src/api/api.js';
import { getApplication } from '#src/api/application.js';
import ExpectConsole from '#src/ui-helpers/expect-console.js';
import { waitFor } from '#src/utils.js';

Expand Down Expand Up @@ -91,9 +92,11 @@ describe('backchannel logout', () => {
});

it('should call the backchannel logout endpoint when a user logs out', async () => {
const application = await getApplication(adminConsoleApplicationId);
await authedAdminTenantApi.patch('applications/' + adminConsoleApplicationId, {
json: {
oidcClientMetadata: {
...application.oidcClientMetadata,
backchannelLogoutUri,
},
},
Expand Down

0 comments on commit 1d3d50e

Please sign in to comment.