Skip to content

test: added test cases of discussion restriction - #556

Merged
sundasnoreen12 merged 2 commits into
masterfrom
sundas/INF-829
Aug 15, 2023
Merged

test: added test cases of discussion restriction#556
sundasnoreen12 merged 2 commits into
masterfrom
sundas/INF-829

Conversation

@sundasnoreen12

@sundasnoreen12 sundasnoreen12 commented Aug 9, 2023

Copy link
Copy Markdown
Contributor

INF-829

Description

Added unit test for DiscussionsRestriction Component and openedx config form.

Following are the test cases:

  1. Successfully displayed three types of options for discussion restriction (off, on and scheduled)
  2. By default OFF option for discussion restriction is selected.
  3. Successfully selected ON option, when user will click on the ok button of the popup displays under ON option.
  4. Reselected OFF option when user will click on the cancel button of the popup displays under ON option.
  5. Successfully added new restricted dates under SCHEDULED option by clicking on add restricted dates
  6. Successfully removed the added restricted dates by clicking on the delete icon and then clicks on confirm button.
  7. Successfully retained the added restricted dates by clicking on the delete icon and then clicks on cancel button.
  8. Successfully displayed existing discussion restriction dates.
  9. Successfully Expand/Collapse discussion restriction dates container.

Test
Tested this via npm run test

@codecov

codecov Bot commented Aug 9, 2023

Copy link
Copy Markdown

Codecov Report

Patch coverage has no change and project coverage change: +3.05% 🎉

Comparison is base (bc05d2c) 81.32% compared to head (e067108) 84.38%.
Report is 7 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #556      +/-   ##
==========================================
+ Coverage   81.32%   84.38%   +3.05%     
==========================================
  Files         234      259      +25     
  Lines        3812     4245     +433     
  Branches      873      959      +86     
==========================================
+ Hits         3100     3582     +482     
+ Misses        675      639      -36     
+ Partials       37       24      -13     
Files Changed Coverage Δ
...-config-form/apps/shared/DiscussionRestriction.jsx 100.00% <ø> (+33.33%) ⬆️
...cussion-restrictions/DiscussionRestrictionItem.jsx 89.65% <ø> (+82.75%) ⬆️
...red/discussion-restrictions/RestrictDatesInput.jsx 100.00% <ø> (+81.25%) ⬆️
...d/discussion-restrictions/RestrictionSchedules.jsx 100.00% <ø> (+50.00%) ⬆️

... and 42 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@muhammadadeeltajamul muhammadadeeltajamul left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Rest looks good.

@sundasnoreen12
sundasnoreen12 merged commit fc21e22 into master Aug 15, 2023
@sundasnoreen12
sundasnoreen12 deleted the sundas/INF-829 branch August 15, 2023 09:38
peterkulko pushed a commit to raccoongang/frontend-app-course-authoring that referenced this pull request Aug 21, 2023
* test: added test cases of discussion restriction

* refactor: added null default value for dataTestId

---------

