Skip to content

Commit

Permalink
OB reference app phase 2 completed
Browse files Browse the repository at this point in the history
  • Loading branch information
abhijeetMA08 committed Aug 21, 2024
1 parent a16dc44 commit c756a17
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 19 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: Build
on:
push:
branches:
- develop
branches: ['main', 'develop']
pull_request:
types: [opened, synchronize, reopened]
jobs:
Expand All @@ -13,6 +12,10 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Install dependencies
run: npm install
- name: Test and coverage
run: npm run test:coverage
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM node:18-alpine
WORKDIR /app
COPY . .
RUN npm i
RUN npm i --ignore-scripts
CMD ["npm", "start"]
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Mastercard_open-banking-reference-application-australia&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=Mastercard_open-banking-reference-application-australia)
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=Mastercard_open-banking-reference-application-australia&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=Mastercard_open-banking-reference-application-australia)
[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=Mastercard_open-banking-reference-application-australia&metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=Mastercard_open-banking-reference-application-australia)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=Mastercard_open-banking-reference-application-australia&metric=coverage)](https://sonarcloud.io/summary/new_code?id=Mastercard_open-banking-reference-application-australia)

## Table of Contents

Expand Down
19 changes: 10 additions & 9 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# Root project information
sonar.projectKey=Mastercard_open-banking-reference-application-australia
sonar.projectName=open-banking-reference-application-australia
sonar.projectVersion=1.0
sonar.organization=mastercard

# Exclusions parameters
sonar.exclusions=Dockerfile,src/tests/**,public/**

# This is the name and version displayed in the SonarCloud UI.
#sonar.projectName=open-banking-reference-application-australia
#sonar.projectVersion=1.0
# Test coverage parameters
sonar.javascript.lcov.reportPaths=./coverage/lcov.info
sonar.coverage.exclusions=src/**/*.ts,src/*.js,src/App.tsx,src/index.tsx,/*.js


# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
#sonar.sources=.

# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8
# Duplication exclusion parameters
sonar.cpd.exclusions=src/components/Product/data/index.ts
4 changes: 2 additions & 2 deletions src/components/ConnectForm/ConnectForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ export default function ConnectForm() {
}
}
} catch (error: any) {
console.error(error?.message);
console.log(error?.message);
throw error;
}
};
Expand Down Expand Up @@ -645,7 +645,7 @@ export default function ConnectForm() {
{accord.id ===
'panel0' &&
AUTO_CREATE_CUSTOMER
? 'AUTO COMPLETE'
? 'AUTO CREATION COMPLETE'
: 'COMPLETE'}
</Typography>
)
Expand Down
4 changes: 2 additions & 2 deletions src/components/SandBoxTip/SandBoxTip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ export default function SandBoxTip() {

<div className='flex flex-col items-start gap-4 w-1/3'>
<Typography className='mb-2 text-base !font-[700]'>
{data.text.passwordField}
Banking Password
</Typography>
<Typography className='text-base'>
{data.text.passwordValue}
profile_4100
</Typography>
</div>
</div>
Expand Down
2 changes: 0 additions & 2 deletions src/components/SandBoxTip/data/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ const data = {
tip: ' Please select Finbank Aus OAuth and use the following username and password.',
usernameField: 'User ID',
usernameValue: 'profile_4100',
passwordField: 'Banking Password',
passwordValue: 'profile_4100',
},
};

Expand Down
2 changes: 1 addition & 1 deletion src/tests/ConnectForm.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ describe('Testing ConnectForm Component', () => {
);

await user.click(screen.getByRole('button', { name: /View demo/i }));
const element = await screen.findByText(/AUTO COMPLETE/i);
const element = await screen.findByText(/AUTO CREATION COMPLETE/i);
expect(element).toBeInTheDocument();
const connectElement = await screen.findByText('Connect Bank Account');
expect(connectElement).toBeInTheDocument();
Expand Down
16 changes: 16 additions & 0 deletions src/tests/ExternalIcon.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { render } from '@testing-library/react';
import { ExternalIcon } from '../components';

describe('Testing ExternalIcon component', () => {
test('Should render ExternalIcon', () => {
render(
(
<ExternalIcon data={'#FFFFFF'} background={'#FFF'} />
) as React.ReactElement
);
});

test('Should render ExternalIcon - 2', () => {
render((<ExternalIcon background={'#FFF'} />) as React.ReactElement);
});
});

0 comments on commit c756a17

Please sign in to comment.