Skip to content

Commit 44e0ba0

Browse files
committed
Merge remote-tracking branch 'fabio/typescript-setup' into ts-and-esm-refactor-db-module
2 parents 2dfb6ce + bdffb67 commit 44e0ba0

File tree

25 files changed

+463
-214
lines changed

25 files changed

+463
-214
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ jobs:
7777
path: build
7878

7979
- name: Run cypress test
80-
uses: cypress-io/github-action@01ab638e25de36956e276fd37e34446273874399 # v6.7.15
80+
uses: cypress-io/github-action@108b8684ae52e735ff7891524cbffbcd4be5b19f # v6.7.16
8181
with:
8282
start: npm start &
8383
wait-on: "http://localhost:3000"

.github/workflows/unused-dependencies.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: 'Unused Dependencies'
22
on: [pull_request]
33

4-
permissions:
5-
contents: read
4+
permissions:
5+
contents: read
66

77
jobs:
88
unused-dependecies:
@@ -20,11 +20,10 @@ jobs:
2020
with:
2121
node-version: '18.x'
2222
- name: 'Run depcheck'
23-
run: |
24-
npx depcheck --skip-missing --ignores="@babel/*,@commitlint/*,eslint,eslint-*,husky,mocha,concurrently,nyc,prettier"
23+
run: |
24+
npx depcheck --skip-missing --ignores="tsx,@babel/*,@commitlint/*,eslint,eslint-*,husky,mocha,concurrently,nyc,prettier,typescript,vite-tsconfig-paths"
2525
echo $?
2626
if [[ $? == 1 ]]; then
2727
echo "Unused dependencies or devDependencies found"
2828
exit 1
2929
fi
30-

cypress.config.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
const { defineConfig } = require('cypress')
1+
const { defineConfig } = require('cypress');
22

33
module.exports = defineConfig({
44
e2e: {
5-
baseUrl: process.env.CYPRESS_BASE_URL ||'http://localhost:3000',
5+
baseUrl: process.env.CYPRESS_BASE_URL || 'http://localhost:3000',
6+
chromeWebSecurity: false, // Required for OIDC testing
67
},
7-
})
8+
});

cypress/e2e/login.cy.js

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,33 @@
1-
describe("Display finos UI",()=>{
2-
3-
beforeEach(() =>{
4-
cy.visit('/login')
5-
})
6-
it('shoud find git proxy logo',() =>{
7-
cy.get('[data-test="git-proxy-logo"]').should('exist')
8-
})
9-
it('shoud find username',() =>{
10-
cy.get('[data-test="username"]').should('exist')
11-
})
1+
describe('Login page', () => {
2+
beforeEach(() => {
3+
cy.visit('/login');
4+
});
125

13-
it('shoud find passsword',() =>{
14-
cy.get('[data-test="password"]').should('exist')
15-
})
16-
it('shoud find login button',() =>{
17-
cy.get('[data-test="login"]').should('exist')
18-
})
19-
})
6+
it('should have git proxy logo', () => {
7+
cy.get('[data-test="git-proxy-logo"]').should('exist');
8+
});
9+
10+
it('should have username input', () => {
11+
cy.get('[data-test="username"]').should('exist');
12+
});
13+
14+
it('should have passsword input', () => {
15+
cy.get('[data-test="password"]').should('exist');
16+
});
17+
18+
it('should have login button', () => {
19+
cy.get('[data-test="login"]').should('exist');
20+
});
21+
22+
describe('OIDC login button', () => {
23+
it('should exist', () => {
24+
cy.get('[data-test="oidc-login"]').should('exist');
25+
});
26+
27+
// Validates that OIDC is configured correctly
28+
it('should redirect to /oidc', () => {
29+
cy.get('[data-test="oidc-login"]').click();
30+
cy.url().should('include', '/oidc');
31+
});
32+
});
33+
});

index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env node
1+
#!/usr/bin/env tsx
22
/* eslint-disable max-len */
33
import yargs from 'yargs';
44
import { hideBin } from 'yargs/helpers';

0 commit comments

Comments
 (0)