diff --git a/src/components/PageDetails/DetailsDrawer.tsx b/src/components/PageDetails/DetailsDrawer.tsx
index f9d3297..f31a434 100644
--- a/src/components/PageDetails/DetailsDrawer.tsx
+++ b/src/components/PageDetails/DetailsDrawer.tsx
@@ -212,6 +212,11 @@ export function DetailsDrawer(props: DetailsDrawerProps) {
);
+ const noteWidget = !_.isEmpty(selectedTest?.note) && (
+
+ {selectedTest?.note}
+
+ );
const shouldShowError =
selectedTest?.status === 'error' ||
(!_.isNil(selectedTest?.waiver) && selectedTest?.error);
@@ -304,6 +309,7 @@ export function DetailsDrawer(props: DetailsDrawerProps) {
{descriptionWidget}
+ {noteWidget}
{contactWidget}
{errorAlert}
{failedAlert}
diff --git a/src/components/PageDetails/artifactTests.ts b/src/components/PageDetails/artifactTests.ts
index 21a3ae6..40d47b7 100644
--- a/src/components/PageDetails/artifactTests.ts
+++ b/src/components/PageDetails/artifactTests.ts
@@ -47,7 +47,11 @@ import {
isAChildBuildMsg,
getBrokerSchemaMsgBody,
} from '../../types';
-import { getMessageError, isResultWaivable } from '../../utils/utils';
+import {
+ getMessageError,
+ getMsgTestNote,
+ isResultWaivable,
+} from '../../utils/utils';
import { mkStagesAndStates } from '../../utils/stages_states';
function transformUmbStatus(stateName: StateName): TestStatus {
@@ -242,6 +246,7 @@ function transformTest(
): CiTest {
const docsUrl = getDocsUrl(aChild);
let error: MSG_V_1.MsgErrorType | undefined;
+ let note: string | undefined;
let logsUrl: string | undefined;
let messageId: string | undefined;
const name = getTestcaseName(aChild);
@@ -263,6 +268,7 @@ function transformTest(
waiver = aChild.waiver;
} else if (isAChildTestMsg(aChild)) {
const testMsg = getTestMsgBody(aChild);
+ note = getMsgTestNote(testMsg);
error = getMessageError(testMsg);
logsUrl = testMsg.run.log;
messageId = getMsgId(aChild);
@@ -270,6 +276,8 @@ function transformTest(
} else if (isAChildGreenwaveAndTestMsg(aChild)) {
const msgBody = getTestMsgBody(aChild.ms);
const msgId = getMsgId(aChild.ms);
+ const testMsg = getTestMsgBody(aChild.ms);
+ note = getMsgTestNote(testMsg);
logsUrl = msgBody.run.log;
runDetailsUrl = msgBody.run.url;
error = getMessageError(msgBody);
@@ -306,6 +314,7 @@ function transformTest(
return {
name: name || 'unknown',
+ note,
error,
status,
waiver,
diff --git a/src/components/PageDetails/types.ts b/src/components/PageDetails/types.ts
index 64fcfbb..006eb6c 100644
--- a/src/components/PageDetails/types.ts
+++ b/src/components/PageDetails/types.ts
@@ -47,6 +47,8 @@ export interface CiContact {
export interface CiTest {
name: string;
+ /* https://pagure.io/fedora-ci/messages/blob/master/f/schemas/test-common.yaml#_71 */
+ note?: string;
error?: MSG_V_1.MsgErrorType;
status: TestStatus;
waiver?: GreenwaveWaiveType;
diff --git a/src/utils/utils.tsx b/src/utils/utils.tsx
index c67dc3f..23fa132 100644
--- a/src/utils/utils.tsx
+++ b/src/utils/utils.tsx
@@ -1,7 +1,7 @@
/*
* This file is part of ciboard
- * Copyright (c) 2021, 2022, 2023 Andrei Stepanov
+ * Copyright (c) 2021, 2022, 2023, 2024 Andrei Stepanov
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -158,6 +158,16 @@ export const getMessageError = (brokerMsgBody: BrokerSchemaMsgBody) => {
}
};
+export const getMsgTestNote = (brokerMsgBody: BrokerSchemaMsgBody) => {
+ let note: string | undefined;
+ if (MSG_V_0_1.isMsg(brokerMsgBody)) {
+ note = brokerMsgBody.note;
+ } else if (MSG_V_1.isMsg(brokerMsgBody)) {
+ note = brokerMsgBody.test.note;
+ }
+ return note;
+};
+
export interface IconProps {
className: string;
icon: React.ComponentClass;