Skip to content

Commit

Permalink
Merge branch 'main' into 557-auto-increment-version
Browse files Browse the repository at this point in the history
  • Loading branch information
divinetettey authored Jun 18, 2024
2 parents 663e030 + 0ba98b2 commit bbf6e0f
Show file tree
Hide file tree
Showing 11 changed files with 1,619 additions and 101 deletions.
30 changes: 28 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
mongodb-version: [4.4]

steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
fetch-depth: 0

Expand All @@ -47,10 +47,36 @@ jobs:
npm run test-coverage-ci --workspaces --if-present
- name: Upload test coverage report
uses: codecov/codecov-action@v4.4.1
uses: codecov/codecov-action@v4.5.0
with:
files: ./coverage/lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
# - name: Exit if coverage condition not met
# if: ${{ steps.test.outputs.exit_code }} != 0
# run: exit ${{ steps.test.outputs.exit_code }}

- name: Build application
run: npm run build

- name: Save build folder
uses: actions/upload-artifact@v4
with:
name: build
if-no-files-found: error
path: build

- name: Download the build folders
uses: actions/download-artifact@v4
with:
name: build
path: build

- name: Run cypress test
uses: cypress-io/github-action@v6
with:
start: npm start &
wait-on: "http://localhost:3000"
wait-on-timeout: 120
run: npm run cypress:run


2 changes: 1 addition & 1 deletion .github/workflows/cve-scanning-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
node-version: ${{ env.NODE_VERSION }}

- name: Code Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v4
with:
Expand Down
7 changes: 7 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const { defineConfig } = require('cypress')

module.exports = defineConfig({
e2e: {
baseUrl: process.env.CYPRESS_BASE_URL ||'http://localhost:3000',
},
})
19 changes: 19 additions & 0 deletions cypress/e2e/login.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
describe("Display finos UI",()=>{

beforeEach(() =>{
cy.visit('/login')
})
it('shoud find git proxy logo',() =>{
cy.get('[data-test="git-proxy-logo"]').should('exist')
})
it('shoud find username',() =>{
cy.get('[data-test="username"]').should('exist')
})

it('shoud find passsword',() =>{
cy.get('[data-test="password"]').should('exist')
})
it('shoud find login button',() =>{
cy.get('[data-test="login"]').should('exist')
})
})
25 changes: 25 additions & 0 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// ***********************************************
// This example commands.js shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
// ***********************************************
//
//
// -- This is a parent command --
// Cypress.Commands.add('login', (email, password) => { ... })
//
//
// -- This is a child command --
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
//
//
// -- This is a dual command --
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
20 changes: 20 additions & 0 deletions cypress/support/e2e.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// ***********************************************************
// This example support/e2e.js is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// You can change the location of this file or turn off
// automatically serving support files with the
// 'supportFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/configuration
// ***********************************************************

// Import commands.js using ES2015 syntax:
import './commands'

// Alternatively you can use CommonJS syntax:
// require('./commands')
Loading

0 comments on commit bbf6e0f

Please sign in to comment.