Skip to content

Commit

Permalink
explicitly set size limit
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinBatdorf committed May 20, 2023
1 parent 41f1127 commit a6e5c2f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/cypress-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
# and output their file names without the extension
ls cypress/e2e/*.cy.js | xargs -I{} basename {} .cy.js | jq -Rrs "split(\"\n\") | map(select(length > 0)) | tojson" | tee /tmp/spec.json
echo "spec=$(cat /tmp/spec.json)" >> "$GITHUB_OUTPUT"
build:
name: Build node modules
npm_install:
name: Install Node modules
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -43,7 +43,7 @@ jobs:
group: cypress - ${{ github.event.pull_request.number || github.ref }} - ${{ matrix.spec }}
cancel-in-progress: true
runs-on: ubuntu-latest
needs: [build, generate_file_list]
needs: [npm_install, generate_file_list]
strategy:
fail-fast: false
matrix:
Expand Down
14 changes: 3 additions & 11 deletions cypress/e2e/settings.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,9 @@ context('Settings modal checks', () => {
cy.addBlock('kevinbatdorf/unlimited-photos')
cy.get('[data-cy-up="file-size-warning"]').should('not.exist')

cy.get('[data-cy-up="settings-button"]').click()

cy.get('input[type="radio"][value="full"]').click()
cy.get('input[type="radio"][value="full"]').should('be.checked')
cy.get(SETTINGS_MODAL_CLOSE).click()

cy.get('[data-cy-up="settings-button"]').click()
cy.get('input[type="radio"][value="raw"]').click()
cy.get('input[type="radio"][value="raw"]').should('be.checked')
cy.get(SETTINGS_MODAL_CLOSE).click()

cy.window().then((win) => {
win.unlimitedPhotosConfig.maxUploadSize = 2
})
cy.get('[data-cy-up="settings-button"]').click()
cy.get('input[type="radio"][value="full"]').click()
cy.get('input[type="radio"][value="full"]').should('be.checked')
Expand Down

0 comments on commit a6e5c2f

Please sign in to comment.