Skip to content

Commit

Permalink
Merge branch 'develop' into 3242-local-alert-manager-new
Browse files Browse the repository at this point in the history
  • Loading branch information
elipe17 authored Nov 15, 2024
2 parents 45b5a2e + 06f8013 commit 3402824
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 23 deletions.
4 changes: 2 additions & 2 deletions tdrs-backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ RUN apt-get install -y gcc graphviz graphviz-dev libpq-dev python3-dev vim curl
# Postgres client setup
#RUN bash -c 'echo "deb [trusted=yes] https://tdp-nexus.dev.raftlabs.tech/repository/apt-proxy-postgres/ bullseye-pdpg main" >> /etc/apt/sources.list'
RUN apt-get update -y && apt-get upgrade -y
RUN apt install -y postgresql-common && install -d /usr/share/postgresql-common/pgdg && \
sh -c 'echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc trusted=yes] https://tdp-nexus.dev.raftlabs.tech/repository/apt-proxy-postgres/ bullseye-pgdg main" >> /etc/apt/sources.list' && \
RUN apt --purge remove postgresql postgresql-* && apt install -y postgresql-common curl ca-certificates && install -d /usr/share/postgresql-common/pgdg && \
curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc && \
sh -c 'echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt bullseye-pgdg main" > /etc/apt/sources.list.d/pgdg.list' && \
apt -y update && apt -y upgrade && apt install postgresql-client-15 -y

# Install pipenv
Expand Down
48 changes: 27 additions & 21 deletions tdrs-frontend/cypress/e2e/common-steps/common-steps.js
Original file line number Diff line number Diff line change
@@ -1,38 +1,44 @@
import { When } from '@badeball/cypress-cucumber-preprocessor'

When('{string} visits the home page', (username) => {
cy.clearCookie('sessionid')
cy.clearCookie('csrftoken')
cy.intercept('/v1/stts/alpha').as('getSttSearchList')
cy.visit('/')
cy.contains('Sign into TANF Data Portal', { timeout: 30000 })
})

When('The admin logs in', () => {
cy.visit('/')
cy.adminLogin('[email protected]')
})

When('{string} logs in', (username) => {
cy.login(username)
})

When('The admin sets the approval status of {string} to {string}', (username, status) => {
cy.get('@cypressUser').then((cypressUser) => {
let body = {
username: username,
first_name: '',
last_name: '',
email: username,
stt: '6',
groups: '2',
account_approval_status: status,
access_requested_date_0: '0001-01-01',
access_requested_date_1: '00:00:00',
_save: 'Save',
}
When(
'The admin sets the approval status of {string} to {string}',
(username, status) => {
cy.get('@cypressUser').then((cypressUser) => {
let body = {
username: username,
first_name: '',
last_name: '',
email: username,
stt: '6',
groups: '2',
account_approval_status: status,
access_requested_date_0: '0001-01-01',
access_requested_date_1: '00:00:00',
_save: 'Save',
}

cy.adminApiRequest(
'POST',
`/users/user/${cypressUser.selector.id}/change/`,
body
)
})
})
cy.adminApiRequest(
'POST',
`/users/user/${cypressUser.selector.id}/change/`,
body
)
})
}
)

0 comments on commit 3402824

Please sign in to comment.