-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Conversation
@@ -17,7 +17,7 @@ describe('Account Settings > Display > Channel Display Mode', () => { | |||
|
|||
// Post a message to a channel | |||
cy.visit('/'); | |||
cy.postMessage('Test for channel display mode {enter}'); | |||
cy.postMessage('Test for channel display mode'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: update the correct usage of cy.postMessage
where the text param don't need to add {enter}
since the command itself is doing it already.
cy.get('#manageMembers').should('be.visible'); | ||
cy.get('#manageMembers').click(); | ||
cy.get('#viewMembers').should('be.visible'); | ||
cy.get('#viewMembers').click(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
user-1
by default don't have a permission to manage members on sample team/channel and so just use viewMembers
@@ -230,6 +230,8 @@ describe('at-mention', () => { | |||
cy.get('@postMessageText'). | |||
find(`[data-mention=${receiver.username}]`). | |||
should('not.exist'); | |||
|
|||
cy.get('#sidebarItem_saepe-5').scrollIntoView().click({force: true}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Added missing step
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another nit, no need to scroll into view if we are forcing the click.
@@ -311,7 +312,7 @@ Cypress.Commands.add('minDisplaySettings', () => { | |||
cy.get('#collapseTitle').should('be.visible', 'contain', 'Default appearance of image previews'); | |||
cy.get('#collapseEdit').should('be.visible', 'contain', 'Edit'); | |||
|
|||
cy.get('#message_displayTitle').should('be.visible', 'contain', 'Message Display'); | |||
cy.get('#message_displayTitle').scrollIntoView().should('be.visible', 'contain', 'Message Display'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Message display is out of the window, and so it needs to scroll into view.
|
||
return Client4.createPost(options); | ||
return {status: response.status, data: response.data, error: response.error}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not totally sure why postMessageAs is not working as expected. I just removed the use of Client4
; let's observe if it will pass on daily test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mattermost-redux changes perhaps? I haven't looked at recent commits, but I think it's totally fine for us to use the API directly, ultimately that's what the client is doing. This way we have more control over the requests as well. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so as the current mattermost-redux is working locally but let's eliminate potential issue by going thru API call directly.
cy.get('#help_link').should('contain', 'Help'); | ||
cy.get('#help_link').should('have.attr', 'href', 'https://about.mattermost.com/default-help/'); | ||
cy.get('#help_link').should('have.attr', 'href', config.SupportSettings.HelpLink); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is failing since cypress server has different config for SiteName
and so, it's safe to use data from config instead of hard-coded values.
cy.apiCreateTeam('test-team', 'Test Team').then((response) => { | ||
testTeam = response.body; | ||
cy.visit(`/${testTeam.name}`); | ||
cy.loginAsNewUser().then(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think having to use .then()
should be necessary, but maybe I'm missing something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not totally sure about this but let's try and observe.
@@ -230,6 +230,8 @@ describe('at-mention', () => { | |||
cy.get('@postMessageText'). | |||
find(`[data-mention=${receiver.username}]`). | |||
should('not.exist'); | |||
|
|||
cy.get('#sidebarItem_saepe-5').scrollIntoView().click({force: true}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another nit, no need to scroll into view if we are forcing the click.
|
||
return Client4.createPost(options); | ||
return {status: response.status, data: response.data, error: response.error}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mattermost-redux changes perhaps? I haven't looked at recent commits, but I think it's totally fine for us to use the API directly, ultimately that's what the client is doing. This way we have more control over the requests as well. 👍
Summary
Fix E2E flaky tests
Ticket Link
none