Commit e5f7e784 authored by Xander Miller's avatar Xander Miller

(test): adds spec for editing channel profile

1 merge request!644WIP: Test/new e2e
Pipeline #94184999 running with stages
// UX Elements
const channelEditButton = ".m-channel--edit-button-wrapper button > span:contains('Edit')"
const channelNameInput = ".m-channel--name--editor > input"
const channelDescriptionTextArea = ".mdl-card__supporting-text > textarea"
const channelSaveButton = ".m-channel--edit-button-wrapper button > span:contains('Save')"
context.only('Edit Channel Profile', () => {
before(() => {
cy.getCookie('minds_sess')
.then((sessionCookie) => {
if (sessionCookie === null) {
return cy.login(true);
}
});
});
beforeEach(()=> {
cy.preserveCookies();
});
it('should be able to edit simple fields', () => {
cy.visit(`/${Cypress.env().username}`);
cy.get(channelEditButton)
.click();
// edit channel name
cy.get(channelNameInput).clear().type('The Lion Tamer');
// edit channel description
cy.get(channelDescriptionTextArea).clear().type('A channel that tames all the lions.');
// submit changes
cy.get(channelSaveButton)
.click();
});
});
\ No newline at end of file
Please register or to comment