The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/apps/meteor/tests/e2e/create-channel.spec.ts

38 lines
1.2 KiB

import { faker } from '@faker-js/faker';
import { Users } from './fixtures/userStates';
import { HomeChannel } from './page-objects';
import { test, expect } from './utils/test';
test.use({ storageState: Users.admin.state });
test.describe.serial('channel-management', () => {
let poHomeChannel: HomeChannel;
test.beforeEach(async ({ page }) => {
poHomeChannel = new HomeChannel(page);
await page.goto('/home');
});
test('expect create a public channel', async ({ page }) => {
const channelName = faker.string.uuid();
await poHomeChannel.sidenav.openNewByLabel('Channel');
await poHomeChannel.sidenav.checkboxPrivateChannel.click();
await poHomeChannel.sidenav.inputChannelName.type(channelName);
await poHomeChannel.sidenav.btnCreate.click();
await expect(page).toHaveURL(`/channel/${channelName}`);
});
test('expect create a private channel', async ({ page }) => {
const channelName = faker.string.uuid();
await poHomeChannel.sidenav.openNewByLabel('Channel');
await poHomeChannel.sidenav.inputChannelName.type(channelName);
await poHomeChannel.sidenav.btnCreate.click();
await expect(page).toHaveURL(`/group/${channelName}`);
});
});