Skip to content

Fix Python and JavaScript (Karma) tests for Problem XBlock#151

Open
irtazaakram wants to merge 3 commits intoproblemblockfrom
fix-problemblock
Open

Fix Python and JavaScript (Karma) tests for Problem XBlock#151
irtazaakram wants to merge 3 commits intoproblemblockfrom
fix-problemblock

Conversation

@irtazaakram
Copy link
Member

Summary

This PR fixes the Python and JavaScript (Karma) tests for the newly extracted Problem (CAPA) XBlock.

Context

What Changed

  • Python Tests: Fixed import paths and module references in tests/ to align with the new directory structure.
  • Javascript Tests: Added Karma configuration and Webpack config.
  • Setup: Changed how xblocks-contribute is installed by requiring npm build.

Notes

  • Pylint cleanup and documentation updates are out of scope for this PR and will be addressed in a follow-up contribution.
  • The primary goal of this PR is to get the test suite green to unblock integration.

@irtazaakram irtazaakram changed the title fix: python & javascript tests Fix Python and JavaScript (Karma) tests for Problem Xblock Feb 3, 2026
@irtazaakram irtazaakram changed the title Fix Python and JavaScript (Karma) tests for Problem Xblock Fix Python and JavaScript (Karma) tests for Problem XBlock Feb 3, 2026
@irtazaakram irtazaakram self-assigned this Feb 3, 2026
@irtazaakram irtazaakram moved this to 👀 In review in Aximprovements Team Feb 3, 2026
@kdmccormick kdmccormick self-requested a review February 4, 2026 14:16
- name: Install npm dependencies
run: npm ci
run: npm install
Copy link
Contributor

Choose a reason for hiding this comment

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

any specific reason of using npm install, ideally we should use npm ci for CI.


- name: Build JavaScript bundles
run: |
npm install
Copy link
Contributor

Choose a reason for hiding this comment

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

minimize: false
},
mode: 'development',
devtool: 'source-map'
Copy link
Contributor

Choose a reason for hiding this comment

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

For production this should be false, so ideally we should add different configuration files for dev and prod.

"scripts": {
"test": "npm run test --workspaces",
"test:ci": "npm run test:ci --workspaces"
"build": "npm run build --workspaces",
Copy link
Contributor

Choose a reason for hiding this comment

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

ideally separate script should be available like build-dev and build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

2 participants