Skip to content

Commit

Permalink
fix(test): fix integration test
Browse files Browse the repository at this point in the history
fix integration test
  • Loading branch information
simeng-li committed May 14, 2024
1 parent e6281a5 commit cd19581
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { type Page } from 'puppeteer';

export const expectToCreateWebhook = async (page: Page) => {
await expect(page).toClick('div[class$=main] div[class$=headline] > button');
await expect(page).toClick('span[class$=label]', { text: 'Create new account' });
await expect(page).toClick('span[class$=label]', { text: 'Sign in' });
await expect(page).toClick('span[class$=label]', { text: 'PostRegister' });
await expect(page).toClick('span[class$=label]', { text: 'User.Updated' });
await expect(page).toFill('input[name=name]', 'hook_name');
await expect(page).toFill('input[name=url]', 'https://localhost/webhook');
await expect(page).toClick('button[type=submit]');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { logtoConsoleUrl as logtoConsoleUrlString } from '#src/constants.js';
import {
goToAdminConsole,
expectToSaveChanges,
waitForToast,
expectToClickModalAction,
expectToClickDetailsPageOption,
expectModalWithTitle,
expectConfirmModalAndAct,
expectMainPageWithTitle,
expectModalWithTitle,
expectToClickDetailsPageOption,
expectToClickModalAction,
expectToSaveChanges,
goToAdminConsole,
waitForToast,
} from '#src/ui-helpers/index.js';
import { appendPathname, dcls, expectNavigation } from '#src/utils.js';

Expand Down Expand Up @@ -63,8 +63,8 @@ describe('webhooks', () => {
await expectNavigation(page.goto(appendPathname('/console/webhooks', logtoConsoleUrl).href));

await expect(page).toClick('div[class$=main] div[class$=headline] > button');
await expect(page).toClick('span[class$=label]', { text: 'Create new account' });
await expect(page).toClick('span[class$=label]', { text: 'Sign in' });
await expect(page).toClick('span[class$=label]', { text: 'PostRegister' });
await expect(page).toClick('span[class$=label]', { text: 'User.Create' });
await expect(page).toFill('input[name=name]', 'hook_name');
await expect(page).toFill('input[name=url]', 'http://localhost/webhook');
await expect(page).toClick('button[type=submit]');
Expand Down

0 comments on commit cd19581

Please sign in to comment.