Skip to content

Test case validation#29

Merged
arcuri82 merged 6 commits intomasterfrom
tc-validation
Apr 24, 2026
Merged

Test case validation#29
arcuri82 merged 6 commits intomasterfrom
tc-validation

Conversation

@omursahin
Copy link
Copy Markdown
Contributor

No description provided.

@omursahin omursahin requested a review from arcuri82 April 23, 2026 20:15

const stateBadgeClass = (state: ReviewState): string => {
switch (state) {
case "ACCEPTED":
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.

why is this using hard-code strings instead of accessing the enum ReviewState directly?

Comment thread web-report/src/pages/Tests.tsx Outdated

const counts = useMemo(() => {
const c: Record<ReviewState, number> = {
"NOT-REVIEWED": 0,
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.

i m seeing these hard-code strings in several places... shouldn't use an enum and access the enum to avoid duplication?

Comment thread web-report/src/pages/Tests.tsx Outdated
>
ALL ({testCases.length})
</button>
{REVIEW_STATES.filter(s => s !== "PREVIOUSLY-ACCEPTED" && s !== "PREVIOUSLY-REJECTED").map(s => (
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.

again, if we make any change to the name of these hard-code values, then many places around the code-base will break

Comment thread web-report/src/types/Review.ts Outdated
}

export const REVIEW_FILE_NAME = "report-review.json";
export const REVIEW_SCHEMA_VERSION = "1.0";
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.

i guess should use same version as WFC... at least for now, not going to have different version numbers that can evolve independently

Comment thread web-report/src/types/Review.ts Outdated
const out: Record<string, TestReview> = {};
for (const [id, r] of Object.entries(reviews)) {
const comment = (r.comment ?? "").trim();
if (r.state !== "NOT-REVIEWED" || comment !== "") {
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.

check all these hard-coded strings

@omursahin omursahin requested a review from arcuri82 April 24, 2026 07:16
@arcuri82 arcuri82 merged commit 21a6841 into master Apr 24, 2026
4 checks passed
@arcuri82 arcuri82 deleted the tc-validation branch April 24, 2026 07:20
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.

2 participants