Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(schema): add Pending status to JSON schema #2425

Merged
merged 14 commits into from
Apr 14, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/elements/src/components/file/file.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ export class FileComponent extends LitElement {
MutantStatus.Timeout,
MutantStatus.CompileError,
MutantStatus.RuntimeError,
MutantStatus.Pending,
]
.filter((status) => this.model.mutants.some((mutant) => mutant.status === status))
.map((status) => ({
Expand Down
3 changes: 3 additions & 0 deletions packages/elements/src/lib/html-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export function getContextClassForStatus(status: MutantStatus) {
return 'warning';
case MutantStatus.Ignored:
case MutantStatus.RuntimeError:
case MutantStatus.Pending: // For now
rouke-broersma marked this conversation as resolved.
Show resolved Hide resolved
case MutantStatus.CompileError:
return 'secondary';
}
Expand Down Expand Up @@ -82,6 +83,8 @@ export function getEmojiForStatus(status: MutantStatus) {
return renderEmoji('👽', status);
case MutantStatus.Timeout:
return renderEmoji('⌛', status);
case MutantStatus.Pending:
return renderEmoji('⏳', status);
rouke-broersma marked this conversation as resolved.
Show resolved Hide resolved
case MutantStatus.RuntimeError:
case MutantStatus.CompileError:
return renderEmoji('💥', status);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ object circe {
case MutantStatus.CompileError => "CompileError"
case MutantStatus.RuntimeError => "RuntimeError"
case MutantStatus.Ignored => "Ignored"
case MutantStatus.Pending => "Pending"
})

implicit lazy val testDefinitionCodec: Codec[TestDefinition] =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ object MutantStatus {
case object CompileError extends MutantStatus
case object RuntimeError extends MutantStatus
case object Ignored extends MutantStatus
case object Pending extends MutantStatus

}
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"type": "string",
"title": "MutantStatus",
"description": "Result of the mutation.",
"enum": ["Killed", "Survived", "NoCoverage", "CompileError", "RuntimeError", "Timeout", "Ignored"]
"enum": ["Killed", "Survived", "NoCoverage", "CompileError", "RuntimeError", "Timeout", "Ignored", "Pending"]
},
"statusReason": {
"type": "string",
Expand Down