Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
"jest-worker": "^29.7.0",
"jsdom": "^16.6.0",
"parcel": "^2.13.3",
"prettier": "^2.6.2",
"prettier": "^3.4.2",
"process": "^0.11.10",
"react-test-renderer": "^18.0.0",
"ts-jest": "^29.2.5",
Expand Down
2 changes: 1 addition & 1 deletion ui/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const App = () => {
const { isFlagEnabled } = useFeatureFlags();

const isNewRuntimeEnabled = isFlagEnabled(
"WEAVE_GITOPS_FEATURE_GITOPS_RUNTIME"
"WEAVE_GITOPS_FEATURE_GITOPS_RUNTIME",
);

const navItems: NavItem[] = [
Expand Down
2 changes: 1 addition & 1 deletion ui/components/AlertListErrors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const AlertListErrors: FC<{
useEffect(() => {
const fErrors = sortBy(
uniqBy(errors, (error) => [error.clusterName, error.message].join()),
[(v) => v.clusterName, (v) => v.namespace, (v) => v.message]
[(v) => v.clusterName, (v) => v.namespace, (v) => v.message],
);
setFilteredErrors(fErrors);
setIndex(0);
Expand Down
4 changes: 2 additions & 2 deletions ui/components/AutomationDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function AutomationDetail({
name,
clusterName,
namespace,
false
false,
);

const canaryStatus = createCanaryCondition(data?.objects);
Expand Down Expand Up @@ -155,7 +155,7 @@ function AutomationDetail({
header={createYamlCommand(
automation.type,
automation.name,
automation.namespace
automation.namespace,
)}
/>
);
Expand Down
4 changes: 2 additions & 2 deletions ui/components/DataTable/DataTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function UnstyledDataTable({
sorted = _.orderBy(
filtered,
[sortedItem.sortValue || sortedItem.value],
[sortedItem.reverseSort ? "desc" : "asc"]
[sortedItem.reverseSort ? "desc" : "asc"],
);
}
return sorted;
Expand All @@ -135,7 +135,7 @@ function UnstyledDataTable({

const textFilters = _.filter(
next.textFilters,
(f) => !_.includes(chips, f)
(f) => !_.includes(chips, f),
);

let query = qs.parse(search);
Expand Down
42 changes: 21 additions & 21 deletions ui/components/DataTable/__tests__/DataTable.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ describe("DataTable", () => {
withContext(
<DataTable fields={fields} rows={rows} />,
"/applications",
{}
)
)
{},
),
),
);
const firstRow = screen.getAllByRole("row")[1];
expect(firstRow.innerHTML).toMatch(/nginx/);
Expand All @@ -77,9 +77,9 @@ describe("DataTable", () => {
withContext(
<DataTable fields={fields} rows={rows} />,
"/applications",
{}
)
)
{},
),
),
);

const nameButton = screen.getByText("Name");
Expand All @@ -93,9 +93,9 @@ describe("DataTable", () => {
withContext(
<DataTable fields={fields} rows={rows} />,
"/applications",
{}
)
)
{},
),
),
);
const nameButton = screen.getByText("Name");
fireEvent.click(nameButton);
Expand All @@ -110,9 +110,9 @@ describe("DataTable", () => {
withContext(
<DataTable fields={fields} rows={[]} />,
"/applications",
{}
)
)
{},
),
),
);
const firstRow = screen.getAllByRole("row")[1];
expect(firstRow.innerHTML).toMatch(/No/);
Expand Down Expand Up @@ -142,9 +142,9 @@ describe("DataTable", () => {
withContext(
<DataTable fields={fields} rows={rows} />,
"/applications",
{}
)
)
{},
),
),
);

let firstRow = screen.getAllByRole("row")[1];
Expand Down Expand Up @@ -181,9 +181,9 @@ describe("DataTable", () => {
withContext(
<DataTable disableSort fields={fields} rows={rows} />,
"/applications",
{}
)
)
{},
),
),
);

const nameButton = screen.getByText("Name");
Expand All @@ -202,9 +202,9 @@ describe("DataTable", () => {
withContext(
<DataTable fields={fields} rows={rows} />,
"/applications",
{}
)
)
{},
),
),
)
.toJSON();
expect(tree).toMatchSnapshot();
Expand Down
92 changes: 46 additions & 46 deletions ui/components/DataTable/__tests__/DataTableFilters.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,9 @@ describe("DataTableFilters", () => {
withContext(
<DataTable fields={fields} rows={rows} filters={{}} />,
"/applications",
{}
)
)
{},
),
),
);

