"Fossies" - the Fresh Open Source Software Archive 
Member "Rocket.Chat-4.7.1/apps/meteor/tests/e2e/05-channel-creation.spec.ts" (13 May 2022, 1215 Bytes) of package /linux/www/Rocket.Chat-4.7.1.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 import { v4 } from 'uuid';
3
4 import ChannelCreation from './utils/pageobjects/ChannelCreation';
5 import LoginPage from './utils/pageobjects/LoginPage';
6 import { validUser, ROCKET_CAT } from './utils/mocks/userAndPasswordMock';
7
8 test.describe('[Channel]', async () => {
9 let channelCreation: ChannelCreation;
10 let loginPage: LoginPage;
11
12 const HELLO = 'Hello';
13
14 test.beforeEach(async ({ page, baseURL }) => {
15 const baseUrl = baseURL as string;
16 loginPage = new LoginPage(page);
17 await loginPage.goto(baseUrl);
18 await loginPage.login(validUser);
19
20 channelCreation = new ChannelCreation(page);
21 });
22
23 test.describe('[Public and private channel creation]', () => {
24 let channelName: string;
25 test.beforeEach(async () => {
26 channelName = v4();
27 });
28
29 test('expect create privateChannel channel', async () => {
30 await channelCreation.createChannel(channelName, true);
31 });
32
33 test('expect create public channel', async () => {
34 await channelCreation.createChannel(channelName, false);
35 });
36 });
37 // TODO: Verify why is intermitent
38 test.skip('expect send message to channel created', async () => {
39 await channelCreation.sendMessage(ROCKET_CAT, HELLO);
40 });
41 });