Skip to content

Commit

Permalink
ADM-841: [frontend] fix: show board configuration config in metrics s…
Browse files Browse the repository at this point in the history
…tep (#1111)

* ADM-841: [frontend] fix: show board configuration config in metrics step

* ADM-841: [frontend] fix: fix test

* ADM-841: [frontend] fix: rename field

* ADM-841: [frontend] fix: fix test
  • Loading branch information
neomgb authored Mar 5, 2024
1 parent a138df4 commit 92a6df0
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ describe('MetricsStep', () => {
setup();

expect(screen.getByText(CREWS_SETTING)).toBeInTheDocument();
expect(screen.queryByText(CYCLE_TIME_SETTINGS)).not.toBeInTheDocument();
expect(screen.queryByText(CYCLE_TIME_SETTINGS)).toBeInTheDocument();
expect(screen.queryByText(CLASSIFICATION_SETTING)).not.toBeInTheDocument();
expect(screen.getByText(REAL_DONE)).toBeInTheDocument();
});
Expand All @@ -88,7 +88,7 @@ describe('MetricsStep', () => {
setup();

expect(screen.getByText(CREWS_SETTING)).toBeInTheDocument();
expect(screen.queryByText(CYCLE_TIME_SETTINGS)).not.toBeInTheDocument();
expect(screen.queryByText(CYCLE_TIME_SETTINGS)).toBeInTheDocument();
expect(screen.queryByText(CLASSIFICATION_SETTING)).not.toBeInTheDocument();
expect(screen.queryByText(REAL_DONE)).not.toBeInTheDocument();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,12 @@ const fillMetricsPageDate = async () => {
store.dispatch(saveTargetFields([{ name: 'mockClassification', key: 'mockClassification', flag: true }]));
store.dispatch(saveUsers(['mockUsers']));
store.dispatch(saveDoneColumn(['Done', 'Canceled'])),
store.dispatch(updateCycleTimeSettings([{ name: 'TODO', value: 'To do' }]));
store.dispatch(
updateCycleTimeSettings([
{ column: 'Testing', status: 'testing', value: 'Done' },
{ column: 'Testing', status: 'test', value: 'Done' },
]),
);
store.dispatch(updateTreatFlagCardAsBlock(false)),
store.dispatch(
updateDeploymentFrequencySettings({ updateId: 0, label: 'organization', value: 'mock new organization' }),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe('Report Card', () => {
setup();

expect(screen.getByText(RETRY)).toBeInTheDocument();
expect(screen.getByText('Failed to get Github info, status: 404')).toBeInTheDocument();
expect(screen.getByText('Failed to get GitHub info, status: 404')).toBeInTheDocument();

await userEvent.click(screen.getByText(RETRY));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ describe('Report Step', () => {
setup(REQUIRED_DATA_LIST);

expect(addNotification).toBeCalledWith({
message: MESSAGE.FAILED_TO_GET_DATA('Github'),
message: MESSAGE.FAILED_TO_GET_DATA('GitHub'),
type: 'error',
});
});
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/containers/MetricsStep/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ const MetricsStep = () => {
<>
<Crews options={users} title={'Crew settings'} label={'Included Crews'} />

{requiredData.includes(REQUIRED_DATA.CYCLE_TIME) && <CycleTime />}
<CycleTime />

{isShowRealDone && (
<RealDone columns={jiraColumns} title={'Real done setting'} label={'Consider as Done'} />
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/containers/ReportStep/DoraMetrics/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ const DoraMetrics = ({

const getErrorMessage4Github = () =>
_.get(doraReport, ['reportMetricsError', 'sourceControlMetricsError'])
? `Failed to get Github info, status: ${_.get(doraReport, [
? `Failed to get GitHub info, status: ${_.get(doraReport, [
'reportMetricsError',
'sourceControlMetricsError',
'status',
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/containers/ReportStep/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ const ReportStep = ({ handleSave }: ReportStepProps) => {
setNotifications4SummaryPage((prevState) => [
...prevState,
{
message: MESSAGE.FAILED_TO_GET_DATA('Github'),
message: MESSAGE.FAILED_TO_GET_DATA('GitHub'),
type: 'error',
},
]);
Expand Down

0 comments on commit 92a6df0

Please sign in to comment.