aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/sessions
diff options
context:
space:
mode:
authorPhilippe Perrin <philippe.perrin@sonarsource.com>2022-11-02 11:08:39 +0100
committersonartech <sonartech@sonarsource.com>2022-11-02 20:03:01 +0000
commit2ab6fc273ecbf405f7c126fab11ddc0b9bf516da (patch)
treea6e005b4f57fb488d3e551b7df52399e69b0674c /server/sonar-web/src/main/js/apps/sessions
parent60e4b88e4567c1af3051b6cdc4c8858f8b0fca21 (diff)
downloadsonarqube-2ab6fc273ecbf405f7c126fab11ddc0b9bf516da.tar.gz
sonarqube-2ab6fc273ecbf405f7c126fab11ddc0b9bf516da.zip
SONAR-13368 Bump to prettier@2.7.1
Diffstat (limited to 'server/sonar-web/src/main/js/apps/sessions')
-rw-r--r--server/sonar-web/src/main/js/apps/sessions/components/LoginContainer.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/sessions/components/LoginForm.tsx5
-rw-r--r--server/sonar-web/src/main/js/apps/sessions/components/OAuthProviders.tsx5
-rw-r--r--server/sonar-web/src/main/js/apps/sessions/components/__tests__/Login-it.tsx16
-rw-r--r--server/sonar-web/src/main/js/apps/sessions/components/__tests__/Logout-it.tsx16
-rw-r--r--server/sonar-web/src/main/js/apps/sessions/components/__tests__/Unauthorized-it.tsx2
6 files changed, 24 insertions, 22 deletions
diff --git a/server/sonar-web/src/main/js/apps/sessions/components/LoginContainer.tsx b/server/sonar-web/src/main/js/apps/sessions/components/LoginContainer.tsx
index bd4d421f01b..6547ebfa361 100644
--- a/server/sonar-web/src/main/js/apps/sessions/components/LoginContainer.tsx
+++ b/server/sonar-web/src/main/js/apps/sessions/components/LoginContainer.tsx
@@ -42,7 +42,7 @@ export class LoginContainer extends React.PureComponent<Props, State> {
state: State = {
identityProviders: [],
- loading: true
+ loading: true,
};
componentDidMount() {
diff --git a/server/sonar-web/src/main/js/apps/sessions/components/LoginForm.tsx b/server/sonar-web/src/main/js/apps/sessions/components/LoginForm.tsx
index 649efae5ecd..b6ff2c843a5 100644
--- a/server/sonar-web/src/main/js/apps/sessions/components/LoginForm.tsx
+++ b/server/sonar-web/src/main/js/apps/sessions/components/LoginForm.tsx
@@ -43,7 +43,7 @@ export default class LoginForm extends React.PureComponent<Props, State> {
collapsed: Boolean(props.collapsed),
loading: false,
login: '',
- password: ''
+ password: '',
};
}
@@ -76,7 +76,8 @@ export default class LoginForm extends React.PureComponent<Props, State> {
<ButtonLink
aria-expanded={false}
className="small js-more-options"
- onClick={this.handleMoreOptionsClick}>
+ onClick={this.handleMoreOptionsClick}
+ >
{translate('login.more_options')}
</ButtonLink>
</div>
diff --git a/server/sonar-web/src/main/js/apps/sessions/components/OAuthProviders.tsx b/server/sonar-web/src/main/js/apps/sessions/components/OAuthProviders.tsx
index 987d65843cc..81965779b4f 100644
--- a/server/sonar-web/src/main/js/apps/sessions/components/OAuthProviders.tsx
+++ b/server/sonar-web/src/main/js/apps/sessions/components/OAuthProviders.tsx
@@ -38,7 +38,7 @@ export default function OAuthProviders(props: Props) {
const formatFunction = props.formatLabel || defaultFormatLabel;
return (
<Container className={classNames('oauth-providers', props.className)}>
- {props.identityProviders.map(identityProvider => (
+ {props.identityProviders.map((identityProvider) => (
<OAuthProvider
format={formatFunction}
identityProvider={identityProvider}
@@ -66,7 +66,8 @@ function OAuthProvider({ format, identityProvider, returnTo }: ItemProps) {
url={
`${getBaseUrl()}/sessions/init/${identityProvider.key}` +
`?return_to=${encodeURIComponent(returnTo)}`
- }>
+ }
+ >
<span>{format(identityProvider.name)}</span>
</IdentityProviderLink>
{identityProvider.helpMessage && (
diff --git a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Login-it.tsx b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Login-it.tsx
index 824efb902a6..2a2ec777c79 100644
--- a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Login-it.tsx
+++ b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Login-it.tsx
@@ -32,20 +32,20 @@ jest.mock('../../../../api/users', () => {
return {
getIdentityProviders: jest
.fn()
- .mockResolvedValue({ identityProviders: [mockIdentityProvider()] })
+ .mockResolvedValue({ identityProviders: [mockIdentityProvider()] }),
};
});
jest.mock('../../../../api/auth', () => ({
- logIn: jest.fn((_id, password) => (password === 'valid' ? Promise.resolve() : Promise.reject()))
+ logIn: jest.fn((_id, password) => (password === 'valid' ? Promise.resolve() : Promise.reject())),
}));
jest.mock('../../../../api/settings', () => ({
- getLoginMessage: jest.fn().mockResolvedValue({ message: '' })
+ getLoginMessage: jest.fn().mockResolvedValue({ message: '' }),
}));
jest.mock('../../../../helpers/globalMessages', () => ({
- addGlobalErrorMessage: jest.fn()
+ addGlobalErrorMessage: jest.fn(),
}));
const originalLocation = window.location;
@@ -54,18 +54,18 @@ const replace = jest.fn();
beforeAll(() => {
const location = {
...window.location,
- replace
+ replace,
};
Object.defineProperty(window, 'location', {
writable: true,
- value: location
+ value: location,
});
});
afterAll(() => {
Object.defineProperty(window, 'location', {
writable: true,
- value: originalLocation
+ value: originalLocation,
});
});
@@ -133,7 +133,7 @@ it('should not show any OAuth providers if none are configured', async () => {
it("should show a warning if there's an authorization error", async () => {
renderLoginContainer({
- location: mockLocation({ query: { authorizationError: 'true' } })
+ location: mockLocation({ query: { authorizationError: 'true' } }),
});
const heading = await screen.findByRole('heading', { name: 'login.login_to_sonarqube' });
diff --git a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Logout-it.tsx b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Logout-it.tsx
index a211ec6e648..a95abc59dc3 100644
--- a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Logout-it.tsx
+++ b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Logout-it.tsx
@@ -26,22 +26,22 @@ import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import Logout from '../Logout';
jest.mock('../../../../api/auth', () => ({
- logOut: jest.fn().mockResolvedValue(true)
+ logOut: jest.fn().mockResolvedValue(true),
}));
jest.mock('../../../../helpers/globalMessages', () => ({
- addGlobalErrorMessage: jest.fn()
+ addGlobalErrorMessage: jest.fn(),
}));
jest.mock('../../../../helpers/system', () => ({
- getBaseUrl: jest.fn().mockReturnValue('/context')
+ getBaseUrl: jest.fn().mockReturnValue('/context'),
}));
jest.mock('../../../../app/components/RecentHistory', () => ({
__esModule: true,
default: {
- clear: jest.fn()
- }
+ clear: jest.fn(),
+ },
}));
const originalLocation = window.location;
@@ -50,18 +50,18 @@ const replace = jest.fn();
beforeAll(() => {
const location = {
...window.location,
- replace
+ replace,
};
Object.defineProperty(window, 'location', {
writable: true,
- value: location
+ value: location,
});
});
afterAll(() => {
Object.defineProperty(window, 'location', {
writable: true,
- value: originalLocation
+ value: originalLocation,
});
});
diff --git a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Unauthorized-it.tsx b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Unauthorized-it.tsx
index ddbf360f5b3..ebe8a99a9e1 100644
--- a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Unauthorized-it.tsx
+++ b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Unauthorized-it.tsx
@@ -25,7 +25,7 @@ import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import Unauthorized from '../Unauthorized';
jest.mock('../../../../helpers/cookies', () => ({
- getCookie: jest.fn()
+ getCookie: jest.fn(),
}));
it('should render correctly', () => {