Skip to content

Commit

Permalink
chore: format e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Maciej Wójcik committed Jan 23, 2024
1 parent e23b188 commit 0c15f1c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
16 changes: 10 additions & 6 deletions e2e/tests/passwordReset.spec.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
import { test } from '@playwright/test';

import { testsConfig, testUserTemplate } from '../config';
import { User } from '../types';
import { createUser } from '../utils/controllers/createUser';
import { loginBasic } from '../utils/controllers/login';
import { logout } from '../utils/controllers/logout';
import {
selectPasswordReset,
setEmail,
setPassword,
} from '../utils/controllers/passwordReset';
import { getPasswordResetToken } from '../utils/db/getPasswordResetToken';
import { dockerDown, dockerRestart } from '../utils/docker';
import { waitForBase } from '../utils/waitForBase';
import { waitForPromise } from '../utils/waitForPromise';
import { selectPasswordReset, setEmail, setPassword } from '../utils/controllers/passwordReset';
import { getPasswordResetToken } from '../utils/db/getPasswordResetToken';
import { createUser } from '../utils/controllers/createUser';
import { logout } from '../utils/controllers/logout';
import { User } from '../types';

const newPassword = '!7(8o3aN8RoF';

test.describe('Reset password', () => {
const user: User = { ...testUserTemplate, username: 'test' };

test.beforeEach(async ({ browser, page }) => {
test.beforeEach(async ({ browser }) => {
dockerRestart();
await createUser(browser, user);
});
Expand Down
3 changes: 1 addition & 2 deletions e2e/utils/controllers/passwordReset.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Page } from "playwright";

import { Page } from 'playwright';

export const selectPasswordReset = async (page: Page) => {
const selectButton = page.getByTestId('select-password-reset');
Expand Down

0 comments on commit 0c15f1c

Please sign in to comment.