mirror of
https://github.com/logto-io/logto.git
synced 2024-12-30 20:33:54 -05:00
test: improve ui test stability and remove unnecessary code (#3945)
This commit is contained in:
parent
19ef8c1e35
commit
f89af550de
3 changed files with 1 additions and 2 deletions
|
@ -194,7 +194,6 @@ describe('user management', () => {
|
||||||
await page.waitForSelector('form');
|
await page.waitForSelector('form');
|
||||||
// Conflicted email
|
// Conflicted email
|
||||||
await expect(page).toFillForm('form', { primaryEmail: 'jdoe@gmail.com' });
|
await expect(page).toFillForm('form', { primaryEmail: 'jdoe@gmail.com' });
|
||||||
await page.screenshot({ path: 'user-conflict-email.png' });
|
|
||||||
await expect(page).toClick('form div[class$=actionBar] button:nth-of-type(2)');
|
await expect(page).toClick('form div[class$=actionBar] button:nth-of-type(2)');
|
||||||
await expect(page).toMatchElement('div[class$=error] div[class$=message]', {
|
await expect(page).toMatchElement('div[class$=error] div[class$=message]', {
|
||||||
text: 'This email is associated with an existing account.',
|
text: 'This email is associated with an existing account.',
|
||||||
|
|
|
@ -11,6 +11,7 @@ const createWebhookFromWebhooksPage = async () => {
|
||||||
await expect(page).toFill('input[name=name]', 'hook_name');
|
await expect(page).toFill('input[name=name]', 'hook_name');
|
||||||
await expect(page).toFill('input[name=url]', 'https://example.com/webhook');
|
await expect(page).toFill('input[name=url]', 'https://example.com/webhook');
|
||||||
await expect(page).toClick('button[type=submit]');
|
await expect(page).toClick('button[type=submit]');
|
||||||
|
await page.waitForSelector('div[class$=header] div[class$=metadata] div[class$=title]');
|
||||||
};
|
};
|
||||||
|
|
||||||
describe('webhooks', () => {
|
describe('webhooks', () => {
|
||||||
|
@ -38,7 +39,6 @@ describe('webhooks', () => {
|
||||||
await createWebhookFromWebhooksPage();
|
await createWebhookFromWebhooksPage();
|
||||||
|
|
||||||
// Go to webhook details page
|
// Go to webhook details page
|
||||||
await page.waitForSelector('div[class$=header] div[class$=metadata] div[class$=title]');
|
|
||||||
await expect(page).toMatchElement('div[class$=main] div[class$=metadata] div[class$=title]', {
|
await expect(page).toMatchElement('div[class$=main] div[class$=metadata] div[class$=title]', {
|
||||||
text: 'hook_name',
|
text: 'hook_name',
|
||||||
});
|
});
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 95 KiB |
Loading…
Reference in a new issue