Skip to content

[OA][Fullstack]: 270/assessment test runner#284

Merged
LOTaher merged 6 commits into
mainfrom
270/assessment-test-runner
Apr 11, 2026
Merged

[OA][Fullstack]: 270/assessment test runner#284
LOTaher merged 6 commits into
mainfrom
270/assessment-test-runner

Conversation

@cherman23
Copy link
Copy Markdown
Collaborator

@cherman23 cherman23 commented Apr 10, 2026

[OA][Fullstack] - Assessment Test Runner

Changes

Connects useTestRunner to frontend components. Made some additional changes to the test hook to make it possible.

Edit (laith):

  • Updated code stub generation to generate translation code to run stubbed function
  • Updated endpoint to normalize new line characters in the "Input" and "Output" fields of tests for visibility and consistency to the client.
  • Updated seed data to mock the behaviors above

Notes

The API returns the tests in the same order they were received. The current frontend implementation requires that we send all public tests first due to how the TestCasePanel was implemented to show the tests. This might be something we want to revisit, given it could easily break things if changed.

Checklist

Please go through all items before requesting reviewers:

  • All commits are tagged with the ticket number
  • No linting errors / newline warnings
  • All code follows repository-configured formatting
  • No merge conflicts
  • All checks passing
  • Screenshots included for UI changes
  • Remove non-applicable sections of this template
  • PR assigned to yourself
  • Reviewers requested & Slack ping sent
  • PR linked to the issue (fill in 'Closes #')
  • If design-related, notify the designer in Slack

Closes

Closes #270

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sarge Ready Ready Preview, Comment Apr 10, 2026 9:36pm

Request Review

@cherman23 cherman23 force-pushed the 270/assessment-test-runner branch from 4082c0c to 8f349b9 Compare April 10, 2026 03:00
@cherman23 cherman23 force-pushed the 270/assessment-test-runner branch from 8f349b9 to 3dd0118 Compare April 10, 2026 03:01
@cherman23 cherman23 marked this pull request as ready for review April 10, 2026 03:02
const { runEditPageTests } = useTestRunner();

const handleRunTests = (tests: TestCaseDTO[]) => {
const code = getEditorContent();
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Are we still saving the code with updateCode somewhere? We should be making sure that this is the case.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

wait disregard this I didnt realize it was the edit page

const taskTemplate = await TaskTemplateService.getTaskTemplate(
taskTemplateId,
'TODO: REPLACE THIS LATER LAITH WITH COOKIE'
'org_nextlab_001' // lmk if we want this to stay as the TODO
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Did you see this boss?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yes! Let's keep it this way for now. I fear this requires a bit more brain power then I can provide before showcase

return SIMPLE_TYPE_ALIASES[language][lowerType];
}

function toStdoutFunction(
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is crazy work man good job

@LOTaher LOTaher merged commit 59fb93c into main Apr 11, 2026
4 checks passed
Anzhuo-W pushed a commit that referenced this pull request Apr 12, 2026
* feat(270): Connect frontend to test runners

* fix reset state

* QoL fix

* test runner edits and general cleanup

* lint

* update function names

---------

Co-authored-by: Laith Taher <lotaher04@gmail.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.

[CRM/OA][Frontend] - Test Running Status and Results

2 participants