Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
jenny-s51 committed Dec 19, 2024
1 parent c25e326 commit 6127ce2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ describe('Application', () => {
aboutDialog.findText().should('contain.text', 'OpenShift');
aboutDialog.findProductName().should('contain.text', 'OpenShift AI');
});
it.only('should show the login modal when receiving a 403 status code', () => {
it('should show the login modal when receiving a 403 status code', () => {

Check failure on line 118 in frontend/src/__tests__/cypress/cypress/tests/mocked/application.cy.ts

View workflow job for this annotation

GitHub Actions / Tests (18.x)

Delete `⏎`
// Mock the intercept to return a 403 status code

Expand Down
4 changes: 3 additions & 1 deletion frontend/src/app/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ const App: React.FC = () => {
return (
<Modal variant={ModalVariant.small} isOpen ouiaId="BasicModal">
<ModalHeader title="Session Expired" titleIconVariant="warning" />
<ModalBody data-testid="timeout-text">Your session timed out. To continue working, log in.</ModalBody>
<ModalBody data-testid="timeout-text">
Your session timed out. To continue working, log in.
</ModalBody>
<ModalFooter>
<Button
key="confirm"
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/useApplicationSettings.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import * as React from 'react';
import { AxiosError } from 'axios';
import { DashboardConfigKind } from '~/k8sTypes';
import { POLL_INTERVAL } from '~/utilities/const';
import { useDeepCompareMemoize } from '~/utilities/useDeepCompareMemoize';
import { fetchDashboardConfig } from '~/services/dashboardConfigService';
import useTimeBasedRefresh from './useTimeBasedRefresh';
import { AxiosError } from "axios";

export const useApplicationSettings = (): {
dashboardConfig: DashboardConfigKind | null;
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/services/dashboardConfigService.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { AxiosError } from 'axios';
import axios from '~/utilities/axios';
import { DashboardConfigKind } from '~/k8sTypes';
import { AxiosError } from 'axios';

export const fetchDashboardConfig = (): Promise<DashboardConfigKind> => {
const url = '/api/config';
Expand All @@ -16,7 +16,7 @@ export const fetchDashboardConfig = (): Promise<DashboardConfigKind> => {
message, // The error message also serves as the "code" argument for AxiosError
undefined, // Optional: request config that was used
e.response, // Optional: the full response object
e
e,
);
});
};

0 comments on commit 6127ce2

Please sign in to comment.