diff --git a/front/assets/js/flaky_tests/components/flaky_test_row.tsx b/front/assets/js/flaky_tests/components/flaky_test_row.tsx index 2440725c6..6b59be102 100644 --- a/front/assets/js/flaky_tests/components/flaky_test_row.tsx +++ b/front/assets/js/flaky_tests/components/flaky_test_row.tsx @@ -7,7 +7,6 @@ import { Link } from "react-router-dom"; import * as stores from "../stores"; import * as components from "../components"; - export const FlakyTestRow = ({ item }: { item: FlakyTestItem, }) => { const [labels, setLabels] = useState([``]); useEffect(() => { @@ -17,70 +16,88 @@ export const FlakyTestRow = ({ item }: { item: FlakyTestItem, }) => { setLabels(labels); }, [item]); + return ( +
+ {/*Name*/} +
+ +
- return
- {/*Name*/} -
- -
- - {/* Labels */} -
- -
- - {/* Age */} -
- {item.daysAge()} -
- + {/* Labels */} +
+ +
- {/* Latest flaky occurrence */} -
- -
+ {/* Age */} +
+ {item.daysAge()} +
+ {/* Latest flaky occurrence */} +
+ +
- {/* Disruption History*/} -
- -
+ {/* Disruption History*/} +
+ +
- {/* Disruptions */} -
- {item.disruptions} -
+ {/* Disruptions */} +
+ {item.disruptions} +
- {/* Actions */} -
- + {/* Actions */} +
+ +
-
; + ); }; const Name = ({ item }: { item: FlakyTestItem, }) => { - const { state: filterState, dispatch: dispatchFilter } = useContext(stores.Filter.Context); - + const { state: filterState, dispatch: dispatchFilter } = useContext( + stores.Filter.Context + ); const onClick = (toAppend: string) => { const query = filterState.query; - const setQuery = (q: string) => dispatchFilter({ type: `SET_QUERY`, value: q }); - if(query.includes(toAppend)) - return; + const setQuery = (q: string) => + dispatchFilter({ type: `SET_QUERY`, value: q }); + if (query.includes(toAppend)) return; const q = `${query} ${toAppend}`; setQuery(q); }; - return (
{item.testName}
- onClick(`@test.group:"${item.testGroup}"`)}>{item.testGroup} - onClick(`@test.runner:"${item.testRunner}"`)}>{item.testRunner} - onClick(`@test.suite:"${item.testSuite}"`)}>{item.testSuite} + onClick(`@test.group:"${item.testGroup}"`)} + > + {item.testGroup} + + onClick(`@test.runner:"${item.testRunner}"`)} + > + {item.testRunner} + + onClick(`@test.suite:"${item.testSuite}"`)} + > + {item.testSuite} +
); @@ -90,11 +107,27 @@ const LatestFlakyOccurrence = ({ item }: { item: FlakyTestItem, }) => { return (
- {util.Formatter.dateDiff(item.latestDisruptionTimestamp, new Date())} + + {util.Formatter.dateDiff(item.latestDisruptionTimestamp, new Date())} +
- commit - {item.latestDisruptionHash.slice(0, 7)} + + commit + + + {item.latestDisruptionHash.slice(0, 7)} +
); diff --git a/front/test/support/fake_clients/superjerry.ex b/front/test/support/fake_clients/superjerry.ex index e80c82803..caadba626 100644 --- a/front/test/support/fake_clients/superjerry.ex +++ b/front/test/support/fake_clients/superjerry.ex @@ -144,10 +144,10 @@ defmodule Support.FakeClients.Superjerry do %FlakyTestItem{ test_id: Ecto.UUID.generate(), - test_name: Faker.Commerce.product_name(), - test_group: Faker.Commerce.product_name(), - test_runner: Faker.Commerce.product_name(), - test_suite: Faker.Commerce.product_name(), + test_name: Faker.Lorem.sentence(6..12), + test_group: Faker.Lorem.sentence(6..12), + test_runner: Faker.Lorem.sentence(6..12), + test_suite: Faker.Lorem.sentence(6..12), test_file: Faker.File.file_name(), disruptions_count: disruption_count, pass_rate: Faker.random_between(0, 100),