Skip to content

Commit

Permalink
Merge branch 'refs/heads/develop' into DUOS-2462_B2C_auth
Browse files Browse the repository at this point in the history
# Conflicts:
#	.eslintrc
#	src/components/Spinner.tsx
#	src/custom.d.ts
#	tsconfig.json
  • Loading branch information
rushtong committed May 9, 2024
2 parents e0fa331 + a7a088d commit 161c1af
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"@babel/implicit-arrow-linebreak": "off",
"@babel/array-bracket-newline": "off",
"@babel/brace-style": "off",
"@babel/semi": "warn",
"@babel/semi": "warn"
},
"overrides": [
{
Expand Down
12 changes: 12 additions & 0 deletions cypress/component/spinner.spec.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* eslint-disable no-undef */

import {mount} from 'cypress/react';
import React from 'react';
import {Spinner} from '../../src/components/Spinner';

describe('Spinner', () => {
it('Renders the spinner component', () => {
mount(<Spinner/>);
cy.get('div').find('img').should('be.visible');
});
});
10 changes: 5 additions & 5 deletions src/components/Spinner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import React from 'react';
import loadingIndicator from '../images/loading-indicator.svg';

//spinner constant to be used everywhere
export const Spinner = (): JSX.Element => (
<div style={{ textAlign: 'center', height: '44px', width: '180px' }}>
<img src={loadingIndicator} alt='spinner' />
</div>
);
export function Spinner() {
return <div style={{textAlign: 'center', height: '44px', width: '180px'}}>
<img src={loadingIndicator} alt='spinner'/>
</div>;
}

// TODO: implement this spinner in every componentDidMount or Init method on
// pages that call async methods upon loading the page.
Expand Down
10 changes: 5 additions & 5 deletions src/custom.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
declare module '*.svg' {
export const ReactComponent: React.FunctionComponent<
React.SVGAttributes<SVGElement>
>;
export const ReactComponent: React.FunctionComponent<
React.SVGAttributes<SVGElement>
>;

const src: string;
export default src;
const src: string;
export default src;
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"useUnknownInCatchVariables": true,
"paths": {
"src/*": ["./src/*"],
"@/*": ["./*"],
"@/*": ["./*"]
}
},
"include": [
Expand Down

0 comments on commit 161c1af

Please sign in to comment.