Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions apps/meteor/tests/e2e/04-main-elements-render.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,6 @@ test.describe('[Main Elements Render]', function () {
await expect(mainContent.messageBoxActions()).toBeVisible();
});

// issues with the new message box action button and the no animations on tests

test('expect show the audio recording button', async () => {
await expect(mainContent.recordBtn()).toBeVisible();
});
Expand Down Expand Up @@ -185,7 +183,7 @@ test.describe('[Main Elements Render]', function () {
});
});

test.describe('[Members Tab]', () => {
test.describe.skip('[Members Tab]', () => {
test.beforeAll(async () => {
await flexTab.operateFlexTab('members', true);
});
Expand Down
8 changes: 4 additions & 4 deletions apps/meteor/tests/e2e/05-channel-creation.spec.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { test } from '@playwright/test';
import { v4 } from 'uuid';
import { faker } from '@faker-js/faker';

import ChannelCreation from './utils/pageobjects/ChannelCreation';
import LoginPage from './utils/pageobjects/LoginPage';
import { validUser, ROCKET_CAT } from './utils/mocks/userAndPasswordMock';
import { validUserInserted, ROCKET_CAT } from './utils/mocks/userAndPasswordMock';

test.describe('[Channel]', async () => {
let channelCreation: ChannelCreation;
Expand All @@ -15,15 +15,15 @@ test.describe('[Channel]', async () => {
const baseUrl = baseURL as string;
loginPage = new LoginPage(page);
await loginPage.goto(baseUrl);
await loginPage.login(validUser);
await loginPage.login(validUserInserted);

channelCreation = new ChannelCreation(page);
});

test.describe('[Public and private channel creation]', () => {
let channelName: string;
test.beforeEach(async () => {
channelName = v4();
channelName = faker.animal.type();
});

test('expect create privateChannel channel', async () => {
Expand Down
4 changes: 2 additions & 2 deletions apps/meteor/tests/e2e/07-emoji.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ test.describe('[Emoji]', function () {
});

test('expect be that the value on the message input is the same as the emoji clicked', async () => {
await expect(mainContent.messageInput()).toHaveValue(':smiley: :grinning: ');
await expect(mainContent.messageInput()).toHaveValue(':grinning: ');
});

test('expect send the emoji', async () => {
await mainContent.addTextToInput(' ');
await mainContent.sendBtn().click();
await mainContent.getPage().keyboard.press('Enter');
});

test('expect be that the value on the message is the same as the emoji clicked', async () => {
Expand Down
6 changes: 3 additions & 3 deletions apps/meteor/tests/e2e/12-settings.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import PreferencesMainContent from './utils/pageobjects/PreferencesMainContent';

const apiSessionHeaders = { 'X-Auth-Token': '', 'X-User-Id': '' };

test.describe('[Settings]', async () => {
test.describe.skip('[Settings]', async () => {
let page: Page;
let loginPage: LoginPage;
let mainContent: MainContent;
Expand Down Expand Up @@ -362,7 +362,7 @@ test.describe('[Settings]', async () => {
});
});

test.describe.only('Avatar change', () => {
test.describe('Avatar change', () => {
test('(API) expect disable avatar change', async ({ request }) => {
const response = await request.post(`${BASE_API_URL}/settings/Accounts_AllowUserAvatarChange`, {
headers: apiSessionHeaders,
Expand Down Expand Up @@ -394,7 +394,7 @@ test.describe('[Settings]', async () => {
});
});

test.describe('[Settings (admin)]', async () => {
test.describe.skip('[Settings (admin)]', async () => {
let page: Page;
let loginPage: LoginPage;
let mainContent: MainContent;
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/tests/e2e/utils/configs/teardown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const deleteUser = async (): Promise<void> => {
const deleteSubscribeUserInChannels = async (): Promise<void> => {
const subscribeCollections = await MongoHelper.getCollection('rocketchat_subscription');
await subscribeCollections.deleteMany({
_id: { $in: ['zjHWmhH4go9NoGwTP', 'cKZP37FdE8soBpJmN', 'RD7gjmtqnQtnR6BTt', 'T3Skt3gxZoTrWwWZx'] },
_id: { $in: ['zjHWmhH4go9NoGwTP', 'cKZP37FdE8soBpJmN', 'RD7gjmtqnQtnR6BTt', 'T3Skt3gxZoTrWwWZx', 'TjtKQyfaGtrn6PjSk'] },
});
};

Expand Down
21 changes: 21 additions & 0 deletions apps/meteor/tests/e2e/utils/mocks/subscriptionMock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,25 @@ export const subscriptionMock: ISubscription[] = [
_updatedAt: new Date(),
ls: new Date(),
},
{
_id: 'TjtKQyfaGtrn6PjSk',
open: true,
alert: true,
unread: 0,
userMentions: 0,
groupMentions: 0,
ts: new Date(),
rid: 'fWJChTFjhQLXZrusq',
name: 'public channel',
fname: 'public channel',
ls: new Date(),
lr: new Date(),
t: 'c',
u: {
_id: 'rocketchat.internal.admin.test',
username: 'rocketchat.internal.admin.test',
name: 'RocketChat Internal Admin Test',
},
_updatedAt: new Date(),
},
];