expect(screen.queryAllByText("slick")).toBeTruthy();
Expand All @@ -212,13 +212,13 @@ describe("DataTableFilters", () => {
dialogOpen
/>,
"/applications",
{}
)
)
{},
),
),
);

const checkbox1 = document.getElementById(
`type${filterSeparator}foo`
`type${filterSeparator}foo`,
) as HTMLInputElement;
fireEvent.click(checkbox1);

Expand All @@ -232,7 +232,7 @@ describe("DataTableFilters", () => {
expect(chip1).toBeTruthy();

const checkbox2 = document.getElementById(
`type${filterSeparator}baz`
`type${filterSeparator}baz`,
) as HTMLInputElement;
fireEvent.click(checkbox2);

Expand All @@ -259,13 +259,13 @@ describe("DataTableFilters", () => {
dialogOpen
/>,
"/applications",
{}
)
)
{},
),
),
);

const checkbox1 = document.getElementById(
`status${filterSeparator}Ready`
`status${filterSeparator}Ready`,
) as HTMLInputElement;
fireEvent.click(checkbox1);

Expand All @@ -278,7 +278,7 @@ describe("DataTableFilters", () => {
expect(chip1).toBeTruthy();

const checkbox2 = document.getElementById(
`status${filterSeparator}Suspended`
`status${filterSeparator}Suspended`,
) as HTMLInputElement;
fireEvent.click(checkbox2);

Expand All @@ -304,9 +304,9 @@ describe("DataTableFilters", () => {
dialogOpen
/>,
"/applications",
{}
)
)
{},
),
),
);

const checkbox1 = document.getElementById("status") as HTMLInputElement;
Expand Down Expand Up @@ -335,9 +335,9 @@ describe("DataTableFilters", () => {
dialogOpen
/>,
"/applications",
{}
)
)
{},
),
),
);
const checkbox1 = document.getElementById("status") as HTMLInputElement;
fireEvent.click(checkbox1);
Expand Down Expand Up @@ -365,13 +365,13 @@ describe("DataTableFilters", () => {
dialogOpen
/>,
"/applications",
{}
)
)
{},
),
),
);

const checkbox1 = document.getElementById(
`type${filterSeparator}foo`
`type${filterSeparator}foo`,
) as HTMLInputElement;
fireEvent.click(checkbox1);

Expand Down Expand Up @@ -407,13 +407,13 @@ describe("DataTableFilters", () => {
dialogOpen
/>,
"/applications",
{}
)
)
{},
),
),
);

const checkbox1 = document.getElementById(
`type${filterSeparator}foo`
`type${filterSeparator}foo`,
) as HTMLInputElement;
fireEvent.click(checkbox1);
const chip1 = screen.getByText(`type${filterSeparator}foo`);
Expand All @@ -423,7 +423,7 @@ describe("DataTableFilters", () => {
expect(tableRows1).toHaveLength(2);

const checkbox2 = document.getElementById(
`type${filterSeparator}baz`
`type${filterSeparator}baz`,
) as HTMLInputElement;
fireEvent.click(checkbox2);
const chip2 = screen.getByText(`type${filterSeparator}baz`);
Expand Down Expand Up @@ -456,9 +456,9 @@ describe("DataTableFilters", () => {
dialogOpen
/>,
"/applications",
{}
)
)
{},
),
),
);

const searchTerms = "my-criterion";
Expand All @@ -483,9 +483,9 @@ describe("DataTableFilters", () => {
dialogOpen
/>,
"/applications",
{}
)
)
{},
),
),
);

const searchTerms = "my-criterion";
Expand Down Expand Up @@ -513,9 +513,9 @@ describe("DataTableFilters", () => {
dialogOpen
/>,
"/applications",
{}
)
)
{},
),
),
);

const searchTerms = rows[0].name;
Expand All @@ -531,9 +531,9 @@ describe("DataTableFilters", () => {
withContext(
<DataTable fields={fields} rows={rows} filters={{}} dialogOpen />,
"/applications",
{}
)
)
{},
),
),
);

const term1 = "a";
Expand All @@ -552,9 +552,9 @@ describe("DataTableFilters", () => {
withContext(
<DataTable fields={fields} rows={rows} filters={{}} dialogOpen />,
"/applications",
{}
)
)
{},
),
),
);

const row = rows[0];
Expand Down Expand Up @@ -582,9 +582,9 @@ describe("DataTableFilters", () => {
dialogOpen
/>,
"/applications" + search,
{}
)
)
{},
),
),
);
const tableRows = document.querySelectorAll("tbody tr");
expect(tableRows).toHaveLength(1);
Expand Down
Loading