Skip to content

Commit

Permalink
chore: move debug output to it blocks so hopefully we see output
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikThePendric committed Oct 5, 2023
1 parent 963c68d commit 8bcb4c5
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 15 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/dhis2-verify-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,6 @@ jobs:
group: e2e-chrome-parallel-${{ matrix.versions }}
spec: |
cypress/integration/contextMenu.cy.js
cypress/integration/interpretations.cy.js
cypress/integration/translations.cy.js
env:
BROWSER: none
CI: true
Expand All @@ -177,6 +175,7 @@ jobs:
DHIS2_IMAGE: ${{ steps.instance-version-params.outputs.dhis2-docker-hub-image-tag }}
DHIS2_DB_DUMP_URL: ${{ steps.instance-version-params.outputs.dhis2-db-dump-url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEBUG: 'cypress:*'
# This can be removed once Cypress Cloud starts working again
- name: Save videos as artifact
uses: actions/upload-artifact@v2
Expand Down
13 changes: 0 additions & 13 deletions cypress/helpers/startScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,6 @@ import { EXTENDED_TIMEOUT } from '../support/util.js'
export const goToStartPage = (skipEval) => {
cy.visit('/', EXTENDED_TIMEOUT).log(Cypress.env('dhis2BaseUrl'))

cy.intercept('GET', '**/system/info**', (req) => {
expect(req.url).to.equal('http://localhost:8080/api/system/info')
}).as('systemInfoRequest')

cy.wait('@systemInfoRequest').its('response.statusCode').should('eq', 200)

const cypressEnv = Cypress.env()

expect(cypressEnv.dhis2BaseUrl).to.eq('http://localhost:8080')
expect(cypressEnv.dhis2InstanceVersion).be.oneOf(['2.40.1', '2.38.4.3'])
expect(cypressEnv.dhis2Password).to.eq('district')
expect(cypressEnv.dhis2Username).to.eq('admin')

if (!skipEval) {
expectStartScreenToBeVisible()
}
Expand Down
20 changes: 20 additions & 0 deletions cypress/integration/contextMenu.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,26 @@ describe('using the layout chip context menu', () => {
it('moves item', () => {
goToStartPage()

cy.intercept('GET', '**/system/info**', (req) => {
expect(req.url).to.equal('http://localhost:8080/api/system/info')
}).as('systemInfoRequest')

cy.wait('@systemInfoRequest')
.its('response.statusCode')
.should('eq', 200)

const cypressEnv = Cypress.env()

expect(cypressEnv.dhis2BaseUrl).to.eq('http://localhost:8080')
expect(cypressEnv.dhis2InstanceVersion).be.oneOf(['2.40.1', '2.38.4.3'])
expect(cypressEnv.dhis2Password).to.eq('district')
expect(cypressEnv.dhis2Username).to.eq('admin')

cy.log(`dhis2BaseUrl: ${cypressEnv.dhis2BaseUrl}`)
cy.log(`dhis2InstanceVersion: ${cypressEnv.dhis2InstanceVersion}`)
cy.log(`dhis2Password: ${cypressEnv.dhis2Password}`)
cy.log(`dhis2Username: ${cypressEnv.dhis2Username}`)

expectAxisToHaveDimension(AXIS_ID_COLUMNS, TEST_DIM_ID)
expectAxisToNotHaveDimension(AXIS_ID_FILTERS, TEST_DIM_ID)

Expand Down

0 comments on commit 8bcb4c5

Please sign in to comment.