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

Fix another batch of failing e2e tests #3014

Merged
merged 1 commit into from
Jun 25, 2019
Merged

Fix another batch of failing e2e tests #3014

merged 1 commit into from
Jun 25, 2019

Conversation

saturninoabril
Copy link
Member

Summary

Fix another batch of failing e2e tests

Ticket Link

none

@saturninoabril saturninoabril added the 2: Dev Review Requires review by a core commiter label Jun 25, 2019
if (siteName) {
document.title = siteName;
}
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is failing on signup_spec since the document title is hardcoded to "Mattermost". Instead of removing "document title" check on /signup page, apply here the same implementation on /login page.

// Disable other auth options
const newSettings = {
Office365Settings: {Enable: false},
LdapSettings: {Enable: false},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is disabling the auth options we're using in the test server. I'm thinking to disable that on the test server config so that we'll not worry in doing this during local dev. But I'll leave it as is for the moment.

});
// * Verify that HTML Content is correct
cy.getLastPostId().then((postId) => {
cy.get(`#postMessageText_${postId}`, {timeout: TIMEOUTS.MEDIUM}).should('have.html', expectedHtml);
});
});
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Markdown tests for text and in-line images were separated. Intention is to separate the spec group in preparation for parallel testing.

cy.task('postMessageAs', {sender, message, channelId, createAt}).
its('status').
should('be.equal', 201);
});
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed this due to some Cypress priority when running a task; needed to find a way to better handle getting baseUrl. Besides, I found this confusing to include in api_command. I'm hoping to limit adding command in this file only to those with direct implementation of https://api.mattermost.com/.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine, I think we need to refactor our custom commands a bit. Added a note for our automation meeting to discuss.

@@ -14,5 +14,7 @@ import 'cypress-plugin-retries';
// Add login cookies to whitelist to preserve it
beforeEach(() => {
Cypress.Cookies.preserveOnce('MMAUTHTOKEN', 'MMUSERID', 'MMCSRF');

cy.apiUpdateConfig({TeamSettings: {MaxUsersPerTeam: 500}});
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good to have so we can re-use existing DB state without resetting.

cy.task('postMessageAs', {sender, message, channelId, createAt}).
its('status').
should('be.equal', 201);
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine, I think we need to refactor our custom commands a bit. Added a note for our automation meeting to discuss.

@saturninoabril saturninoabril merged commit bf76389 into mattermost:master Jun 25, 2019
@saturninoabril saturninoabril deleted the fix-e2e-2 branch June 25, 2019 14:56
@amyblais amyblais added Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation and removed 2: Dev Review Requires review by a core commiter labels Jun 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation
Projects
None yet
4 participants