Skip to content

Commit

Permalink
When adding multiple sources to one metric, the source names would no…
Browse files Browse the repository at this point in the history
…t be comma-separated in the sources column.

Fixes #10735.
  • Loading branch information
fniessink committed Jan 29, 2025
1 parent a434d5e commit 770bdb5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion components/frontend/src/measurement/MeasurementSources.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { SourceStatus } from "./SourceStatus"

export function MeasurementSources({ metric }) {
const sources = metric.latest_measurement?.sources ?? []
return sources.map((source) => [
return sources.map((source, index) => [
index > 0 && ", ",
<SourceStatus key={source.source_uuid} metric={metric} measurement_source={source} />,
])
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ it("renders multiple measurement sources", async () => {
sources: [{ source_uuid: "source_uuid1" }, { source_uuid: "source_uuid2" }],
},
)
expect(screen.getAllByText(/Source name 1/).length).toBe(1)
expect(screen.getAllByText(/Source name 2/).length).toBe(1)
expect(screen.getAllByText(/Source name 1, Source name 2/).length).toBe(1)
await expectNoAccessibilityViolations(container)
})
2 changes: 1 addition & 1 deletion components/frontend/src/subject/SubjectTableRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ export function SubjectTableRow({
)}
{nrDates === 1 && settings.hiddenColumns.excludes("status") && (
<TableCell>
<Typography sx={{ paddingLeft: "10px", fontSize: "24px" }}>
<Typography sx={{ paddingLeft: "6px", fontSize: "24px" }}>
<StatusIcon status={metric.status} statusStart={metric.status_start} />
</Typography>
</TableCell>
Expand Down
1 change: 1 addition & 0 deletions docs/src/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ If your currently installed *Quality-time* version is not the latest version, pl
### Fixed

- Fix accessibility issues found by the application test. Fixes [#6354](https://github.com/ICTU/quality-time/issues/6354).
- When adding multiple sources to one metric, the source names would not be comma-separated in the sources column. Fixes [#10735](https://github.com/ICTU/quality-time/issues/10735).

### Changed

Expand Down

0 comments on commit 770bdb5

Please sign in to comment.