-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[MM-23937] Add e2e tests for group mentions #5530
[MM-23937] Add e2e tests for group mentions #5530
Conversation
Modify IDs and use snake_case instead of PascalCase for ids
@@ -44,8 +44,7 @@ export default class GroupProfile extends React.PureComponent { | |||
</div> | |||
<input | |||
type='text' | |||
id={customID} | |||
className='form-control group_at_mention_input' | |||
className='form-control group-at-mention-input' |
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 change is unrelated to the test but it just made sense to change the class to not be snake case since we always use hyphen case for class names
components/admin_console/group_settings/group_details/group_profile_and_settings.jsx
Outdated
Show resolved
Hide resolved
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.
@fmunshi Overall looks good, except for some comments to prevent flakiness. Thanks for adding E2E!
components/admin_console/group_settings/group_details/group_profile_and_settings.jsx
Outdated
Show resolved
Hide resolved
e2e/cypress/integration/enterprise/ldap_group/group_mentions_spec.js
Outdated
Show resolved
Hide resolved
e2e/cypress/integration/enterprise/ldap_group/group_mentions_spec.js
Outdated
Show resolved
Hide resolved
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.
Thanks for updating. Tested and passed.
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.
Thanks @fmunshi. Overall the test looks great. Just a small observation.
// # Login as sysadmin and navigate to system scheme page | ||
cy.apiLogin('sysadmin'); | ||
cy.visit('/admin_console/user_management/permissions/system_scheme'); | ||
|
||
// # Click reset to defaults confirm and save | ||
cy.findByTestId('resetPermissionsToDefault').click(); | ||
cy.get('#confirmModalButton').click(); | ||
saveConfig(); |
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.
Can you please add this in the after block (or) afterEach block instead of adding it at the end of the test. This is because the specified steps to reset the System permissions may get skipped if the test fails in between. However if its included in the after block, the steps will definitely be executed.
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.
done
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.
Retested and the changes LGTM. Approving the PR. @fmunshi please resolve the merge conflicts and merge the PR. Thanks.
@fmunshi
|
* Add e2e tests for group mentions Modify IDs and use snake_case instead of PascalCase for ids * Test from recieving user perspective too * Update last snapshot * Fixes from review * Last review changes * camelCase instead of snake * Reset permissions before and after group mentions test * Fix linting
* Add e2e tests for group mentions Modify IDs and use snake_case instead of PascalCase for ids * Test from recieving user perspective too * Update last snapshot * Fixes from review * Last review changes * camelCase instead of snake * Reset permissions before and after group mentions test * Fix linting
* Add e2e tests for group mentions Modify IDs and use snake_case instead of PascalCase for ids * Test from recieving user perspective too * Update last snapshot * Fixes from review * Last review changes * camelCase instead of snake * Reset permissions before and after group mentions test * Fix linting
Summary
Adds e2e tests for group mentions.
The following two assertions run for two different tests, once to enable and disable the allow reference switch and once to enable and disable the group mentions permission on a regular user while keeping the group allow reference enabled
To test whether a group mention is enabled the tests assert the following:
To test that a group mention is disabled the tests assert the following:
Ticket Link