mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
fix(e2e): several tests (#24539)
This commit is contained in:
parent
6f4382189f
commit
1fc6b96c1b
@ -130,10 +130,10 @@ describe('Authentication', () => {
|
||||
cy.get('.admin-console__header').should('be.visible').and('have.text', 'Password');
|
||||
|
||||
cy.findByTestId('passwordMinimumLengthinput').should('be.visible').and('have.value', '8');
|
||||
cy.findByLabelText('At least one lowercase letter').get('input').should('not.be.checked');
|
||||
cy.findByLabelText('At least one uppercase letter').get('input').should('not.be.checked');
|
||||
cy.findByLabelText('At least one number').get('input').should('not.be.checked');
|
||||
cy.findByLabelText('At least one symbol (e.g. "~!@#$%^&*()")').get('input').should('not.be.checked');
|
||||
cy.findByText('At least one lowercase letter').siblings().should('not.be.checked');
|
||||
cy.findByText('At least one uppercase letter').siblings().should('not.be.checked');
|
||||
cy.findByText('At least one number').siblings().should('not.be.checked');
|
||||
cy.findByText('At least one symbol (e.g. "~!@#$%^&*()")').siblings().should('not.be.checked');
|
||||
|
||||
if (!isCloudLicensed) {
|
||||
cy.findByTestId('maximumLoginAttemptsinput').should('be.visible').and('have.value', '10');
|
||||
|
@ -84,16 +84,18 @@ describe('Interactive Dialog', () => {
|
||||
if (index === 0) {
|
||||
expect(element.name).to.equal('someuserselector');
|
||||
cy.wrap($elForm).find('.suggestion-list__item').first().should('be.visible');
|
||||
cy.wrap($elForm).find('.form-control').type('{downarrow}'.repeat(10));
|
||||
cy.wrap($elForm).find('.form-control').type('{uparrow}', {force: true});
|
||||
cy.wrap($elForm).find('.form-control').type('{downarrow}'.repeat(10), {force: true});
|
||||
cy.wrap($elForm).find('.suggestion-list__item').first().should('not.be.visible');
|
||||
cy.wrap($elForm).find('.form-control').type('{uparrow}'.repeat(10));
|
||||
cy.wrap($elForm).find('.form-control').type('{uparrow}'.repeat(10), {force: true});
|
||||
cy.wrap($elForm).find('.suggestion-list__item').first().should('be.visible');
|
||||
} else if (index === 1) {
|
||||
expect(element.name).to.equal('somechannelselector');
|
||||
cy.wrap($elForm).find('.suggestion-list__item').first().should('be.visible');
|
||||
cy.wrap($elForm).find('.form-control').type('{downarrow}'.repeat(10));
|
||||
cy.wrap($elForm).find('.form-control').type('{uparrow}', {force: true});
|
||||
cy.wrap($elForm).find('.form-control').type('{downarrow}'.repeat(10), {force: true});
|
||||
cy.wrap($elForm).find('.suggestion-list__item').first().should('not.be.visible');
|
||||
cy.wrap($elForm).find('.form-control').type('{uparrow}'.repeat(10));
|
||||
cy.wrap($elForm).find('.form-control').type('{uparrow}'.repeat(10), {force: true});
|
||||
cy.wrap($elForm).find('.suggestion-list__item').first().should('be.visible');
|
||||
}
|
||||
|
||||
|
@ -29,12 +29,14 @@ describe('Keyboard Shortcuts', () => {
|
||||
cy.get('body').cmdOrCtrlShortcut('K');
|
||||
cy.get('#quickSwitchInput').type('T');
|
||||
|
||||
// * Confirm the town-square channel is selected in the suggestion list
|
||||
cy.get('#suggestionList').findByTestId('town-square').should('be.visible').and('have.class', 'suggestion--selected');
|
||||
|
||||
// # Press down arrow
|
||||
cy.wait(TIMEOUTS.HALF_SEC);
|
||||
cy.get('body').type('{downarrow}');
|
||||
cy.get('body').type('{downarrow}');
|
||||
|
||||
// * Confirm the offtopic channel is selected in the suggestion list
|
||||
// * Confirm the off-topic channel is selected in the suggestion list
|
||||
cy.get('#suggestionList').findByTestId('off-topic').should('be.visible').and('have.class', 'suggestion--selected');
|
||||
|
||||
// # Press ENTER
|
||||
|
@ -94,10 +94,8 @@ describe('Keyboard Shortcuts', () => {
|
||||
});
|
||||
|
||||
cy.getLastPostId().then((postId) => {
|
||||
// * verify Save not shown in webview
|
||||
cy.findByText('Save').should('not.exist');
|
||||
|
||||
cy.viewport('iphone-6');
|
||||
// * verify Saved not shown in webview
|
||||
cy.findByText('Saved').should('not.exist');
|
||||
|
||||
// # Save Post
|
||||
cy.uiPostDropdownMenuShortcut(postId, 'Save', 'S', 'RHS_ROOT');
|
||||
|
@ -42,6 +42,7 @@ describe('Messaging', () => {
|
||||
cy.apiCreateGroupChannel([firstUser.id, secondUser.id, thirdUser.id]).then(({channel}) => {
|
||||
// # Visit the newly created group message
|
||||
cy.visit(`/${testTeam.name}/channels/${channel.name}`);
|
||||
cy.postMessage('hello');
|
||||
|
||||
// # Go to off-topic
|
||||
cy.get('#sidebarItem_off-topic').click();
|
||||
|
@ -36,11 +36,11 @@ describe('Show GIF images properly', () => {
|
||||
cy.url().should('include', offtopiclink);
|
||||
|
||||
// # Post tenor GIF
|
||||
cy.postMessage('https://c.tenor.com/Ztva2YFROSkAAAAi/duck-searching.gif');
|
||||
cy.postMessage('https://media.tenor.com/yCFHzEvKa9MAAAAi/hello.gif');
|
||||
|
||||
cy.getLastPostId().as('postId').then((postId) => {
|
||||
// * Validate image size
|
||||
cy.get(`#post_${postId}`).find('.attachment__image').should('have.css', 'width', '137px');
|
||||
cy.get(`#post_${postId}`).find('.attachment__image').should('have.css', 'width', '189px');
|
||||
});
|
||||
|
||||
// # Post giphy GIF
|
||||
|
Loading…
Reference in New Issue
Block a user