"Fossies" - the Fresh Open Source Software Archive

Member "Rocket.Chat-4.7.2/apps/meteor/tests/e2e/02-register.spec.ts" (20 May 2022, 824 Bytes) of package /linux/www/Rocket.Chat-4.7.2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TypeScript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 import { test } from '@playwright/test';
    2 
    3 import { registerUser, WRONG_PASSWORD } from './utils/mocks/userAndPasswordMock';
    4 import LoginPage from './utils/pageobjects/LoginPage';
    5 
    6 test.describe('[Register]', () => {
    7     let loginPage: LoginPage;
    8 
    9     test.beforeEach(async ({ page, baseURL }) => {
   10         const URL = baseURL as string;
   11         loginPage = new LoginPage(page);
   12         await loginPage.goto(URL);
   13     });
   14 
   15     test('expect user click in register button without data', async () => {
   16         await loginPage.registerFail();
   17     });
   18 
   19     test('expect user click in register button with different password', async () => {
   20         await loginPage.registerFailWithDifferentPassword(registerUser, WRONG_PASSWORD);
   21     });
   22 
   23     test('expect new user is created', async () => {
   24         await loginPage.gotToRegister();
   25         await loginPage.registerNewUser(registerUser);
   26     });
   27 });