diff --git a/client/.prettierrc b/client/.prettierrc
index a20502b7f..544138be4 100644
--- a/client/.prettierrc
+++ b/client/.prettierrc
@@ -1,4 +1,3 @@
{
- "singleQuote": true,
- "trailingComma": "all"
+ "singleQuote": true
}
diff --git a/client/src/index.tsx b/client/src/index.tsx
index 7db8206ed..40b8c7369 100644
--- a/client/src/index.tsx
+++ b/client/src/index.tsx
@@ -57,7 +57,7 @@ const router = createBrowserRouter(
],
{
basename: `/${useURLbasename()}`,
- },
+ }
);
const root = document.getElementById('root');
@@ -68,7 +68,7 @@ if (root) {
- ,
+
);
} else {
throw Error("Couldn't find root element");
diff --git a/client/test/e2e/playwright/Auth.test.ts b/client/test/e2e/playwright/Auth.test.ts
index b7d555967..fef1af43e 100644
--- a/client/test/e2e/playwright/Auth.test.ts
+++ b/client/test/e2e/playwright/Auth.test.ts
@@ -13,7 +13,7 @@ test.describe('Tests on Authentication Flow', () => {
.getByRole('button', { name: 'GitLab logo Sign In with GitLab' })
.click();
await expect(
- page.getByRole('button', { name: 'Open settings' }),
+ page.getByRole('button', { name: 'Open settings' })
).toBeVisible();
await expect(page).toHaveURL(/.*Library/);
});
@@ -23,7 +23,7 @@ test.describe('Tests on Authentication Flow', () => {
.getByRole('button', { name: 'GitLab logo Sign In with GitLab' })
.click();
await expect(
- page.getByRole('button', { name: 'Open settings' }),
+ page.getByRole('button', { name: 'Open settings' })
).toBeVisible();
await expect(page).toHaveURL(/.*Library/);
diff --git a/client/test/e2e/playwright/Menu.test.ts b/client/test/e2e/playwright/Menu.test.ts
index 97ff3e193..8f2cdc6a2 100644
--- a/client/test/e2e/playwright/Menu.test.ts
+++ b/client/test/e2e/playwright/Menu.test.ts
@@ -10,7 +10,7 @@ test.describe('Menu Links from first page (Layout)', () => {
.getByRole('button', { name: 'GitLab logo Sign In with GitLab' })
.click();
await expect(
- page.getByRole('button', { name: 'Open settings' }),
+ page.getByRole('button', { name: 'Open settings' })
).toBeVisible();
await expect(page).toHaveURL(/.*Library/);
});
@@ -19,7 +19,7 @@ test.describe('Menu Links from first page (Layout)', () => {
await links.reduce(async (previousPromise, link) => {
await previousPromise;
const linkElement = await page.locator(
- `div[role="button"]:has-text("${link.text}")`,
+ `div[role="button"]:has-text("${link.text}")`
);
await expect(linkElement).toBeVisible();
}, Promise.resolve());
diff --git a/client/test/e2e/playwright/auth.setup.ts b/client/test/e2e/playwright/auth.setup.ts
index a97468ae9..723a16f73 100644
--- a/client/test/e2e/playwright/auth.setup.ts
+++ b/client/test/e2e/playwright/auth.setup.ts
@@ -42,7 +42,7 @@ setup('authenticate', async ({ page }) => {
// 'Authorize' button did not appear within 4 seconds, so just ignore and continue.
}
await expect(
- page.getByRole('button', { name: 'Open settings' }),
+ page.getByRole('button', { name: 'Open settings' })
).toBeVisible();
const storage = await page.context().storageState();
diff --git a/client/test/integration/authRedux.test.tsx b/client/test/integration/authRedux.test.tsx
index bd59bb3e6..5eda40ab4 100644
--- a/client/test/integration/authRedux.test.tsx
+++ b/client/test/integration/authRedux.test.tsx
@@ -49,7 +49,7 @@ const setupTest = (authState: AuthState) => {
,
- { route: '/private', store },
+ { route: '/private', store }
);
};
@@ -75,7 +75,7 @@ describe('Redux and Authentication integration test', () => {
expect(screen.getByText('Signin')).toBeInTheDocument();
expect(authReducer(undefined, { type: 'unknown' })).toEqual(
- initialState.auth,
+ initialState.auth
);
expect(store.getState().userName).toBe(undefined);
});
diff --git a/client/test/unitTests/Components/Linkbuttons.test.tsx b/client/test/unitTests/Components/Linkbuttons.test.tsx
index 27952ee2c..6a467b681 100644
--- a/client/test/unitTests/Components/Linkbuttons.test.tsx
+++ b/client/test/unitTests/Components/Linkbuttons.test.tsx
@@ -24,7 +24,7 @@ const getButtonIcon = (key: string) =>
const evaluateButtonSize = (expectedSize: number) => {
buttons.forEach((button) => {
expect(
- getComputedStyle(getButtonIcon(button.key)).getPropertyValue('font-size'),
+ getComputedStyle(getButtonIcon(button.key)).getPropertyValue('font-size')
).toBe(`${expectedSize}rem`);
});
};
@@ -38,7 +38,7 @@ describe('LinkButtons component default size', () => {
buttons.forEach((button) => {
expect(getButton(button.key).parentElement).toHaveAttribute(
'aria-label',
- button.link,
+ button.link
);
expect(getLabel(button.key).tagName).toBe('H6');
});
@@ -66,7 +66,7 @@ describe('LinkButtons component default size', () => {
it('should use name from iconLib as label when avaiable', () => {
expect(getLabel(buttons[0].key).textContent).toBe(
- LinkIcons[buttons[0].key].name,
+ LinkIcons[buttons[0].key].name
);
});
});
diff --git a/client/test/unitTests/Components/PrivateRoute.test.tsx b/client/test/unitTests/Components/PrivateRoute.test.tsx
index 25ae748d8..962204e6a 100644
--- a/client/test/unitTests/Components/PrivateRoute.test.tsx
+++ b/client/test/unitTests/Components/PrivateRoute.test.tsx
@@ -30,7 +30,7 @@ const setupTest = (authState: AuthState) => {
,
- { route: '/private' },
+ { route: '/private' }
);
};
diff --git a/client/test/unitTests/Page/LayoutPublic.test.tsx b/client/test/unitTests/Page/LayoutPublic.test.tsx
index 0af0b5e1e..08e8e9e58 100644
--- a/client/test/unitTests/Page/LayoutPublic.test.tsx
+++ b/client/test/unitTests/Page/LayoutPublic.test.tsx
@@ -11,7 +11,7 @@ const PublicTestComponentId = 'public-component';
describe('LayoutPublic component with one element', () => {
beforeEach(() =>
- renderLayoutWithRouter(LayoutPublic, [PublicTestComponentId]),
+ renderLayoutWithRouter(LayoutPublic, [PublicTestComponentId])
);
basicLayoutTestsWithSingleComponent();
diff --git a/client/test/unitTests/Page/page.testUtils.tsx b/client/test/unitTests/Page/page.testUtils.tsx
index 2cca112b3..631a5a555 100644
--- a/client/test/unitTests/Page/page.testUtils.tsx
+++ b/client/test/unitTests/Page/page.testUtils.tsx
@@ -7,7 +7,7 @@ export const TestComponentIdList = ['component1', 'component2', 'component3'];
export function renderLayoutWithRouter(
Layout: (props: { children: React.ReactElement[] }) => React.ReactElement,
- Children: string[],
+ Children: string[]
) {
render({generateTestDivs(Children)}, {
wrapper: BrowserRouter,
diff --git a/client/test/unitTests/Routes/Library.test.tsx b/client/test/unitTests/Routes/Library.test.tsx
index 81fea8a8c..1aaf87268 100644
--- a/client/test/unitTests/Routes/Library.test.tsx
+++ b/client/test/unitTests/Routes/Library.test.tsx
@@ -19,7 +19,7 @@ describe('Library with no props', () => {
InitRouteTests(
- ,
+
);
itDisplaysContentOfTabs(assetType);
diff --git a/client/test/unitTests/Routes/SignIn.test.tsx b/client/test/unitTests/Routes/SignIn.test.tsx
index e53d8f66d..5a097ef7d 100644
--- a/client/test/unitTests/Routes/SignIn.test.tsx
+++ b/client/test/unitTests/Routes/SignIn.test.tsx
@@ -23,11 +23,11 @@ describe('SignIn', () => {
render(
- ,
+
);
expect(
- screen.getByRole('button', { name: /Sign In With GitLab/i }),
+ screen.getByRole('button', { name: /Sign In With GitLab/i })
).toBeInTheDocument();
});
@@ -35,7 +35,7 @@ describe('SignIn', () => {
render(
- ,
+
);
const signInButton = screen.getByRole('button', {
diff --git a/client/test/unitTests/Util/Store.test.ts b/client/test/unitTests/Util/Store.test.ts
index dd638a44c..b17c981f6 100644
--- a/client/test/unitTests/Util/Store.test.ts
+++ b/client/test/unitTests/Util/Store.test.ts
@@ -25,7 +25,7 @@ describe('reducers', () => {
describe('menu reducer', () => {
const itShouldHandleMenuActions = (
actionCreator: () => { type: string },
- expectedValue: boolean,
+ expectedValue: boolean
) => {
const newState = menuReducer(initialState.menu, actionCreator());
expect(newState.isOpen).toBe(expectedValue);
@@ -33,7 +33,7 @@ describe('reducers', () => {
it('menuReducer should return the initial menu state when an unknown action type is passed with an undefined state', () => {
expect(menuReducer(undefined, { type: 'unknown' })).toEqual(
- initialState.menu,
+ initialState.menu
);
});
@@ -50,7 +50,7 @@ describe('reducers', () => {
describe('auth reducer', () => {
it('authReducer should return the initial menu state when an unknown action type is passed with an undefined state', () => {
expect(authReducer(undefined, { type: 'unknown' })).toEqual(
- initialState.auth,
+ initialState.auth
);
});
diff --git a/client/test/unitTests/Util/envUtil.test.ts b/client/test/unitTests/Util/envUtil.test.ts
index 1c0edf925..75f937147 100644
--- a/client/test/unitTests/Util/envUtil.test.ts
+++ b/client/test/unitTests/Util/envUtil.test.ts
@@ -53,10 +53,10 @@ describe('envUtil', () => {
test('GetURL should return the correct enviroment variables', () => {
expect(useURLforDT()).toBe(
- `${testAppURL}/${testBasename}/${testUsername}/${testDT}`,
+ `${testAppURL}/${testBasename}/${testUsername}/${testDT}`
);
expect(useURLforLIB()).toBe(
- `${testAppURL}/${testBasename}/${testUsername}/${testLIB}`,
+ `${testAppURL}/${testBasename}/${testUsername}/${testLIB}`
);
expect(useURLbasename()).toBe(testBasename);
});
@@ -71,8 +71,8 @@ describe('envUtil', () => {
const result = getWorkbenchLinkValues();
expect(
result.every(
- (el) => typeof el.key === 'string' && typeof el.link === 'string',
- ),
+ (el) => typeof el.key === 'string' && typeof el.link === 'string'
+ )
).toBe(true);
});
@@ -83,8 +83,8 @@ describe('envUtil', () => {
result.forEach((el, i) => {
expect(el.link).toEqual(
`${testAppURL}/${testBasename}/${testUsername}/${cleanURL(
- testWorkbenchEndpoints[i],
- )}`,
+ testWorkbenchEndpoints[i]
+ )}`
);
});
});
diff --git a/client/test/unitTests/auth/AuthProvider.test.tsx b/client/test/unitTests/auth/AuthProvider.test.tsx
index 87d7803c6..14ca5e93b 100644
--- a/client/test/unitTests/auth/AuthProvider.test.tsx
+++ b/client/test/unitTests/auth/AuthProvider.test.tsx
@@ -38,7 +38,7 @@ describe('AuthProvider', () => {
const { getByText } = renderAuthProvider();
expect(
- getByText('Authentication service unavailable...try again later'),
+ getByText('Authentication service unavailable...try again later')
).toBeInTheDocument();
});
diff --git a/client/test/unitTests/testUtils.tsx b/client/test/unitTests/testUtils.tsx
index c4a95534b..295a654ea 100644
--- a/client/test/unitTests/testUtils.tsx
+++ b/client/test/unitTests/testUtils.tsx
@@ -18,7 +18,7 @@ type RouterOptions = {
export const renderWithRouter = (
ui: React.ReactElement,
- { route = '/', store }: RouterOptions = {},
+ { route = '/', store }: RouterOptions = {}
) => {
window.history.pushState({}, 'Test page', route);
@@ -26,7 +26,7 @@ export const renderWithRouter = (
? render(
- ,
+
)
: render();
};
@@ -65,7 +65,7 @@ export function InitRouteTests(component: React.ReactElement) {
}
export function itDisplaysContentOfTabs(
- tabs: { label: string; body: string }[],
+ tabs: { label: string; body: string }[]
) {
it('should render labels of all tabs', () => {
tabs.forEach((tab) => {
@@ -117,7 +117,7 @@ export interface TabLabelURLPair {
}
export function itHasCorrectURLOfTabsWithIframe(
- tablabelsURLpair: TabLabelURLPair[],
+ tablabelsURLpair: TabLabelURLPair[]
) {
it('should render the Iframe component for the first tab with the correct title and URL', () => {
tablabelsURLpair.forEach((tablabelURLpair) => {