Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hide unwanted "Search Messages" section in security settings #468

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
22 changes: 22 additions & 0 deletions cypress/e2e/settings/security.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
describe('Check settings customization', () => {
const homeserverUrl = Cypress.env('E2E_TEST_USER_HOMESERVER_URL');
const email = Cypress.env('E2E_TEST_USER_EMAIL');
const password = Cypress.env('E2E_TEST_USER_PASSWORD');

beforeEach(() => {
cy.loginUser(homeserverUrl, email, password);
});

it('show security configs without the things we dont like', () => {
cy.get(".mx_UserMenu_userAvatar").click();
cy.get('[aria-label="Sécurité et vie privée"]').click();

/**
* The section "Recherche de message" has been deleted, it was between "Sauvegarde automatique des messages" and "Signature croisée"
* https://github.com/tchapgouv/tchap-web-v4/issues/466
* see res/themes/tchap-common/css/_tchap_custom.pcss
*/
cy.get(':nth-child(4) > :nth-child(1) > .mx_SettingsTab_subheading').should("contain", "Sauvegarde automatique des messages");
cy.get(':nth-child(3) > .mx_SettingsTab_subheading').should("contain", "Signature croisée");
})
})
5 changes: 5 additions & 0 deletions res/themes/tchap-common/css/_tchap_custom.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,9 @@
/* hide the passphrase option in the setup options of the secure storage */
#mx_Dialog_StaticContainer > div > div.mx_Dialog > div.mx_CreateSecretStorageDialog > div:nth-child(2) > form > div.mx_CreateSecretStorageDialog_primaryContainer > label:nth-child(2) {
display: none;
}

/* hide the "Recherche de message" section in security user settings */
div.mx_SettingsTab.mx_SecurityUserSettingsTab > div:nth-child(4) > div:nth-child(2){
display: none;
}