Skip to content

Conversation

@salman2013
Copy link
Contributor

@salman2013 salman2013 commented Oct 13, 2025

Description

Add Karma JS test for extracted video block.

This PR is pointing to Video block extraction #83 and will be merge in that, the scope we defined for this ticket was just to green Karma JS tests. All other tests will be fix in parent PR. #83

Parent PR: #83

Ticket: https://github.com/orgs/openedx/projects/55/views/1?pane=issue&itemId=133624767&issue=openedx%7Cedx-platform%7C37479

How to run Karma tests locally:

Install dependencies Requirements:

  • Install Node.js + npm
  • Install dependencies (npm install)
  • As the karma run tests on browser so make sure Firefox browser is installed on your machine, right now in this PR tests are running on Firefox with some customLaunchers configurations.

How to run karma tests:

  • Run npm run build-dev command to build webpack config in development mode.
  • Run npx karma start xmodule/js/karma_xmodule_webpack.conf.js --log-level debug --single-run to run tests.

We can run karma tests on tutor dev container by following steps:

Run container and install dependencies:

  1. tutor dev run --user root lms bash
  2. apt-get update
  3. apt-get install -y xvfb wget libgtk-3-0 libdbus-glib-1-2 libx11-xcb1 libxcomposite1 libxdamage1 libxrandr2 libasound2 libpangocairo-1.0-0 libnss3 libgconf-2-4 libxi6 libxrender1 libxtst6 libxss1
  4. wget "https://ftp.mozilla.org/pub/firefox/releases/142.0.1/linux-aarch64/en-US/firefox-142.0.1.tar.xz" -O firefox.tar.xz
  5. tar -xJf firefox.tar.xz
  6. mv firefox /opt/firefox
  7. ln -s /opt/firefox/firefox /usr/bin/firefox

How to run karma tests:
npm run test-xmodule-webpack

Note: I tested this PR by running karma tests outside container.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Oct 13, 2025
@openedx-webhooks
Copy link

openedx-webhooks commented Oct 13, 2025

Thanks for the pull request, @salman2013!

This repository is currently maintained by @openedx/axim-engineering.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are 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.

Details
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.

@github-project-automation github-project-automation bot moved this to Needs Triage in Contributions Oct 13, 2025
@salman2013 salman2013 closed this Oct 14, 2025
@salman2013 salman2013 reopened this Oct 14, 2025
@github-project-automation github-project-automation bot moved this from Needs Triage to Done in Contributions Oct 14, 2025
@salman2013 salman2013 closed this Oct 14, 2025
@salman2013 salman2013 reopened this Oct 14, 2025
@salman2013 salman2013 marked this pull request as ready for review October 14, 2025 10:53
@salman2013 salman2013 closed this Oct 16, 2025
@salman2013 salman2013 reopened this Oct 16, 2025
@salman2013 salman2013 closed this Oct 16, 2025
@salman2013 salman2013 reopened this Oct 16, 2025
@salman2013 salman2013 force-pushed the salman/karma-test-pr branch from 13364a6 to 61d6c4b Compare October 16, 2025 10:39
@salman2013 salman2013 requested review from a team, farhan, irtazaakram and ttqureshi and removed request for a team, farhan and irtazaakram October 16, 2025 10:43
@feanil
Copy link
Contributor

feanil commented Oct 21, 2025

Converting this to draft until the tests are fixed.

@feanil feanil marked this pull request as draft October 21, 2025 16:02
@salman2013
Copy link
Contributor Author

salman2013 commented Oct 21, 2025

@feanil Actually this PR is pointing to @farhan 's Video block extraction PR and will be merge in that, the scope we defined for this ticket was just to green Karma JS tests. All other tests will be fix in that PR. #83
I have updated the plan in PR description.

@feanil feanil marked this pull request as ready for review October 21, 2025 19:26
@feanil
Copy link
Contributor

feanil commented Oct 21, 2025

Ah, gotcha, sounds good, sorry, I missed that.

Copy link
Member

@irtazaakram irtazaakram left a comment

Choose a reason for hiding this comment

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

Approved with the context that only javascript tests are fixed in this PR.

@farhan farhan merged commit 30b31b0 into farhan/video-xblock-extraction Nov 4, 2025
3 of 11 checks passed
@farhan farhan deleted the salman/karma-test-pr branch November 4, 2025 11:26
@farhan farhan restored the salman/karma-test-pr branch November 4, 2025 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

6 participants