Skip to content

Migrate Device transfer modal tests to Vue Testing Library#14563

Open
soaebhasan12 wants to merge 22 commits into
learningequality:developfrom
soaebhasan12:develop
Open

Migrate Device transfer modal tests to Vue Testing Library#14563
soaebhasan12 wants to merge 22 commits into
learningequality:developfrom
soaebhasan12:develop

Conversation

@soaebhasan12
Copy link
Copy Markdown

@soaebhasan12 soaebhasan12 commented Apr 9, 2026

Summary

Migrated two test files from @vue/test-utils to Vue Testing Library
as described in issue #14263:

  • SelectDriveModal.spec.js — 9 tests migrated
  • SelectTransferSourceModal.spec.js — 2 tests migrated

Changes made:

  • Replaced mount with render from @testing-library/vue
  • Replaced internal element queries with user-facing queries
    (getByText, queryByText, getAllByRole, getByRole, getByTestId)
  • Removed all @vue/test-utils imports
  • Rewrote makeWrapper as renderComponent following the pattern
    in CoreMenuOption.spec.js

Verified all tests pass:

pnpm run test-jest -- --testPathPattern device
Test Suites: 19 passed, 19 total
Tests: 461 passed, 461 total

References

Closes #14263

Reviewer guidance

Run the following command to verify all tests pass:

pnpm run test-jest -- --testPathPattern device

The main files changed are:

  • kolibri/plugins/device/frontend/views/__tests__/SelectDriveModal.spec.js
  • kolibri/plugins/device/frontend/views/__tests__/SelectTransferSourceModal.spec.js

No other files were modified.

AI usage

I used Claude (AI assistant) to support this contribution.

Disclose: I used Claude to understand Vue Testing Library concepts
and the difference between @vue/test-utils and VTL patterns.

Engage critically: I did not use AI output directly. For each test,
I analyzed what the original test was asserting, then chose the
appropriate VTL query based on Testing Library's query priority
guidelines. For example:

  • Used getAllByRole('radio') instead of CSS selectors to count drives
  • Used getByRole('button', { name: 'Continue' }) instead of
    find('button[name="submit"]')
  • Used getByText for visible text assertions instead of
    component-internal checks

Edit: I removed makeWrapper, getElements, and unnecessary stubs.
I also discovered that passing the Vuex store directly via store:
option worked correctly, while global: { plugins: [store] } did not
— I debugged this by reading error messages and testing different
approaches.

Process sharing: I referenced CoreMenuOption.spec.js as the
pattern guide mentioned in the issue, and used Claude to clarify
concepts when stuck. All final decisions on test structure and
assertions were made by me after reading the Testing Library docs.

I reviewed every test carefully to make sure it reflects real user
interactions — for example, using getByText to find visible text
instead of CSS classes, and getByRole('button') instead of
find('button[name="submit"]').

I ran the full test suite to verify nothing was broken.

@github-actions github-actions Bot added APP: Device Re: Device App (content import/export, facility-syncing, user permissions, etc.) DEV: frontend SIZE: medium labels Apr 9, 2026
@learning-equality-bot
Copy link
Copy Markdown

👋 Hi @soaebhasan12, thanks for contributing!

For the review process to begin, please verify that the following is satisfied:

  • Contribution is aligned with our contributing guidelines

  • Pull request description has correctly filled AI usage section & follows our AI guidance:

    AI guidance

    State explicitly whether you didn't use or used AI & how.

    If you used it, ensure that the PR is aligned with Using AI as well as our DEEP framework. DEEP asks you:

    • Disclose — Be open about when you've used AI for support.
    • Engage critically — Question what is generated. Review code for correctness and unnecessary complexity.
    • Edit — Review and refine AI output. Remove unnecessary code and verify it still works after your edits.
    • Process sharing — Explain how you used the AI so others can learn.

    Examples of good disclosures:

    "I used Claude Code to implement the component, prompting it to follow the pattern in ComponentX. I reviewed the generated code, removed unnecessary error handling, and verified the tests pass."

    "I brainstormed the approach with Gemini, then had it write failing tests for the feature. After reviewing the tests, I used Claude Code to generate the implementation. I refactored the output to reduce verbosity and ran the full test suite."

Also check that issue requirements are satisfied & you ran pre-commit locally.

Pull requests that don't follow the guidelines will be closed.

Reviewer assignment can take up to 2 weeks.

@soaebhasan12
Copy link
Copy Markdown
Author

👋 Hi @soaebhasan12, thanks for contributing!

For the review process to begin, please verify that the following is satisfied:

  • Contribution is aligned with our contributing guidelines

  • Pull request description has correctly filled AI usage section & follows our AI guidance:

    AI guidance

    State explicitly whether you didn't use or used AI & how.
    If you used it, ensure that the PR is aligned with Using AI as well as our DEEP framework. DEEP asks you:

    • Disclose — Be open about when you've used AI for support.
    • Engage critically — Question what is generated. Review code for correctness and unnecessary complexity.
    • Edit — Review and refine AI output. Remove unnecessary code and verify it still works after your edits.
    • Process sharing — Explain how you used the AI so others can learn.

    Examples of good disclosures:

    "I used Claude Code to implement the component, prompting it to follow the pattern in ComponentX. I reviewed the generated code, removed unnecessary error handling, and verified the tests pass."

    "I brainstormed the approach with Gemini, then had it write failing tests for the feature. After reviewing the tests, I used Claude Code to generate the implementation. I refactored the output to reduce verbosity and ran the full test suite."

Also check that issue requirements are satisfied & you ran pre-commit locally.

Pull requests that don't follow the guidelines will be closed.

Reviewer assignment can take up to 2 weeks.

@soaebhasan12
Copy link
Copy Markdown
Author

closed by mistake...

@soaebhasan12 soaebhasan12 reopened this Apr 9, 2026
@akolson akolson requested a review from rtibblesbot April 10, 2026 06:48
@learning-equality-bot
Copy link
Copy Markdown

📢✨ Before we assign a reviewer, we'll turn on @rtibblesbot to pre-review. Its comments are generated by an LLM, and should be evaluated accordingly.

Copy link
Copy Markdown
Contributor

@rtibblesbot rtibblesbot left a comment

Choose a reason for hiding this comment

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

Clean migration — both files are free of @vue/test-utils, tests use semantic VTL queries, and the pattern matches CoreMenuOption.spec.js. CI is mostly pending but no failures.

  • suggestion: count-only radio assertion in SelectDriveModal (see inline)
  • suggestion: two removed tests leave a coverage gap for the primary selection interaction
  • praise: getByRole('button', { name: 'Continue' }) + toBeDisabled() is good; stubs in SelectTransferSourceModal are well-reasoned

@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly

How was this generated?

Reviewed the pull request diff checking for:

  • Correctness: bugs, edge cases, undocumented behavior, resource leaks, hardcoded values
  • Design: unnecessary complexity, naming, readability, comment accuracy, redundant state
  • Architecture: duplicated concerns, minimal interfaces, composition over inheritance
  • Testing: behavior-based assertions, mocks only at hard boundaries, accurate coverage
  • Completeness: missing dependencies, unupdated usages, i18n, accessibility, security
  • Principles: DRY (same reason to change), SRP, Rule of Three (no premature abstraction)
  • Checked CI status and linked issue acceptance criteria
  • For UI changes: inspected screenshots for layout, visual completeness, and consistency

Comment thread kolibri/plugins/device/frontend/views/__tests__/SelectDriveModal.spec.js Outdated
Comment thread kolibri/plugins/device/frontend/views/__tests__/SelectDriveModal.spec.js Outdated
Comment thread kolibri/plugins/device/frontend/views/__tests__/SelectTransferSourceModal.spec.js Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

@rtibblesbot rtibblesbot left a comment

Choose a reason for hiding this comment

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

No new code changes since the prior review — only a develop merge commit that doesn't touch the test files. Re-raising two unaddressed suggestions below.

CI passing.

Prior findings

Unaddressed (re-raised below):

  • Radio count doesn't verify which drives are shown (suggestion) — no reply, no code change
  • Two coverage gaps: "Continue" enabled on selection, "Cancel" event (suggestion) — no reply, no code change

0/2 prior suggestions resolved. 2 re-raised below.


@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly

How was this generated?

Compared the current PR state against findings from a prior review:

  • Retrieved prior bot reviews deterministically via the GitHub API
  • Classified each prior finding as RESOLVED, UNADDRESSED, ACKNOWLEDGED, or CONTESTED
  • Only raised NEW findings for newly introduced code
  • Reviewed the pull request diff checking for correctness, design, architecture, testing, completeness, and adherence to DRY/SRP principles
  • Checked CI status and linked issue acceptance criteria
  • For UI changes: inspected screenshots for layout, visual completeness, and consistency

Comment thread kolibri/plugins/device/frontend/views/__tests__/SelectDriveModal.spec.js Outdated
Copy link
Copy Markdown
Contributor

@rtibblesbot rtibblesbot left a comment

Choose a reason for hiding this comment

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

Prior suggestions addressed; one nitpick on the new commit.

CI passing. Phase 3 skipped — no UI files changed.

Prior findings

N prior findings unchanged (2 from initial review, still resolved).

Newly resolved:

  • Radio count doesn't verify which drives are shown (suggestion) ← was UNADDRESSED — getByText assertion added at SelectDriveModal.spec.js:77
  • Missing test for drive-selected enables Continue (suggestion) ← was UNADDRESSED — test added at SelectDriveModal.spec.js:131

2/2 prior findings resolved. 0 re-raised below.


Findings:

  • 1 nitpick (inline)
  • 1 praise (inline)

@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly

How was this generated?

Compared the current PR state against findings from a prior review:

  • Retrieved prior bot reviews deterministically via the GitHub API
  • Classified each prior finding as RESOLVED, UNADDRESSED, ACKNOWLEDGED, or CONTESTED
  • Only raised NEW findings for newly introduced code
  • Reviewed the pull request diff checking for correctness, design, architecture, testing, completeness, and adherence to DRY/SRP principles
  • Checked CI status and linked issue acceptance criteria

Comment thread kolibri/plugins/device/frontend/views/__tests__/SelectDriveModal.spec.js Outdated
Comment thread kolibri/plugins/device/frontend/views/__tests__/SelectDriveModal.spec.js Outdated
@akolson
Copy link
Copy Markdown
Member

akolson commented Apr 20, 2026

Hi @soaebhasan12! Looks like we have some conflicts! Could you please rebase and resolve them?

Copy link
Copy Markdown
Contributor

@rtibblesbot rtibblesbot left a comment

Choose a reason for hiding this comment

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

No new commits since the prior review. Re-raising one unaddressed nitpick.

CI passing. Phase 3 skipped — no UI files changed.

Prior findings

3 prior findings unchanged (2 suggestions resolved, 1 nitpick re-raised).

Still unaddressed (re-raised below):

  • async on "Continue" button is disabled test (nitpick) — no reply, no code change

@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly

How was this generated?

Compared the current PR state against findings from a prior review:

  • Retrieved prior bot reviews deterministically via the GitHub API
  • Classified each prior finding as RESOLVED, UNADDRESSED, ACKNOWLEDGED, or CONTESTED
  • Only raised NEW findings for newly introduced code
  • Reviewed the pull request diff checking for correctness, design, architecture, testing, completeness, and adherence to DRY/SRP principles
  • Checked CI status and linked issue acceptance criteria

cancelButton().trigger('click');
await wrapper.vm.$nextTick();
expect(wrapper.findComponent({ name: 'KModal' }).emitted().cancel).toHaveLength(1);
it('when no drive is selected, "Continue" button is disabled', async () => {
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.

nitpick: async is still unnecessary — no await inside this test body. Remove it to match the sync pattern of the other simple assertions in this suite (e.g., lines 64, 96, 105, 114).

@soaebhasan12
Copy link
Copy Markdown
Author

soaebhasan12 commented Apr 21, 2026

Hi @soaebhasan12! Looks like we have some conflicts! Could you please rebase and resolve them?

Hi @rtibbles, I have rebased and resolved the conflicts. The branch is now up to date with develop.

Copy link
Copy Markdown
Contributor

@rtibblesbot rtibblesbot left a comment

Choose a reason for hiding this comment

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

All prior findings now resolved.

CI passing. Phase 3 skipped — no UI files changed.

Prior findings

2 prior findings unchanged (both suggestions resolved since review 3).

Newly resolved:

  • async on "Continue button disabled" test (nitpick) ← was UNADDRESSED — removed in commit 75f1b32a7

3/3 prior findings resolved. None re-raised.


@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly

How was this generated?

Compared the current PR state against findings from a prior review:

  • Retrieved prior bot reviews deterministically via the GitHub API
  • Classified each prior finding as RESOLVED, UNADDRESSED, ACKNOWLEDGED, or CONTESTED
  • Only raised NEW findings for newly introduced code
  • Reviewed the pull request diff checking for correctness, design, architecture, testing, completeness, and adherence to DRY/SRP principles
  • Checked CI status and linked issue acceptance criteria

@MisRob
Copy link
Copy Markdown
Member

MisRob commented Apr 23, 2026

Hi @soaebhasan12. we've just merged few new conventions & related linting rules to develop (#14579). Would you please rebase one more time, run lint & fix if anything is reported? Here is guidance on how to fix reported errors:

@soaebhasan12
Copy link
Copy Markdown
Author

Hi @soaebhasan12. we've just merged few new conventions & related linting rules to develop (#14579). Would you please rebase one more time, run lint & fix if anything is reported? Here is guidance on how to fix reported errors:

Hi @MisRob, I have run the linter and found two types of errors:

  1. Hardcoded strings in SelectDriveModal.spec.js — The strings like 'Finding local drives…' come from $trs in SelectDriveModal.vue, which does not currently export a strings translator. Would it be appropriate to add export const strings = createTranslator(...) to SelectDriveModal.vue as part of this PR, similar to how PinAuthenticationModal.vue does it?

  2. Stubs in SelectTransferSourceModal.spec.js — The component renders either SelectImportSourceModal or SelectDriveModal based on pageName prop. Without stubs, these child components require their own store setup. What is the recommended approach here?

@akolson akolson requested review from akolson and removed request for AllanOXDi May 18, 2026 15:38
@akolson akolson assigned akolson and unassigned AllanOXDi May 18, 2026
Copy link
Copy Markdown
Member

@akolson akolson left a comment

Choose a reason for hiding this comment

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

HI @soaebhasan12! Great work on this pr this far! I've left a few comments for you to look into prior to being merged.

The main issue is the createTranslator exports added to source files — see inline comments.

Two other things:

  • The 'clicking "Continue" triggers a "go forward" action' test was deleted. It tested that goForwardFromSelectDriveModal is called with the right parameters — that's real behavior worth keeping.
  • In SelectTransferSourceModal, the SELECT_DRIVE test only checks that the import source UI isn't shown. It doesn't confirm the drive modal actually rendered.

import { TransferTypes } from 'kolibri-common/utils/syncTaskUtils';
import DriveList from './DriveList';

export const strings = createTranslator('SelectDriveModal', {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same — no changes needed here. Use createTranslator(SelectDriveModal.name, SelectDriveModal.$trs) in the test.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fixed — removed the export const strings from SelectDriveModal.vue. Now using createTranslator(SelectDriveModal.name, SelectDriveModal.$trs) in the test.

import { createTranslator } from 'kolibri/utils/i18n';
import { ContentSources } from '../../../constants';

export const strings = createTranslator('SelectImportSourceModal', {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same — use createTranslator(SelectImportSourceModal.name, SelectImportSourceModal.$trs) in the test.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fixed — removed the export const strings from SelectImportSourceModal.vue. Now using createTranslator(SelectImportSourceModal.name, SelectImportSourceModal.$trs) in the test.

Comment thread kolibri/plugins/device/frontend/views/__tests__/SelectDriveModal.spec.js Outdated
Copy link
Copy Markdown
Contributor

@rtibblesbot rtibblesbot left a comment

Choose a reason for hiding this comment

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

New commits after review 5's approval introduced a DRY violation in three source files, and two @akolson review concerns (May 20) remain unaddressed.

CI blocked on maintainer approval (action_required) — workflows haven't run on these commits yet. Phase 3 skipped — source file changes are script-only, no template or style changes.

Prior findings

All 3 prior findings unchanged (all resolved since review 5 APPROVE).


New findings:

  • 1 blocking (inline, DriveList.vue)
  • 2 suggestions (inline)
  • 1 praise (inline)

@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly

How was this generated?

Compared the current PR state against findings from a prior review:

  • Retrieved prior bot reviews deterministically via the GitHub API
  • Classified each prior finding as RESOLVED, UNADDRESSED, ACKNOWLEDGED, or CONTESTED
  • Only raised NEW findings for newly introduced code
  • Reviewed the pull request diff checking for correctness, design, architecture, testing, completeness, and adherence to DRY/SRP principles
  • Checked CI status and linked issue acceptance criteria

Comment thread kolibri/plugins/device/frontend/views/__tests__/SelectDriveModal.spec.js Outdated
@soaebhasan12
Copy link
Copy Markdown
Author

HI @soaebhasan12! Great work on this pr this far! I've left a few comments for you to look into prior to being merged.

The main issue is the createTranslator exports added to source files — see inline comments.

Two other things:

  • The 'clicking "Continue" triggers a "go forward" action' test was deleted. It tested that goForwardFromSelectDriveModal is called with the right parameters — that's real behavior worth keeping.
  • In SelectTransferSourceModal, the SELECT_DRIVE test only checks that the import source UI isn't shown. It doesn't confirm the drive modal actually rendered.

Hi @akolson, thanks for the review!

  1. Removed all export const strings = createTranslator(...) from source files (DriveList.vue, SelectDriveModal.vue, SelectImportSourceModal.vue). Tests now use createTranslator(Component.name, Component.$trs) directly.

  2. Re-added the clicking "Continue" triggers a "go forward" action test that verifies goForwardFromSelectDriveModal is called with the correct driveId and forExport parameters.

  3. Added a positive assertion in SelectTransferSourceModal for the SELECT_DRIVE test to confirm the drive modal title is rendered.

All 466 device tests pass.

Copy link
Copy Markdown
Contributor

@rtibblesbot rtibblesbot left a comment

Choose a reason for hiding this comment

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

All three prior findings resolved in the new commits. Two new issues appeared in the same commits — the blocking fix was incomplete.

CI blocked on maintainer approval (action_required — workflows haven't run yet). Phase 3 skipped — no UI files changed.

Prior findings

Newly resolved:

  • Exported translator strings duplicating $trs in source files (blocking) ← exports removed in commits fa53569, 33132f3, 07393e5
  • Misleading drive ID 'WRITABLE_IMPORTABLE_drive' for unwritable drive (suggestion) ← fixed to 'unwritable_drive' in 2f567b7
  • SELECT_DRIVE test missing positive assertion (suggestion) ← getByText(selectDrive$()) added in 3721cc2

3/3 prior findings resolved.


Findings:

  • 2 blocking (inline — SelectDriveModal.vue:52, SelectImportSourceModal.vue:43)
  • 1 nitpick (inline — SelectDriveModal.spec.js:152)
  • 1 praise (inline — SelectDriveModal.spec.js:162)

@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly

How was this generated?

Compared the current PR state against findings from a prior review:

  • Retrieved prior bot reviews deterministically via the GitHub API
  • Classified each prior finding as RESOLVED, UNADDRESSED, ACKNOWLEDGED, or CONTESTED
  • Only raised NEW findings for newly introduced code
  • Reviewed the pull request diff checking for correctness, design, architecture, testing, completeness, and adherence to DRY/SRP principles
  • Checked CI status and linked issue acceptance criteria

Comment thread kolibri/plugins/device/frontend/views/__tests__/SelectDriveModal.spec.js Outdated
Copy link
Copy Markdown
Contributor

@rtibblesbot rtibblesbot left a comment

Choose a reason for hiding this comment

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

All 3 findings from review 9 resolved in commit 2c5b767.

CI blocked on maintainer approval (action_required) — not test failures. Phase 3 skipped — no UI files changed.

Praise: The commit that addressed review 9 made exactly the three changes requested and nothing else — no scope creep, no unrelated cleanups. Surgical fixes build reviewer trust.

Prior findings

Newly resolved:

  • Unused createTranslator import in SelectDriveModal.vue (blocking) ← removed in 2c5b767
  • Unused createTranslator import in SelectImportSourceModal.vue (blocking) ← removed in 2c5b767
  • Non-English comment in SelectDriveModal.spec.js (nitpick) ← removed in 2c5b767

3/3 prior findings resolved. No new findings.


@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly

How was this generated?

Compared the current PR state against findings from a prior review:

  • Retrieved prior bot reviews deterministically via the GitHub API
  • Classified each prior finding as RESOLVED, UNADDRESSED, ACKNOWLEDGED, or CONTESTED
  • Only raised NEW findings for newly introduced code
  • Reviewed the pull request diff checking for correctness, design, architecture, testing, completeness, and adherence to DRY/SRP principles
  • Checked CI status and linked issue acceptance criteria

@akolson akolson requested a review from rtibblesbot May 25, 2026 11:28
@learning-equality-bot
Copy link
Copy Markdown

📢✨ Before we assign a reviewer, we'll turn on @rtibblesbot to pre-review. Its comments are generated by an LLM, and should be evaluated accordingly.

Copy link
Copy Markdown
Contributor

@rtibblesbot rtibblesbot left a comment

Choose a reason for hiding this comment

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

Re-confirming the prior approval — the only change since review 10 (approved 2026-05-23 on commit 2c5b767) is a formatting-only pre-commit.ci commit (bb8ab9e8): trailing whitespace removal, newlines at file ends, and line-length reformatting of two createTranslator calls in the spec files. No logic changes.

CI shows action_required on all checks — workflows are pending maintainer approval to run on the fork branch, unchanged from the previous review cycle. Phase 3 skipped — no UI files changed.

praise: The final test suite consistently uses createTranslator(Component.name, Component.$trs) to derive translated strings from the component under test, rather than hard-coding English strings. This means any string change will break tests at the source, not silently.

Prior findings

All findings from prior rounds remain resolved — status unchanged from review 10.

0/0 new findings on the formatting commit.


@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly

How was this generated?

Compared the current PR state against findings from a prior review:

  • Retrieved prior bot reviews deterministically via the GitHub API
  • Classified each prior finding as RESOLVED, UNADDRESSED, ACKNOWLEDGED, or CONTESTED
  • Only raised NEW findings for newly introduced code
  • Reviewed the pull request diff checking for correctness, design, architecture, testing, completeness, and adherence to DRY/SRP principles
  • Checked CI status and linked issue acceptance criteria

@akolson akolson self-requested a review May 25, 2026 11:57
cancelButton().trigger('click');
await wrapper.vm.$nextTick();
expect(wrapper.findComponent({ name: 'KModal' }).emitted().cancel).toHaveLength(1);
});
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What was the motivation for omitting this test? Based on the the cancel behavior, we could test that;

  1. a cancel event is emitted if in manageMode. This is the current test behaviour
  2. resetContentWizardState is called if not in manageMode. An addition to consider

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Added two cancel tests:

  1. clicking "Cancel" emits a cancel event when in manageMode
  2. clicking "Cancel" calls resetContentWizardState when not in manageMode

forExport: false,
});
goForwardSpy.mockRestore();
});
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could we add another test that verifies that a submit event is emitted if manageMode is true. The above test only verifies the behavior if manageMode is false

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Added a test that verifies a submit event is emitted with driveId when manageMode is true.

Copy link
Copy Markdown
Member

@akolson akolson left a comment

Choose a reason for hiding this comment

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

Hi @soaebhasan12! Great work on this pr and thanks for your persistence on it--It's looking great.

I've left some comments for your considerations after which we should merge this pr.
Thank you!

Copy link
Copy Markdown
Member

@akolson akolson left a comment

Choose a reason for hiding this comment

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

Great work @soaebhasan12! LGTM! Thank you!

@akolson akolson marked this pull request as draft May 26, 2026 16:32
@akolson akolson marked this pull request as ready for review May 26, 2026 16:33
@soaebhasan12
Copy link
Copy Markdown
Author

Great work @soaebhasan12! LGTM! Thank you!

Thanks, @akolson I appreciate the review.

@akolson
Copy link
Copy Markdown
Member

akolson commented May 27, 2026

Hi @soaebhasan12! Could you please rebase your branch onto the latest develop branch and push the updated changes? Thanks!

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

Labels

APP: Device Re: Device App (content import/export, facility-syncing, user permissions, etc.) DEV: frontend SIZE: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate Device transfer modal tests to Vue Testing Library

5 participants