Skip to content

fix: [FC-0070] fixing broken tests - #1493

Merged
arbrandes merged 1 commit into
openedx:masterfrom
raccoongang:Peter_Kulko/fixing-broken-tests
Nov 11, 2024
Merged

fix: [FC-0070] fixing broken tests#1493
arbrandes merged 1 commit into
openedx:masterfrom
raccoongang:Peter_Kulko/fixing-broken-tests

Conversation

@peterkulko

@peterkulko peterkulko commented Nov 10, 2024

Copy link
Copy Markdown
Contributor

Description

Fixing tests for library-authoring.

Supporting information

After the latest changes in the repository we have some tests related to the library functionality failing. This PR provides fixes for these tests.

@peterkulko
peterkulko requested a review from a team as a code owner November 10, 2024 16:21
@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Nov 10, 2024
@openedx-webhooks

openedx-webhooks commented Nov 10, 2024

Copy link
Copy Markdown

Thanks for the pull request, @PKulkoRaccoonGang!

What's next?

Please work through the following steps to get your changes ready for engineering review:

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.

🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads

🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

🔘 Let us know that your PR is ready for review:

Who will review my changes?

This repository is currently maintained by @openedx/2u-tnl. Tag them in a comment and let them know that your changes are ready for review.

Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@peterkulko peterkulko self-assigned this Nov 10, 2024
@peterkulko
peterkulko marked this pull request as draft November 10, 2024 16:29
@peterkulko
peterkulko force-pushed the Peter_Kulko/fixing-broken-tests branch from 87ad49b to f562963 Compare November 10, 2024 16:40
@peterkulko
peterkulko force-pushed the Peter_Kulko/fixing-broken-tests branch from f562963 to 86a9ef4 Compare November 10, 2024 16:51
@codecov

codecov Bot commented Nov 10, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.01%. Comparing base (d99e3f0) to head (86a9ef4).
Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1493      +/-   ##
==========================================
- Coverage   93.28%   93.01%   -0.28%     
==========================================
  Files        1052     1048       -4     
  Lines       20503    20480      -23     
  Branches     4385     4330      -55     
==========================================
- Hits        19126    19049      -77     
- Misses       1317     1363      +46     
- Partials       60       68       +8     

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

@peterkulko
peterkulko marked this pull request as ready for review November 11, 2024 08:35
@peterkulko peterkulko changed the title fix: fixing broken tests fix: [FC-0070] fixing broken tests Nov 11, 2024
@peterkulko
peterkulko requested a review from arbrandes November 11, 2024 09:59

@arbrandes arbrandes 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.

Thanks for the fixes!

@arbrandes
arbrandes merged commit 9b4cf87 into openedx:master Nov 11, 2024
@peterkulko peterkulko added the create-sandbox open-craft-grove should create a sandbox environment from this PR label Nov 12, 2024

@bradenmacdonald bradenmacdonald 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.

Hey guys, we had a simpler fix ready here: f43310a - what do you think?

Also, this PR has introduced several incorrect calls to initializeStore(). Can you please revert those?

beforeEach(() => {
beforeEach(async () => {
const mocks = initializeMocks();
store = initializeStore();

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.

We should not call initializeStore() after calling initializeMocks(); because initializeMocks is already initializing the store. Instead you can use const { reduxStore, ...mocks } = initializeMocks(); and then reduxStore is the store variable.

@bradenmacdonald

Copy link
Copy Markdown
Contributor

FYI @navinkarkera @pomegranited ^

@peterkulko

Copy link
Copy Markdown
Contributor Author

@bradenmacdonald Yes, based on this example I will refactor the tests related to getting getWaffleFlags. Thanks!

Arpit-Nakrani-Networked pushed a commit to Arpit-Nakrani-Networked/frontend-app-authoring that referenced this pull request Jul 13, 2025
Co-authored-by: abdullahwaheed <42172960+abdullahwaheed@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

create-sandbox open-craft-grove should create a sandbox environment from this PR open-source-contribution PR author is not from Axim or 2U

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants