mirror of
https://github.com/logto-io/logto.git
synced 2025-01-27 21:39:16 -05:00
refactor(test): fix integration test assertion
This commit is contained in:
parent
1f8a3a47e0
commit
8dff98b1e0
2 changed files with 4 additions and 3 deletions
|
@ -13,6 +13,7 @@ import {
|
|||
generateResourceIndicator,
|
||||
generateScopeName,
|
||||
generateRoleName,
|
||||
dcls,
|
||||
} from '#src/utils.js';
|
||||
|
||||
import {
|
||||
|
@ -209,7 +210,7 @@ describe('M2M RBAC', () => {
|
|||
|
||||
it('assign a permission to a role on the role details page', async () => {
|
||||
// Wait for the deletion confirmation modal to disappear.
|
||||
await page.waitForSelector('.ReactModalPortal div[class$=header] div[class$=titleEllipsis]', {
|
||||
await page.waitForSelector(['.ReactModalPortal', dcls('header'), dcls('title')].join(' '), {
|
||||
hidden: true,
|
||||
});
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import {
|
|||
logtoConsoleUrl as logtoConsoleUrlString,
|
||||
} from '#src/constants.js';
|
||||
import { clearConnectorsByTypes, setEmailConnector } from '#src/helpers/connector.js';
|
||||
import { expectNavigation, waitFor } from '#src/utils.js';
|
||||
import { dcls, expectNavigation, waitFor } from '#src/utils.js';
|
||||
|
||||
export const goToAdminConsole = async () => {
|
||||
const logtoConsoleUrl = new URL(logtoConsoleUrlString);
|
||||
|
@ -90,7 +90,7 @@ export const expectToClickDetailsPageOption = async (page: Page, optionText: str
|
|||
|
||||
export const expectModalWithTitle = async (page: Page, title: string | RegExp) => {
|
||||
await expect(page).toMatchElement(
|
||||
'.ReactModalPortal div[class$=header] div[class$=titleEllipsis]',
|
||||
['.ReactModalPortal', dcls('header'), dcls('title')].join(' '),
|
||||
{
|
||||
text: title,
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue