-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
118 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { describe, expect, it } from 'vitest' | ||
|
||
import CriterionSwitch from '@/components/SeqvarDetails/ClinsigCard/CriterionSwitch.vue' | ||
import { | ||
AcmgCriteria, | ||
AcmgEvidenceLevel, | ||
MultiSourceAcmgCriteriaState, | ||
Presence, | ||
StateSource | ||
} from '@/lib/acmgSeqVar' | ||
import { setupMountedComponents } from '@/lib/test-utils' | ||
|
||
describe.concurrent('CriterionSwitch', async () => { | ||
it('renders the CriterionSwitch', async () => { | ||
const acmgRating = new MultiSourceAcmgCriteriaState() | ||
acmgRating.setPresence(StateSource.User, AcmgCriteria.Pm1, Presence.Present) | ||
const { wrapper } = await setupMountedComponents( | ||
{ component: CriterionSwitch, template: false }, | ||
{ | ||
props: { | ||
acmgRating: acmgRating, | ||
criteria: AcmgCriteria.Pm1, | ||
criteriaState: { | ||
criteria: AcmgCriteria.Pm1, | ||
presence: Presence.Present, | ||
evidenceLevel: AcmgEvidenceLevel.PathogenicModerate | ||
} | ||
} | ||
} | ||
) | ||
|
||
expect(wrapper.text()).contains('Pm1') | ||
expect(wrapper.text()).contains('Pathogenic Moderate') | ||
const vSwitch = wrapper.findComponent({ name: 'VSwitch' }) | ||
const vTooltip = wrapper.findComponent({ name: 'VTooltip' }) | ||
const vSelect = wrapper.findComponent({ name: 'VSelect' }) | ||
expect(vSwitch.exists()).toBe(true) | ||
expect(vTooltip.exists()).toBe(true) | ||
expect(vSelect.exists()).toBe(true) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { describe, expect, it } from 'vitest' | ||
|
||
import SummarySheet from '@/components/SeqvarDetails/ClinsigCard/SummarySheet.vue' | ||
import { setupMountedComponents } from '@/lib/test-utils' | ||
|
||
describe.concurrent('SummarySheet', async () => { | ||
it('renders the SummarySheet', async () => { | ||
const { wrapper } = await setupMountedComponents( | ||
{ component: SummarySheet, template: false }, | ||
{ | ||
props: { | ||
calculatedAcmgClass: 'Pathogenic' | ||
} | ||
} | ||
) | ||
|
||
expect(wrapper.text()).contains('Semi-Automated ACMG Pathogenicity Prediction') | ||
expect(wrapper.text()).contains('Pathogenic') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters