Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing auth #6

Merged
merged 10 commits into from
Jan 8, 2025
14 changes: 4 additions & 10 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import { defineConfig } from 'cypress'
import { resetStubs } from './integration_tests/mockApis/wiremock'
import auth from './integration_tests/mockApis/auth'
import tokenVerification from './integration_tests/mockApis/tokenVerification'

export default defineConfig({
chromeWebSecurity: false,
Expand All @@ -14,13 +11,10 @@ export default defineConfig({
},
taskTimeout: 60000,
e2e: {
setupNodeEvents(on) {
on('task', {
reset: resetStubs,
...auth,
...tokenVerification,
})
},
// setupNodeEvents(on) {
// on('task', {
// })
// },
baseUrl: 'http://localhost:3007',
excludeSpecPattern: '**/!(*.cy).ts',
specPattern: 'integration_tests/e2e/**/*.cy.{js,jsx,ts,tsx}',
Expand Down
13 changes: 0 additions & 13 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
version: '3.1'
services:

hmpps-auth:
image: quay.io/hmpps/hmpps-auth:latest
networks:
- hmpps
container_name: hmpps-auth
ports:
- "9090:8080"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/auth/health"]
environment:
- SPRING_PROFILES_ACTIVE=dev
- APPLICATION_AUTHENTICATION_UI_ALLOWLIST=0.0.0.0/0

app:
build:
context: .
Expand Down
11 changes: 11 additions & 0 deletions integration_tests/e2e/HomePage.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import HomePage from '../pages/HomePage'
import Page from '../pages/page'

context('Home Page', () => {
beforeEach(() => {})

it('shows the welcome page with title', () => {
cy.visit('/')
Page.verifyOnPage(HomePage)
})
})
41 changes: 0 additions & 41 deletions integration_tests/e2e/health.cy.ts

This file was deleted.

75 changes: 0 additions & 75 deletions integration_tests/e2e/signIn.cy.ts

This file was deleted.

135 changes: 0 additions & 135 deletions integration_tests/mockApis/auth.ts

This file was deleted.

29 changes: 0 additions & 29 deletions integration_tests/mockApis/tokenVerification.ts

This file was deleted.

13 changes: 0 additions & 13 deletions integration_tests/mockApis/wiremock.ts

This file was deleted.

7 changes: 7 additions & 0 deletions integration_tests/pages/HomePage.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Page from './page'

export default class WelcomePage extends Page {
constructor() {
super('Welcome to Electronic Monitoring For Probation Officers')
}
}
7 changes: 0 additions & 7 deletions integration_tests/pages/authManageDetails.ts

This file was deleted.

7 changes: 0 additions & 7 deletions integration_tests/pages/authSignIn.ts

This file was deleted.

11 changes: 0 additions & 11 deletions integration_tests/pages/index.ts

This file was deleted.

4 changes: 0 additions & 4 deletions integration_tests/support/commands.ts
Original file line number Diff line number Diff line change
@@ -1,4 +0,0 @@
Cypress.Commands.add('signIn', (options = { failOnStatusCode: true }) => {
cy.request('/')
return cy.task('getSignInUrl').then((url: string) => cy.visit(url, options))
})
Loading
Loading