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/tests/cypress/integration/04-main-elements-render.js

298 lines
7.6 KiB

import flexTab from '../pageobjects/flex-tab.page';
import mainContent from '../pageobjects/main-content.page';
import sideNav from '../pageobjects/side-nav.page';
import { checkIfUserIsValid } from '../../data/checks';
import { username, email, password } from '../../data/user.js';
describe('[Main Elements Render]', function () {
before(() => {
checkIfUserIsValid(username, email, password);
8 years ago
sideNav.spotlightSearchIcon.click();
sideNav.searchChannel('general');
});
describe('[Side Nav Bar]', () => {
describe('render:', () => {
it('it should show the new channel button', () => {
sideNav.newChannelBtnToolbar.should('be.visible');
});
it('it should show "general" channel', () => {
sideNav.general.should('be.visible');
});
});
describe('spotlight search render:', () => {
8 years ago
after(() => {
mainContent.messageInput.click();
});
it('it should show spotlight search bar', () => {
8 years ago
sideNav.spotlightSearchIcon.click();
sideNav.spotlightSearch.should('be.visible');
});
it('it should click the spotlight and show the channel list', () => {
sideNav.spotlightSearch.click('center');
sideNav.spotlightSearchPopUp.should('be.visible');
});
9 years ago
it.skip('it should remove the list when the spotlight loses focus', () => {
sideNav.spotlightSearchPopUp.should('be.visible');
mainContent.messageInput.click();
9 years ago
mainContent.lastMessage.click();
sideNav.spotlightSearchPopUp.should('not.be.visible');
});
it('it should add text to the spotlight and show the channel list', () => {
sideNav.spotlightSearch.type('rocket.cat');
sideNav.spotlightSearchPopUp.should('be.visible');
});
9 years ago
it.skip('it should remove the text on the spotlight and the list when lost focus', () => {
sideNav.spotlightSearchPopUp.should('be.visible');
mainContent.messageInput.click();
sideNav.spotlightSearchPopUp.should('not.be.visible');
sideNav.spotlightSearch.should('have.text', '');
});
});
});
describe('[User Options]', () => {
describe('render:', () => {
before(() => {
8 years ago
sideNav.sidebarUserMenu.click();
});
after(() => {
8 years ago
mainContent.popoverWrapper.click();
});
it('it should show online button', () => {
sideNav.statusOnline.should('be.visible');
});
it('it should show away button', () => {
sideNav.statusAway.should('be.visible');
});
it('it should show busy button', () => {
sideNav.statusBusy.should('be.visible');
});
it('it should show offline button', () => {
sideNav.statusOffline.should('be.visible');
});
it('it should show settings button', () => {
sideNav.account.should('be.visible');
});
it('it should show logout button', () => {
sideNav.logout.should('be.visible');
});
});
});
describe('[Main Content]', () => {
describe('render:', () => {
before(() => {
sideNav.openChannel('general');
});
it('it should show the title of the channel', () => {
mainContent.channelTitle.should('be.visible');
});
it('it should show the empty favorite star', () => {
mainContent.emptyFavoriteStar.should('be.visible');
});
9 years ago
it('it should click the star', () => {
mainContent.emptyFavoriteStar.click();
});
it('it should not show the empty favorite star', () => {
mainContent.favoriteStar.should('be.visible');
});
it.skip('it should click the star', () => {
mainContent.favoriteStar.click();
});
it('it should show the message input bar', () => {
mainContent.messageInput.should('be.visible');
});
9 years ago
it('it should show the message box actions button', () => {
mainContent.messageBoxActions.should('be.visible');
});
// issues with the new message box action button and the no animations on tests
9 years ago
it('it should show the audio recording button', () => {
mainContent.recordBtn.should('be.visible');
});
it('it should show the emoji button', () => {
mainContent.emojiBtn.should('be.visible');
});
it('it should show the last message', () => {
mainContent.lastMessage.should('be.visible');
});
it('it should be that the last message is from the logged user', () => {
mainContent.lastMessageUser.should('contain', username);
});
it('it should not show the Admin tag', () => {
mainContent.lastMessageUserTag.should('not.be.visible');
});
});
});
describe('[Flextab]', () => {
describe('[Render]', () => {
before(() => {
sideNav.openChannel('general');
});
[NEW] Header Redesign (#7750) * Rc main content header work in progress * header redesign work in progress * Clean up some css and fix burger * Fix reviews * Apply the new header to some admin pages * Start using typography on fonts * add the new header to more pages * add more new headers * Fix admin buttons * add the new header to the account screens and fix some flexs * fix profile header and use new burger * Add favorite star fill * allign preferences contents to center * Put description under the title * fix overflow on channel topic and title * start making the header a component * move channel header template to the new one and fix burger menu * Make the header a modular component * fix some buttons on integrations * add channel icons and fix star fill * fix line height and css lint * add livechat icon * fix part of the tests * fix tests * add a max-width to header * hide room image on channels * Fix reviews and some issues with firefox also remove a console.log() * fix mobile max width * Fix Reviews reduce some elements and try to improve the naming of elements * Fix realNames on Header * [FIX] After deleting the room, cache is not synchronizing * Put delete action on another popover group * check if user can delete * [FIX] Email Subjects not being sent * fix on android * fix for ios * Tab Bar Icons moved to header * remove sidebar header on admin embedded version * fix lint issue * remove console.log * contextual bar header * remove last activity * Update meteor to 1.5.2.2-rc.0 * Fix missing i18n translations * fix header on administration * migration 101 * fix admin view header * remove accountBox from admin menu * add sidebar flex title and icons * smaller accountBox * Fix some tests and skip others skipping due some features that need fixing * Update sidebarItem.html * unify unread and mentions badge * make sidebar item width 100% * fixed tests * LingoHub Update :rocket: Manual push by LingoHub User: Gabriel Engel. Project: Rocket.Chat Made with :heart: by https://lingohub.com * meteor update --all-packages * LingoHub Update :rocket: Manual push by LingoHub User: Gabriel Engel. Project: Rocket.Chat Made with :heart: by https://lingohub.com * meteor update --release 1.5.2.2 * [FIX] Vairous LDAP issues & add pagination * LingoHub Update :rocket: Manual push by LingoHub User: Rodrigo Nascimento. Project: Rocket.Chat Made with :heart: by https://lingohub.com * LingoHub Update :rocket: Manual push by LingoHub User: Rodrigo Nascimento. Project: Rocket.Chat Made with :heart: by https://lingohub.com * contextual-bar template * fix stylelinty * fix icons
8 years ago
describe('Room Info Tab:', () => {
before(() => {
flexTab.operateFlexTab('info', true);
});
after(() => {
flexTab.operateFlexTab('info', false);
});
it('it should show the room info button', () => {
flexTab.channelTab.should('be.visible');
});
it('it should show the room info tab content', () => {
flexTab.channelSettings.should('be.visible');
});
it('it should show the room name', () => {
flexTab.channelSettingName.should('have.attr', 'title', 'general');
});
});
describe('Search Tab:', () => {
before(() => {
flexTab.operateFlexTab('search', true);
});
after(() => {
flexTab.operateFlexTab('search', false);
});
it('it should show the message search button', () => {
flexTab.searchTab.should('be.visible');
});
it('it should show the message tab content', () => {
flexTab.searchTabContent.should('be.visible');
});
});
[NEW] Header Redesign (#7750) * Rc main content header work in progress * header redesign work in progress * Clean up some css and fix burger * Fix reviews * Apply the new header to some admin pages * Start using typography on fonts * add the new header to more pages * add more new headers * Fix admin buttons * add the new header to the account screens and fix some flexs * fix profile header and use new burger * Add favorite star fill * allign preferences contents to center * Put description under the title * fix overflow on channel topic and title * start making the header a component * move channel header template to the new one and fix burger menu * Make the header a modular component * fix some buttons on integrations * add channel icons and fix star fill * fix line height and css lint * add livechat icon * fix part of the tests * fix tests * add a max-width to header * hide room image on channels * Fix reviews and some issues with firefox also remove a console.log() * fix mobile max width * Fix Reviews reduce some elements and try to improve the naming of elements * Fix realNames on Header * [FIX] After deleting the room, cache is not synchronizing * Put delete action on another popover group * check if user can delete * [FIX] Email Subjects not being sent * fix on android * fix for ios * Tab Bar Icons moved to header * remove sidebar header on admin embedded version * fix lint issue * remove console.log * contextual bar header * remove last activity * Update meteor to 1.5.2.2-rc.0 * Fix missing i18n translations * fix header on administration * migration 101 * fix admin view header * remove accountBox from admin menu * add sidebar flex title and icons * smaller accountBox * Fix some tests and skip others skipping due some features that need fixing * Update sidebarItem.html * unify unread and mentions badge * make sidebar item width 100% * fixed tests * LingoHub Update :rocket: Manual push by LingoHub User: Gabriel Engel. Project: Rocket.Chat Made with :heart: by https://lingohub.com * meteor update --all-packages * LingoHub Update :rocket: Manual push by LingoHub User: Gabriel Engel. Project: Rocket.Chat Made with :heart: by https://lingohub.com * meteor update --release 1.5.2.2 * [FIX] Vairous LDAP issues & add pagination * LingoHub Update :rocket: Manual push by LingoHub User: Rodrigo Nascimento. Project: Rocket.Chat Made with :heart: by https://lingohub.com * LingoHub Update :rocket: Manual push by LingoHub User: Rodrigo Nascimento. Project: Rocket.Chat Made with :heart: by https://lingohub.com * contextual-bar template * fix stylelinty * fix icons
8 years ago
describe.skip('Members Tab:', () => {
before(() => {
flexTab.operateFlexTab('members', true);
});
after(() => {
flexTab.operateFlexTab('members', false);
});
it('it should show the members tab button', () => {
flexTab.membersTab.should('be.visible');
});
it('it should show the members content', () => {
flexTab.membersTabContent.should('be.visible');
});
it('it should show the show all link', () => {
flexTab.showAll.should('be.visible');
});
});
describe('Notifications Tab:', () => {
before(() => {
flexTab.operateFlexTab('notifications', true);
});
after(() => {
flexTab.operateFlexTab('notifications', false);
});
8 years ago
it('it should not show the notifications button', () => {
flexTab.notificationsTab.should('not.be.visible');
});
it('it should show the notifications Tab content', () => {
flexTab.notificationsSettings.should('be.visible');
});
});
describe('Files Tab:', () => {
before(() => {
flexTab.operateFlexTab('files', true);
});
after(() => {
flexTab.operateFlexTab('files', false);
});
it('it should show the files Tab content', () => {
flexTab.filesTabContent.should('be.visible');
});
});
describe('Mentions Tab:', () => {
before(() => {
flexTab.operateFlexTab('mentions', true);
});
after(() => {
flexTab.operateFlexTab('mentions', false);
});
it('it should show the mentions Tab content', () => {
flexTab.mentionsTabContent.should('be.visible');
});
});
describe('Starred Messages Tab:', () => {
before(() => {
flexTab.operateFlexTab('starred', true);
});
after(() => {
flexTab.operateFlexTab('starred', false);
});
it('it should show the starred messages Tab content', () => {
flexTab.starredTabContent.should('be.visible');
});
});
describe('Pinned Messages Tab:', () => {
before(() => {
flexTab.operateFlexTab('pinned', true);
});
after(() => {
flexTab.operateFlexTab('pinned', false);
});
it('it should show the pinned messages Tab content', () => {
flexTab.pinnedTabContent.should('be.visible');
});
});
});
});
9 years ago
});