Co-authored-by: SundasNoreen <sundas.noreen@arbisoft.com>
wowkalucky pushed a commit to raccoongang/frontend-app-course-authoring that referenced this pull request Aug 22, 2023
* feat: configuration for xpert unit summaries (openedx#540)

Adds setting modal for Xpert unit summaries

Includes hiding the config section for xpert summary - 
this is done based on a flag from edx/ai-aside@3d113d2

* fix: load up-to-date config on studio fetch (openedx#548)

* refactor: added PropTypes declarations

* feat: add files and uploads page (openedx#541)

* fix: remove env variable for files and uploads (openedx#549)

* Update verbiage for Xpert Settings (openedx#550)

* chore: Update verbiage for Xpert configuration screen

* fix: Change "generate" to "display" in xpert modal text

* fix: Updated learn more link

* fix: Change link and add targets

* test: added test cases for hide discussion tab (openedx#552)

Co-authored-by: SundasNoreen <sundas.noreen@arbisoft.com>

* feat: upgrade frontend-lib-content-components (openedx#554)

* feat: bump frontend-lib-content-components (openedx#559)

* fix: Change wording to not crowd xpert tile in preferences page (openedx#560)

* fix: width and height of asset preview (openedx#558)

* feat: flcc to 1.168.0 (openedx#561)

* feat: bump frontend-lib-content-components (openedx#562)

* fix: overflow-y scroll behavior (openedx#565)

* test: added test cases of discussion restriction (openedx#556)

* test: added test cases of discussion restriction

* refactor: added null default value for dataTestId

---------

Co-authored-by: SundasNoreen <sundas.noreen@arbisoft.com>

* fix: Add enabled badge to xpert settings tile  (openedx#566)

* feat: Add "Enabled" badge to xpert settings tile

* fix: Update model with state instead of non-existent prop from response

* feat: bump frontend-lib-content-components (openedx#569)

* feat: Added Schedule and Details MFE page (openedx#547)

* refactor: some refactoring

---------

Co-authored-by: David Nuon <davidnuongm@gmail.com>
Co-authored-by: Zachary Hancock <zhancock@edx.org>
Co-authored-by: Kristin Aoki <42981026+KristinAoki@users.noreply.github.com>
Co-authored-by: sundasnoreen12 <72802712+sundasnoreen12@users.noreply.github.com>
Co-authored-by: SundasNoreen <sundas.noreen@arbisoft.com>
Co-authored-by: Raymond Zhou <56318341+rayzhou-bit@users.noreply.github.com>
Co-authored-by: ruzniaievdm <ruzniaievdm@gmail.com>
wowkalucky pushed a commit to raccoongang/frontend-app-course-authoring that referenced this pull request Aug 23, 2023
* feat: moving new commits from upstream repository (#62)

* feat: configuration for xpert unit summaries (openedx#540)

Adds setting modal for Xpert unit summaries

Includes hiding the config section for xpert summary - 
this is done based on a flag from edx/ai-aside@3d113d2

* fix: load up-to-date config on studio fetch (openedx#548)

* refactor: added PropTypes declarations

* feat: add files and uploads page (openedx#541)

* fix: remove env variable for files and uploads (openedx#549)

* Update verbiage for Xpert Settings (openedx#550)

* chore: Update verbiage for Xpert configuration screen

* fix: Change "generate" to "display" in xpert modal text

* fix: Updated learn more link

* fix: Change link and add targets

* test: added test cases for hide discussion tab (openedx#552)

Co-authored-by: SundasNoreen <sundas.noreen@arbisoft.com>

* feat: upgrade frontend-lib-content-components (openedx#554)

* feat: bump frontend-lib-content-components (openedx#559)

* fix: Change wording to not crowd xpert tile in preferences page (openedx#560)

* fix: width and height of asset preview (openedx#558)

* feat: flcc to 1.168.0 (openedx#561)

* feat: bump frontend-lib-content-components (openedx#562)

* fix: overflow-y scroll behavior (openedx#565)

* test: added test cases of discussion restriction (openedx#556)

* test: added test cases of discussion restriction

* refactor: added null default value for dataTestId

---------

Co-authored-by: SundasNoreen <sundas.noreen@arbisoft.com>

* fix: Add enabled badge to xpert settings tile  (openedx#566)

* feat: Add "Enabled" badge to xpert settings tile

* fix: Update model with state instead of non-existent prop from response

* feat: bump frontend-lib-content-components (openedx#569)

* feat: Added Schedule and Details MFE page (openedx#547)

* refactor: some refactoring

---------

Co-authored-by: David Nuon <davidnuongm@gmail.com>
Co-authored-by: Zachary Hancock <zhancock@edx.org>
Co-authored-by: Kristin Aoki <42981026+KristinAoki@users.noreply.github.com>
Co-authored-by: sundasnoreen12 <72802712+sundasnoreen12@users.noreply.github.com>
Co-authored-by: SundasNoreen <sundas.noreen@arbisoft.com>
Co-authored-by: Raymond Zhou <56318341+rayzhou-bit@users.noreply.github.com>
Co-authored-by: ruzniaievdm <ruzniaievdm@gmail.com>

* fix: Course updates - wrong datepicker value (#65)

* fix: [2u-631] fixed date checking

* fix: [2u-631] fixed validation schema

* fix: [2u-631] fixed indents

* feat: Course outline - Section highlights (#60)

* feat: [2u-336] add tests

* feat: [2u-271] fix button

* feat: [2u-336] add component, refactor header

* feat: [2u-342] add modal

* fix: [2u-342] fix translates and indents

* feat: [2u-342] add modal

* feat: [2u-342] add api

* feat: [2u-342] add tests and translates

* feat: [2u-342] fix indents

* fix: [2u-342] fix indents, variant and utils

* feat: [2u-342] fixed slice, thunks, hooks

* fix: [2u-342] fix translates

* fix: [2u-342] fix api

---------

Co-authored-by: Vladislav Keblysh <vladislavkeblysh@Vladislavs-MacBook-Pro.local>

* feat: create organization filter on home page

---------

Co-authored-by: Peter Kulko <93188219+PKulkoRaccoonGang@users.noreply.github.com>
Co-authored-by: David Nuon <davidnuongm@gmail.com>
Co-authored-by: Zachary Hancock <zhancock@edx.org>
Co-authored-by: Kristin Aoki <42981026+KristinAoki@users.noreply.github.com>
Co-authored-by: sundasnoreen12 <72802712+sundasnoreen12@users.noreply.github.com>
Co-authored-by: SundasNoreen <sundas.noreen@arbisoft.com>
Co-authored-by: Raymond Zhou <56318341+rayzhou-bit@users.noreply.github.com>
Co-authored-by: vladislavkeblysh <138868841+vladislavkeblysh@users.noreply.github.com>
Co-authored-by: Vladislav Keblysh <vladislavkeblysh@Vladislavs-MacBook-Pro.local>
snglth pushed a commit to Abstract-Tech/community-theme-course-authoring that referenced this pull request Jan 9, 2024
* test: added test cases of discussion restriction

* refactor: added null default value for dataTestId

---------

Co-authored-by: SundasNoreen <sundas.noreen@arbisoft.com>
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.

5 participants