Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Commit

Permalink
fix test on LDAP groups, code theme and incoming webhook (#7919)
Browse files Browse the repository at this point in the history
  • Loading branch information
saturninoabril committed Apr 16, 2021
1 parent 3ac2d81 commit 8d7fc85
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
// Stage: @prod
// Group: @account_setting

import * as TIMEOUTS from '../../../fixtures/timeouts';

describe('Account Settings', () => {
before(() => {
// # Login as new user, visit town-square and post a message
Expand Down Expand Up @@ -42,9 +44,8 @@ describe('Account Settings', () => {
verifyLastPostStyle(theme);

// # Save and close settings modal
cy.get('#saveSetting').click();
cy.get('#accountSettingsHeader > .close').click();
cy.get('#accountSettingsHeader').should('be.hidden');
cy.get('#saveSetting').click().wait(TIMEOUTS.HALF_SEC);
cy.uiClose();

// * Verify that the styles remain after saving and closing modal
verifyLastPostStyle(theme);
Expand All @@ -71,9 +72,7 @@ function verifyLastPostStyle(codeTheme) {

function navigateToThemeSettings() {
// Change theme to desired theme (keeps settings modal open)
cy.toAccountSettingsModal();
cy.get('#displayButton').click();
cy.get('#displaySettingsTitle').should('exist');
cy.uiOpenAccountSettingsModal('Display');

// Open edit theme
cy.get('#themeTitle').should('be.visible');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// ***************************************************************

// Stage: @prod
// Group: @enterprise @incoming_webhook @not_cloud
// Group: @enterprise @elasticsearch @incoming_webhook @not_cloud

import * as TIMEOUTS from '../../../fixtures/timeouts';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// Stage: @prod
// Group: @enterprise @ldap_group

describe('Test channel public/private toggle', () => {
describe('LDAP Group Sync - Test channel public/private toggle', () => {
let testTeam;

before(() => {
Expand All @@ -20,18 +20,18 @@ describe('Test channel public/private toggle', () => {
// Enable LDAP and LDAP group sync
cy.apiUpdateConfig({LdapSettings: {Enable: true}});

// # Check and run LDAP Sync job
if (Cypress.env('runLDAPSync')) {
cy.checkRunLDAPSync();
}
// # Test LDAP configuration and server connection
// # Synchronize user attributes
cy.apiLDAPTest();
cy.apiLDAPSync();

// # Init test setup
cy.apiInitSetup().then(({team}) => {
testTeam = team;
});
});

it('Verify that System Admin can change channel privacy using toggle', () => {
it('MM-T4003_1 Verify that System Admin can change channel privacy using toggle', () => {
cy.apiCreateChannel(testTeam.id, 'test-channel', 'Test Channel').then(({channel}) => {
assert(channel.type === 'O');
cy.visit(`/admin_console/user_management/channels/${channel.id}`);
Expand All @@ -53,7 +53,7 @@ describe('Test channel public/private toggle', () => {
});
});

it('Verify that resetting sync toggle doesn\'t alter channel privacy toggle', () => {
it('MM-T4003_2 Verify that resetting sync toggle doesn\'t alter channel privacy toggle', () => {
cy.apiCreateChannel(testTeam.id, 'test-channel', 'Test Channel').then(({channel}) => {
assert(channel.type === 'O');
cy.visit(`/admin_console/user_management/channels/${channel.id}`);
Expand All @@ -68,7 +68,7 @@ describe('Test channel public/private toggle', () => {
});
});

it('Verify that toggles are disabled for default channel', () => {
it('MM-T4003_3 Verify that toggles are disabled for default channel', () => {
cy.visit(`/${testTeam.name}/channels/town-square`);
cy.getCurrentChannelId().then((id) => {
cy.visit(`/admin_console/user_management/channels/${id}`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,21 @@ const getChannelsAssociatedToGroupAndUnlink = (groupId) => {
});
};

describe('System Console', () => {
describe('LDAP Group Sync', () => {
before(() => {
// * Check if server has license for LDAP Groups
cy.apiRequireLicenseForFeature('LDAPGroups');

// Enable LDAP
cy.apiUpdateConfig({LdapSettings: {Enable: true}});

// # Check and run LDAP Sync job
if (Cypress.env('runLDAPSync')) {
cy.checkRunLDAPSync();
}
// # Test LDAP configuration and server connection
// # Synchronize user attributes
cy.apiLDAPTest();
cy.apiLDAPSync();
});

it('MM-20058 - System Admin can map roles to teams and channels via group configuration page', () => {
it('MM-T2668 Team admin role can be set and saved', () => {
// # Go to system admin page and to team configuration page
cy.visit('/admin_console/user_management/groups');
cy.get('#developers_group').then((el) => {
Expand Down

0 comments on commit 8d7fc85

Please sign in to comment.