mutation-testing-elements
Advanced tools
Comparing version 2.0.1 to 2.0.3
@@ -7,3 +7,3 @@ import { PropertyValues } from 'lit'; | ||
import { FileUnderTestModel, Metrics, MutationTestMetricsResult, TestFileModel, TestMetrics } from 'mutation-testing-metrics'; | ||
import { RealtimeElement } from '../realtime-element'; | ||
import { RealTimeElement } from '../real-time-element'; | ||
interface BaseContext { | ||
@@ -21,3 +21,3 @@ path: string[]; | ||
type Context = MutantContext | TestContext; | ||
export declare class MutationTestReportAppComponent extends RealtimeElement { | ||
export declare class MutationTestReportAppComponent extends RealTimeElement { | ||
report: MutationTestResult | undefined; | ||
@@ -29,3 +29,3 @@ rootModel: MutationTestMetricsResult | undefined; | ||
context: Context; | ||
path: ReadonlyArray<string>; | ||
path: readonly string[]; | ||
titlePostfix: string | undefined; | ||
@@ -32,0 +32,0 @@ theme?: string; |
@@ -7,2 +7,3 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
}; | ||
/* eslint-disable @typescript-eslint/no-unsafe-enum-comparison */ | ||
import { html, unsafeCSS, nothing } from 'lit'; | ||
@@ -13,3 +14,3 @@ import { customElement, property } from 'lit/decorators.js'; | ||
import { locationChange$, View } from '../../lib/router'; | ||
import { debounceTime, fromEvent } from 'rxjs'; | ||
import { fromEvent, sampleTime } from 'rxjs'; | ||
import theme from './theme.scss'; | ||
@@ -20,3 +21,3 @@ import { createCustomEvent } from '../../lib/custom-events'; | ||
import { mutantChanges } from '../../lib/mutant-changes'; | ||
import { RealtimeElement } from '../realtime-element'; | ||
import { RealTimeElement } from '../real-time-element'; | ||
/** | ||
@@ -30,3 +31,3 @@ * The report needs to be able to handle realtime updates, without any constraints. | ||
const UPDATE_CYCLE_TIME = 100; | ||
let MutationTestReportAppComponent = class MutationTestReportAppComponent extends RealtimeElement { | ||
export let MutationTestReportAppComponent = class MutationTestReportAppComponent extends RealTimeElement { | ||
constructor() { | ||
@@ -146,3 +147,3 @@ super(...arguments); | ||
const findResult = (root, path) => { | ||
return path.reduce((model, currentPathPart) => model && model.childResults.find((child) => child.name === currentPathPart), root); | ||
return path.reduce((model, currentPathPart) => model?.childResults.find((child) => child.name === currentPathPart), root); | ||
}; | ||
@@ -217,3 +218,3 @@ const path = this.path.slice(1); | ||
const applySubscription = fromEvent(this.source, 'mutant-tested') | ||
.pipe(debounceTime(UPDATE_CYCLE_TIME)) | ||
.pipe(sampleTime(UPDATE_CYCLE_TIME)) | ||
.subscribe(() => { | ||
@@ -252,3 +253,3 @@ this.applyChanges(); | ||
render() { | ||
if (this.context.result || this.errorMessage) { | ||
if (this.context.result ?? this.errorMessage) { | ||
return html ` | ||
@@ -258,6 +259,14 @@ <div class="container bg-white pb-4 font-sans text-gray-800 motion-safe:transition-max-width"> | ||
${this.renderErrorMessage()} | ||
<mte-theme-switch @theme-switch="${this.themeSwitch}" class="sticky top-offset z-20 float-right mx-4 pt-4" .theme="${this.theme}"> | ||
<mte-theme-switch @theme-switch="${this.themeSwitch}" class="sticky top-offset z-20 float-right pt-6" .theme="${this.theme}"> | ||
</mte-theme-switch> | ||
${this.renderTitle()} ${this.renderTabs()} | ||
<mte-breadcrumb .view="${this.context.view}" class="my-4" .path="${this.context.path}"></mte-breadcrumb> | ||
<mte-breadcrumb .view="${this.context.view}" .path="${this.context.path}"></mte-breadcrumb> | ||
<mte-result-status-bar | ||
.detected="${this.rootModel?.systemUnderTestMetrics.metrics.totalDetected}" | ||
.undetected="${this.rootModel?.systemUnderTestMetrics.metrics.totalUndetected}" | ||
.invalid="${this.rootModel?.systemUnderTestMetrics.metrics.totalInvalid}" | ||
.ignored="${this.rootModel?.systemUnderTestMetrics.metrics.ignored}" | ||
.pending="${this.rootModel?.systemUnderTestMetrics.metrics.pending}" | ||
.total="${this.rootModel?.systemUnderTestMetrics.metrics.totalMutants}" | ||
></mte-result-status-bar> | ||
${this.context.view === 'mutant' && this.context.result | ||
@@ -301,11 +310,11 @@ ? html `<mte-mutant-view | ||
].map(({ type, isActive, text }) => html `<li class="mr-2" role="presentation"> | ||
<a | ||
class="inline-block rounded-t-lg border-b-2 border-transparent p-4 transition-colors hover:border-gray-300 hover:bg-gray-200 hover:text-gray-700 aria-selected:border-b-[3px] aria-selected:border-primary-700 aria-selected:text-primary-on" | ||
role="tab" | ||
href="${toAbsoluteUrl(type)}" | ||
aria-selected="${isActive}" | ||
aria-controls="mte-${type}-view" | ||
>${text}</a | ||
> | ||
</li>`)} | ||
<a | ||
class="inline-block rounded-t-lg border-b-2 border-transparent p-4 transition-colors hover:border-gray-300 hover:bg-gray-200 hover:text-gray-700 aria-selected:border-b-[3px] aria-selected:border-primary-700 aria-selected:text-primary-on" | ||
role="tab" | ||
href="${toAbsoluteUrl(type)}" | ||
aria-selected="${isActive}" | ||
aria-controls="mte-${type}-view" | ||
>${text}</a | ||
> | ||
</li>`)} | ||
</ul> | ||
@@ -357,3 +366,2 @@ </nav> | ||
], MutationTestReportAppComponent); | ||
export { MutationTestReportAppComponent }; | ||
//# sourceMappingURL=app.component.js.map |
@@ -13,3 +13,3 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
import { tailwind } from '../style'; | ||
let MutationTestReportBreadcrumbComponent = class MutationTestReportBreadcrumbComponent extends LitElement { | ||
export let MutationTestReportBreadcrumbComponent = class MutationTestReportBreadcrumbComponent extends LitElement { | ||
get rootName() { | ||
@@ -24,3 +24,3 @@ switch (this.view) { | ||
render() { | ||
return html `<nav class="my-6 flex rounded-md border border-gray-200 bg-primary-100 px-5 py-3 text-gray-700" aria-label="Breadcrumb"> | ||
return html `<nav class="my-4 flex rounded-md border border-primary-600 bg-primary-100 p-3 text-gray-700" aria-label="Breadcrumb"> | ||
<ol class="inline-flex items-center"> | ||
@@ -48,3 +48,3 @@ ${this.path && this.path.length > 0 ? this.renderLink(this.rootName, []) : this.renderActiveItem(this.rootName)} | ||
return html `<li aria-current="page"> | ||
<span class="ml-1 text-sm font-medium text-gray-800 md:ml-2">${title}</span> | ||
<span class="ml-1 text-sm font-medium text-gray-800">${title}</span> | ||
</li> `; | ||
@@ -72,3 +72,2 @@ } | ||
], MutationTestReportBreadcrumbComponent); | ||
export { MutationTestReportBreadcrumbComponent }; | ||
//# sourceMappingURL=breadcrumb.js.map |
import { MutantModel } from 'mutation-testing-metrics'; | ||
import { DrawerMode } from '../drawer/drawer.component'; | ||
import { RealtimeElement } from '../realtime-element'; | ||
export declare class MutationTestReportDrawerMutant extends RealtimeElement { | ||
import { RealTimeElement } from '../real-time-element'; | ||
export declare class MutationTestReportDrawerMutant extends RealTimeElement { | ||
mutant?: MutantModel; | ||
@@ -6,0 +6,0 @@ mode: DrawerMode; |
@@ -14,5 +14,5 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
import { renderDetailLine, renderEmoji, renderSummaryContainer, renderSummaryLine } from './util'; | ||
import { RealtimeElement } from '../realtime-element'; | ||
import { RealTimeElement } from '../real-time-element'; | ||
const describeTest = (test) => `${test.name}${test.sourceFile && test.location ? ` (${describeLocation(test)})` : ''}`; | ||
let MutationTestReportDrawerMutant = class MutationTestReportDrawerMutant extends RealtimeElement { | ||
export let MutationTestReportDrawerMutant = class MutationTestReportDrawerMutant extends RealTimeElement { | ||
constructor() { | ||
@@ -23,3 +23,5 @@ super(...arguments); | ||
render() { | ||
return renderDrawer({ hasDetail: Boolean(this.mutant?.killedByTests?.length || this.mutant?.coveredByTests?.length), mode: this.mode }, renderIfPresent(this.mutant, (mutant) => html ` | ||
return renderDrawer( | ||
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- we want to coalesce on length 0 | ||
{ hasDetail: Boolean(this.mutant?.killedByTests?.length || this.mutant?.coveredByTests?.length), mode: this.mode }, renderIfPresent(this.mutant, (mutant) => html ` | ||
<span class="align-middle text-lg" slot="header" | ||
@@ -36,9 +38,9 @@ >${getEmojiForStatus(mutant.status)} ${mutant.mutatorName} ${mutant.status} | ||
? renderSummaryLine(html `${renderEmoji('🎯', 'killed')} Killed by: | ||
${this.mutant.killedByTests?.[0].name}${this.mutant.killedByTests.length > 1 ? `(and ${this.mutant.killedByTests.length - 1} more)` : ''}`) | ||
${this.mutant.killedByTests?.[0].name}${this.mutant.killedByTests.length > 1 ? `(and ${this.mutant.killedByTests.length - 1} more)` : ''}`) | ||
: nothing} | ||
${renderIf(this.mutant?.static, renderSummaryLine(html `${renderEmoji('🗿', 'static')} Static mutant`))} | ||
${renderIfPresent(this.mutant?.coveredByTests, (coveredTests) => renderSummaryLine(html `${renderEmoji('☂️', 'umbrella')} Covered by ${coveredTests.length} | ||
test${plural(coveredTests)}${this.mutant?.status === MutantStatus.Survived ? ' (yet still survived)' : ''}`))} | ||
${renderIf(this.mutant?.statusReason?.trim(), renderSummaryLine(html `${renderEmoji('🕵️', 'spy')} ${this.mutant.statusReason}`, `Reason for the ${this.mutant.status} status`))} | ||
${renderIfPresent(this.mutant?.description, (description) => renderSummaryLine(html `${renderEmoji('📖', 'book')} ${description}`))}`); | ||
${renderIf(this.mutant?.static, renderSummaryLine(html `${renderEmoji('🗿', 'static')} Static mutant`))} | ||
${renderIfPresent(this.mutant?.coveredByTests, (coveredTests) => renderSummaryLine(html `${renderEmoji('☂️', 'umbrella')} Covered by ${coveredTests.length} | ||
test${plural(coveredTests)}${this.mutant?.status === MutantStatus.Survived ? ' (yet still survived)' : ''}`))} | ||
${renderIf(this.mutant?.statusReason?.trim(), renderSummaryLine(html `${renderEmoji('🕵️', 'spy')} ${this.mutant.statusReason}`, `Reason for the ${this.mutant.status} status`))} | ||
${renderIfPresent(this.mutant?.description, (description) => renderSummaryLine(html `${renderEmoji('📖', 'book')} ${description}`))}`); | ||
} | ||
@@ -64,3 +66,2 @@ renderDetail() { | ||
], MutationTestReportDrawerMutant); | ||
export { MutationTestReportDrawerMutant }; | ||
//# sourceMappingURL=drawer-mutant.component.js.map |
import { html, nothing } from 'lit'; | ||
export const renderDetailLine = (title, content) => html `<li title=${title || nothing} class="my-3 rounded bg-white px-2 py-3 shadow">${content}</li>`; | ||
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- we want to coalesce on empty string | ||
export const renderSummaryLine = (content, title) => html `<p title=${title || nothing}>${content}</p>`; | ||
@@ -4,0 +5,0 @@ export const renderSummaryContainer = (content) => html `<div class="mb-6 mr-6 mt-2 flex flex-col gap-4">${content}</div>`; |
import { TestModel } from 'mutation-testing-metrics'; | ||
import { DrawerMode } from '../drawer/drawer.component'; | ||
import { RealtimeElement } from '../realtime-element'; | ||
export declare class MutationTestReportDrawerTestComponent extends RealtimeElement { | ||
import { RealTimeElement } from '../real-time-element'; | ||
export declare class MutationTestReportDrawerTestComponent extends RealTimeElement { | ||
test?: TestModel; | ||
@@ -6,0 +6,0 @@ mode: DrawerMode; |
@@ -14,5 +14,5 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
import { renderDrawer } from '../drawer/util'; | ||
import { RealtimeElement } from '../realtime-element'; | ||
import { RealTimeElement } from '../real-time-element'; | ||
const describeMutant = (mutant) => html `<code>${mutant.getMutatedLines()}</code> (${describeLocation(mutant)})`; | ||
let MutationTestReportDrawerTestComponent = class MutationTestReportDrawerTestComponent extends RealtimeElement { | ||
export let MutationTestReportDrawerTestComponent = class MutationTestReportDrawerTestComponent extends RealTimeElement { | ||
constructor() { | ||
@@ -23,3 +23,5 @@ super(...arguments); | ||
render() { | ||
return renderDrawer({ hasDetail: Boolean(this.test?.killedMutants?.length || this.test?.coveredMutants?.length), mode: this.mode }, renderIfPresent(this.test, (test) => html ` | ||
return renderDrawer( | ||
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- we want to coalesce on length 0 | ||
{ hasDetail: Boolean(this.test?.killedMutants?.length || this.test?.coveredMutants?.length), mode: this.mode }, renderIfPresent(this.test, (test) => html ` | ||
<span class="align-middle text-lg" slot="header" | ||
@@ -36,8 +38,8 @@ >${getEmojiForTestStatus(test.status)} ${test.name} [${test.status}] | ||
? renderSummaryLine(html `${renderEmoji('🎯', 'killed')} Killed: | ||
${describeMutant(this.test.killedMutants?.[0])}${this.test.killedMutants.length > 1 | ||
${describeMutant(this.test.killedMutants?.[0])}${this.test.killedMutants.length > 1 | ||
? html ` (and ${this.test.killedMutants.length - 1} more)` | ||
: ''}`) | ||
: nothing} | ||
${renderIfPresent(this.test?.coveredMutants, (coveredMutants) => renderSummaryLine(html `${renderEmoji('☂️', 'umbrella')} Covered ${coveredMutants.length} | ||
mutant${plural(coveredMutants)}${this.test?.status === TestStatus.Covering ? " (yet didn't kill any of them)" : ''}`))}`); | ||
${renderIfPresent(this.test?.coveredMutants, (coveredMutants) => renderSummaryLine(html `${renderEmoji('☂️', 'umbrella')} Covered ${coveredMutants.length} | ||
mutant${plural(coveredMutants)}${this.test?.status === TestStatus.Covering ? " (yet didn't kill any of them)" : ''}`))}`); | ||
} | ||
@@ -63,3 +65,2 @@ renderDetail() { | ||
], MutationTestReportDrawerTestComponent); | ||
export { MutationTestReportDrawerTestComponent }; | ||
//# sourceMappingURL=drawer-test.component.js.map |
@@ -14,3 +14,3 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
export const DRAWER_HALF_OPEN_SIZE = 120; | ||
let MutationTestReportDrawer = class MutationTestReportDrawer extends LitElement { | ||
export let MutationTestReportDrawer = class MutationTestReportDrawer extends LitElement { | ||
constructor() { | ||
@@ -47,3 +47,5 @@ super(...arguments); | ||
<slot name="header"></slot> | ||
${renderIf(this.hasDetail, html `<button data-testId="btnReadMoreToggle" class="ml-2 align-middle" @click="${this.toggleReadMore}">${this.toggleMoreLabel}</button>`)} | ||
${renderIf(this.hasDetail, html `<button data-testId="btnReadMoreToggle" class="ml-2 align-middle" @click="${this.toggleReadMore}" | ||
>${this.toggleMoreLabel}</button | ||
>`)} | ||
</h2> | ||
@@ -72,3 +74,2 @@ </header> | ||
], MutationTestReportDrawer); | ||
export { MutationTestReportDrawer }; | ||
//# sourceMappingURL=drawer.component.js.map |
@@ -12,3 +12,3 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
import { classMap } from 'lit/directives/class-map.js'; | ||
let MutationTestReportFileIconComponent = class MutationTestReportFileIconComponent extends LitElement { | ||
export let MutationTestReportFileIconComponent = class MutationTestReportFileIconComponent extends LitElement { | ||
get language() { | ||
@@ -65,3 +65,2 @@ return determineLanguage(this.fileName); | ||
], MutationTestReportFileIconComponent); | ||
export { MutationTestReportFileIconComponent }; | ||
//# sourceMappingURL=file-icon.component.js.map |
@@ -5,4 +5,4 @@ import { PropertyValues } from 'lit'; | ||
import { StateFilter } from '../state-filter/state-filter.component'; | ||
import { RealtimeElement } from '../realtime-element'; | ||
export declare class FileComponent extends RealtimeElement { | ||
import { RealTimeElement } from '../real-time-element'; | ||
export declare class FileComponent extends RealTimeElement { | ||
static styles: import("lit").CSSResult[]; | ||
@@ -9,0 +9,0 @@ filters: StateFilter<MutantStatus>[]; |
@@ -17,6 +17,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
import { renderDots, renderLine } from './util'; | ||
import { RealtimeElement } from '../realtime-element'; | ||
import { RealTimeElement } from '../real-time-element'; | ||
const diffOldClass = 'diff-old'; | ||
const diffNewClass = 'diff-new'; | ||
let FileComponent = class FileComponent extends RealtimeElement { | ||
export let FileComponent = class FileComponent extends RealTimeElement { | ||
constructor() { | ||
@@ -255,3 +255,2 @@ super(...arguments); | ||
], FileComponent); | ||
export { FileComponent }; | ||
function title(mutant) { | ||
@@ -258,0 +257,0 @@ return `${mutant.mutatorName} ${mutant.status}`; |
import { PropertyValues } from 'lit'; | ||
import { MetricsResult } from 'mutation-testing-metrics'; | ||
import { Thresholds } from 'mutation-testing-report-schema/api'; | ||
import { RealtimeElement } from '../realtime-element'; | ||
import { RealTimeElement } from '../real-time-element'; | ||
export type TableWidth = 'normal' | 'large'; | ||
@@ -18,3 +18,3 @@ export type ColumnCategory = 'percentage' | 'number'; | ||
} | ||
export declare class MutationTestReportTestMetricsTable<TFile, TMetric> extends RealtimeElement { | ||
export declare class MutationTestReportTestMetricsTable<TFile, TMetric> extends RealTimeElement { | ||
model?: MetricsResult<TFile, TMetric>; | ||
@@ -21,0 +21,0 @@ currentPath: string[]; |
@@ -14,4 +14,4 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
import { renderEmoji } from '../drawer-mutant/util'; | ||
import { RealtimeElement } from '../realtime-element'; | ||
let MutationTestReportTestMetricsTable = class MutationTestReportTestMetricsTable extends RealtimeElement { | ||
import { RealTimeElement } from '../real-time-element'; | ||
export let MutationTestReportTestMetricsTable = class MutationTestReportTestMetricsTable extends RealTimeElement { | ||
constructor() { | ||
@@ -185,3 +185,2 @@ super(...arguments); | ||
], MutationTestReportTestMetricsTable); | ||
export { MutationTestReportTestMetricsTable }; | ||
//# sourceMappingURL=metrics-table.component.js.map |
@@ -5,4 +5,4 @@ import { PropertyValues } from 'lit'; | ||
import { DrawerMode } from '../drawer/drawer.component'; | ||
import { RealtimeElement } from '../realtime-element'; | ||
export declare class MutationTestReportMutantViewComponent extends RealtimeElement { | ||
import { RealTimeElement } from '../real-time-element'; | ||
export declare class MutationTestReportMutantViewComponent extends RealTimeElement { | ||
drawerMode: DrawerMode; | ||
@@ -9,0 +9,0 @@ private selectedMutant?; |
@@ -11,4 +11,4 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
import style from './mutant-view.scss'; | ||
import { RealtimeElement } from '../realtime-element'; | ||
let MutationTestReportMutantViewComponent = class MutationTestReportMutantViewComponent extends RealtimeElement { | ||
import { RealTimeElement } from '../real-time-element'; | ||
export let MutationTestReportMutantViewComponent = class MutationTestReportMutantViewComponent extends RealTimeElement { | ||
constructor() { | ||
@@ -61,3 +61,2 @@ super(...arguments); | ||
], MutationTestReportMutantViewComponent); | ||
export { MutationTestReportMutantViewComponent }; | ||
const COLUMNS = [ | ||
@@ -64,0 +63,0 @@ { |
import { PropertyValues, TemplateResult } from 'lit'; | ||
import { RealtimeElement } from '../realtime-element'; | ||
import { RealTimeElement } from '../real-time-element'; | ||
export interface StateFilter<TStatus> { | ||
@@ -10,3 +10,3 @@ status: TStatus; | ||
} | ||
export declare class FileStateFilterComponent<TStatus extends string> extends RealtimeElement { | ||
export declare class FileStateFilterComponent<TStatus extends string> extends RealTimeElement { | ||
static styles: import("lit").CSSResult[]; | ||
@@ -13,0 +13,0 @@ filters?: StateFilter<TStatus>[]; |
@@ -14,4 +14,4 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
import style from './state-filter.scss'; | ||
import { RealtimeElement } from '../realtime-element'; | ||
let FileStateFilterComponent = class FileStateFilterComponent extends RealtimeElement { | ||
import { RealTimeElement } from '../real-time-element'; | ||
export let FileStateFilterComponent = class FileStateFilterComponent extends RealTimeElement { | ||
constructor() { | ||
@@ -42,3 +42,3 @@ super(...arguments); | ||
return html ` | ||
<div class="sticky top-offset z-10 my-1 flex flex-row bg-white py-4"> | ||
<div class="sticky top-offset z-10 flex flex-row bg-white py-6"> | ||
<div class="mr-3"> | ||
@@ -115,3 +115,2 @@ <button title="Previous" @click=${this.previous} type="button" class="step-button"> | ||
], FileStateFilterComponent); | ||
export { FileStateFilterComponent }; | ||
//# sourceMappingURL=state-filter.component.js.map |
import { PropertyValues } from 'lit'; | ||
import { TestFileModel, TestStatus } from 'mutation-testing-metrics'; | ||
import '../../style/prism-plugins'; | ||
import { RealtimeElement } from '../realtime-element'; | ||
export declare class TestFileComponent extends RealtimeElement { | ||
import { RealTimeElement } from '../real-time-element'; | ||
export declare class TestFileComponent extends RealTimeElement { | ||
static styles: import("lit").CSSResult[]; | ||
@@ -7,0 +7,0 @@ model: TestFileModel | undefined; |
@@ -18,4 +18,4 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
import { renderDots, renderLine } from '../file/util'; | ||
import { RealtimeElement } from '../realtime-element'; | ||
let TestFileComponent = class TestFileComponent extends RealtimeElement { | ||
import { RealTimeElement } from '../real-time-element'; | ||
export let TestFileComponent = class TestFileComponent extends RealTimeElement { | ||
constructor() { | ||
@@ -76,14 +76,14 @@ super(...arguments); | ||
${repeat(testsToRenderInTheList, (test) => test.id, (test) => html `<li class="my-3"> | ||
<button | ||
class="w-full rounded p-3 text-left hover:bg-gray-100 active:bg-gray-200" | ||
type="button" | ||
data-active="${this.selectedTest === test}" | ||
test-id="${test.id}" | ||
@click=${(ev) => { | ||
<button | ||
class="w-full rounded p-3 text-left hover:bg-gray-100 active:bg-gray-200" | ||
type="button" | ||
data-active="${this.selectedTest === test}" | ||
test-id="${test.id}" | ||
@click=${(ev) => { | ||
ev.stopPropagation(); | ||
this.toggleTest(test); | ||
}} | ||
>${getEmojiForTestStatus(test.status)} ${test.name} [${test.status}] | ||
</button> | ||
</li>`)} | ||
>${getEmojiForTestStatus(test.status)} ${test.name} [${test.status}] | ||
</button> | ||
</li>`)} | ||
</ul>`; | ||
@@ -195,3 +195,2 @@ } | ||
], TestFileComponent); | ||
export { TestFileComponent }; | ||
function title(test) { | ||
@@ -198,0 +197,0 @@ return `${test.name} (${test.status})`; |
import { PropertyValues } from 'lit'; | ||
import { MetricsResult, TestFileModel, TestMetrics } from 'mutation-testing-metrics'; | ||
import { DrawerMode } from '../drawer/drawer.component'; | ||
import { RealtimeElement } from '../realtime-element'; | ||
export declare class MutationTestReportTestViewComponent extends RealtimeElement { | ||
import { RealTimeElement } from '../real-time-element'; | ||
export declare class MutationTestReportTestViewComponent extends RealTimeElement { | ||
drawerMode: DrawerMode; | ||
@@ -7,0 +7,0 @@ result: MetricsResult<TestFileModel, TestMetrics>; |
@@ -11,4 +11,4 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
import style from './test-view.scss'; | ||
import { RealtimeElement } from '../realtime-element'; | ||
let MutationTestReportTestViewComponent = class MutationTestReportTestViewComponent extends RealtimeElement { | ||
import { RealTimeElement } from '../real-time-element'; | ||
export let MutationTestReportTestViewComponent = class MutationTestReportTestViewComponent extends RealTimeElement { | ||
constructor() { | ||
@@ -57,3 +57,2 @@ super(...arguments); | ||
], MutationTestReportTestViewComponent); | ||
export { MutationTestReportTestViewComponent }; | ||
const COLUMNS = [ | ||
@@ -60,0 +59,0 @@ { key: 'killing', label: 'Killing', tooltip: 'These tests killed at least one mutant', width: 'normal', category: 'number' }, |
@@ -12,3 +12,3 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
import style from './theme-switch.scss'; | ||
let MutationTestReportThemeSwitchComponent = class MutationTestReportThemeSwitchComponent extends LitElement { | ||
export let MutationTestReportThemeSwitchComponent = class MutationTestReportThemeSwitchComponent extends LitElement { | ||
constructor() { | ||
@@ -37,3 +37,2 @@ super(...arguments); | ||
], MutationTestReportThemeSwitchComponent); | ||
export { MutationTestReportThemeSwitchComponent }; | ||
//# sourceMappingURL=theme-switch.component.js.map |
@@ -10,3 +10,3 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
import { tailwind } from '../../style'; | ||
let MutationTestReportThemeSwitchComponent = class MutationTestReportThemeSwitchComponent extends LitElement { | ||
export let MutationTestReportThemeSwitchComponent = class MutationTestReportThemeSwitchComponent extends LitElement { | ||
render() { | ||
@@ -23,3 +23,2 @@ return html `<span class="cursor-help underline decoration-dotted" title="${this.title}"><slot></slot></span>`; | ||
], MutationTestReportThemeSwitchComponent); | ||
export { MutationTestReportThemeSwitchComponent }; | ||
//# sourceMappingURL=tooltip.component.js.map |
@@ -15,2 +15,3 @@ import './components/app/app.component'; | ||
import './components/tooltip/tooltip.component'; | ||
import './components/result-status-bar/result-status-bar'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -15,2 +15,3 @@ import './components/app/app.component'; | ||
import './components/tooltip/tooltip.component'; | ||
import './components/result-status-bar/result-status-bar'; | ||
//# sourceMappingURL=index.js.map |
@@ -299,6 +299,6 @@ import { highlight, languages } from 'prismjs/components/prism-core'; | ||
['true', 'false'].forEach((keyword) => { | ||
if (mutatedPart === keyword.substr(0, keyword.length - 1) && keyword[keyword.length - 1] === mutated[focusTo]) { | ||
if (mutatedPart === keyword.substr(0, keyword.length - 1) && keyword.endsWith(mutated[focusTo])) { | ||
focusTo++; | ||
} | ||
if (mutatedPart === keyword.substr(1, keyword.length) && keyword[0] === mutated[focusFrom - 1]) { | ||
if (mutatedPart === keyword.substr(1, keyword.length) && keyword.startsWith(mutated[focusFrom - 1])) { | ||
focusFrom--; | ||
@@ -305,0 +305,0 @@ } |
{ | ||
"name": "mutation-testing-elements", | ||
"version": "2.0.1", | ||
"version": "2.0.3", | ||
"description": "A suite of web components for a mutation testing report.", | ||
@@ -32,7 +32,7 @@ "unpkg": "dist/mutation-test-elements.js", | ||
"@types/prismjs": "^1.16.1", | ||
"mutation-testing-metrics": "2.0.1", | ||
"mutation-testing-report-schema": "2.0.1", | ||
"mutation-testing-metrics": "2.0.3", | ||
"mutation-testing-report-schema": "2.0.3", | ||
"prismjs": "^1.21.0" | ||
}, | ||
"gitHead": "b259a9b385a3faabbfcf278e255db5b7f6c6fca3" | ||
"gitHead": "ab01f017bd53bf5b0d737710a10d47ebe02a63ee" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
451017
117
3874
1