0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-27 21:39:16 -05:00

refactor(test): fix integration test

This commit is contained in:
Gao Sun 2023-10-19 18:25:03 +08:00
parent b18df612dd
commit d4d2a7256e
No known key found for this signature in database
GPG key ID: 13EBE123E4773688

View file

@ -9,7 +9,7 @@ import {
expectConfirmModalAndAct,
expectMainPageWithTitle,
} from '#src/ui-helpers/index.js';
import { appendPathname, expectNavigation } from '#src/utils.js';
import { appendPathname, dcls, expectNavigation } from '#src/utils.js';
import { expectToCreateWebhook } from './helpers.js';
@ -97,13 +97,10 @@ describe('webhooks', () => {
});
await expectToClickModalAction(page, 'Disable webhook');
await expect(page).toMatchElement(
'div[class$=header] div[class$=metadata] div:nth-of-type(2) div[class$=outlined] div:nth-of-type(2)',
{
text: 'Not in use',
timeout: 1000,
}
);
await expect(page).toMatchElement([dcls('header'), dcls('metadata'), dcls('tag')].join(' '), {
text: 'Not in use',
timeout: 3000,
});
// Reactivate webhook
await expectToClickDetailsPageOption(page, 'Reactivate webhook');