Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update user count when discord role is removed #648

Open
wants to merge 17 commits into
base: develop
Choose a base branch
from

Conversation

PeeyushPrashant
Copy link

@PeeyushPrashant PeeyushPrashant commented Dec 16, 2023

Date: 16/12/2023

Developer Name: @PeeyushPrashant

Issue Closes #623

What is the change?

  • Update user count in realtime when user unsubscribe any discord role
  • Access the HTML element that wraps that particular role (one which user unsubscribe to) by using
    document.getElementById method .
  • Access the inner attribute (user count) of the element by using getAttribute method.
  • Check if the current count is not null and undefined. If true , decrease the count by 1.
  • feature under feature flag

Documentation Updated?

  • Yes
  • No

Breaking Changes

  • Yes
  • No

Development Tested?

  • Yes
  • No

Tested in Staging?

  • Yes
  • No

Under Feature Flag

  • Yes
  • No

Database Changes

  • Yes
  • No

Before & After Change Screenshots

screen-capture.4.webm

Test Coverage

Screenshot 2023-12-13 211709

Additional Notes

These tests are failing in dev branch as well, it has not happened because of my changes.

Copy link
Contributor

@Ajeyakrishna-k Ajeyakrishna-k left a comment

Choose a reason for hiding this comment

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

Please add a test to cover this case

@PeeyushPrashant
Copy link
Author

Done @Ajeyakrishna-k

@skv93-coder
Copy link
Contributor

Please add passing test snapshot for the particular test added in the PR.

await deleteRoleBtn.click();

// Now, check the user count
if (userCount != null) expect(userCount).toBe(userCount - 1);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why we need to check for userCount not being null and skip the the assertion.

@PeeyushPrashant
Copy link
Author

Please add passing test snapshot for the particular test added in the PR.

Tests (even those which were written earlier) are failing in my local environment (dev branch as well ), as I had mentioned to you earlier. Therefore I have not attached it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Discord group users count not updated when we remove the role
3 participants