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

Cypress/E2E: Fix bot accounts disabled section verification #6894

Merged
merged 5 commits into from
Oct 23, 2020

Conversation

josephbaylon
Copy link
Contributor

Summary

  • Fixed bot accounts disabled section verification

Ticket Link

NA

Screen Shot 2020-10-22 at 1 11 06 PM

@josephbaylon josephbaylon added the 3: QA Review Requires review by a QA tester label Oct 22, 2020
Copy link
Member

@saturninoabril saturninoabril left a comment

Choose a reason for hiding this comment

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

Thanks @josephbaylon! LGTM, except for one failing test on me.

@@ -133,7 +133,7 @@ describe('Managing bot accounts', () => {
cy.visit('/login');

// # Enter bot name in the email field
cy.findByPlaceholderText('Email, Username or AD/LDAP Username', {timeout: TIMEOUTS.ONE_MIN}).clear().type(botName);
cy.findByPlaceholderText('Email or Username', {timeout: TIMEOUTS.ONE_MIN}).clear().type(botName);
Copy link
Member

Choose a reason for hiding this comment

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

This failed on me since LDAP is enabled at partial_default_config.json.

Copy link
Member

Choose a reason for hiding this comment

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

Good to have: cy.apiAdminLogin() at L148 should move to beforeEach so that failed test here will not cause to fail other succeeding tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  1. I removed the extra cy.apiAdminLogin at L148 since it's already present in beforeEach
  2. I ran the tests without license since it's not enterprise. Can you try that locally and see if you still get the LDAP issue?

Copy link
Member

Choose a reason for hiding this comment

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

I see but I suggest to make this spec pass both for EE and TE since we can't make this TE only.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just moved that particular test case to enterprise without having to add additional test case in tm4j

Copy link
Member

Choose a reason for hiding this comment

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

Thanks! Now I'm thinking about the conditional test that Rohitesh mentioned before, and something like this might make sense in doing so. But I'm good with the latest change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well the thing is that case is about bot account not being able to login. The placeholder having different value for EE and TE is outside that case. There should be a new case just testing the placeholder values

Copy link
Member

Choose a reason for hiding this comment

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

I understand, my only concern is the test should be able to run both for TE and EE. With the latest change, we'll not be able to run in TE since it's marked as @enterprise only and required license to test.

Copy link
Member

@saturninoabril saturninoabril left a comment

Choose a reason for hiding this comment

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

Thanks @josephbaylon, LGTM!

Copy link
Contributor

@srkgupta srkgupta left a comment

Choose a reason for hiding this comment

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

Thanks @josephbaylon. Tested and passed.

@srkgupta srkgupta added 4: Reviews Complete All reviewers have approved the pull request and removed 3: QA Review Requires review by a QA tester labels Oct 23, 2020
@srkgupta srkgupta merged commit 7024db9 into mattermost:master Oct 23, 2020
@josephbaylon josephbaylon deleted the fix-managing-bot-accounts branch October 23, 2020 16:06
@amyblais amyblais added Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation labels Oct 23, 2020
calebroseland pushed a commit that referenced this pull request Oct 27, 2020
* Cypress/E2E: Fix disabled bot accounts section verification

* Remove extra cy.apiAdminLogin

* Moved cy.apiAdminLogin to top of beforeEach

* Moved bot cannot login case to enterprise

* Moved function to bottom
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
4: Reviews Complete All reviewers have approved the pull request Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation
Projects
None yet
4 participants