Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,13 @@ jobs:
npm run build --if-present
npm run stats --if-present

- name: Send bundle stats to RelativeCI
uses: relative-ci/agent-action@6a11b7d7fdd6670554fba1e1a40750daa33032d7 # v2
with:
webpackStatsFile: ./webpack-stats.json
key: ${{ secrets.RELATIVE_CI_KEY }}
token: ${{ secrets.GITHUB_TOKEN }}
# Disabled, vite doesn't support statistics yet
# - name: Send bundle stats to RelativeCI
# uses: relative-ci/agent-action@6a11b7d7fdd6670554fba1e1a40750daa33032d7 # v2
# with:
# webpackStatsFile: ./webpack-stats.json
# key: ${{ secrets.RELATIVE_CI_KEY }}
# token: ${{ secrets.GITHUB_TOKEN }}

- name: Check webpack build changes
run: |
Expand Down
21 changes: 13 additions & 8 deletions cypress/e2e/sharing/download-share-disabled.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe(`Download ${fileName} in viewer`, function() {
.should('contain', 'image2 .jpg')
})

it('Share the Photos folder with a share link and access the share link', function() {
it('Share the Photos folder with a share link, disable download and access the share link', function() {
cy.on('uncaught:exception', (err) => {
// This can happen because of blink engine handling animation, its not a bug just engine related.
if (err.message.includes('ResizeObserver loop limit exceeded')) {
Expand All @@ -63,17 +63,22 @@ describe(`Download ${fileName} in viewer`, function() {
})

cy.createLinkShare('/Photos').then(token => {
// Open the sidebar
cy.visit('/apps/files')
cy.getFile('Photos').clickAction('details')
cy.intercept('GET', '**/apps/files_sharing/api/v1/shares*').as('sharingAPI')

// Open the sidebar from the breadcrumbs
cy.get('[data-cy-files-content-breadcrumbs] .files-list__header-share-button').click()
cy.get('aside.app-sidebar').should('be.visible')
cy.get('[role="tablist"]').contains('[role="tab"]', 'Sharing').click()

// Wait for the sidebar to be done loading
cy.wait('@sharingAPI', { timeout: 10000 })

// Open the share menu
cy.get('.sharing-link-list > .sharing-entry [aria-label*=\'Actions for "Share link"\']').click()
cy.get('.sharing-link-list > .sharing-entry button[aria-label*="Actions for "]').click()
cy.get('.action-button:contains(\'Customize link\')').click()
cy.get('span:contains(\'Hide download\')').as('hideDownloadBtn').click({ force: true })
cy.get('@hideDownloadBtn').prev('input[type=checkbox]').should('be.checked')
cy.get('.checkbox-radio-switch-checkbox').contains('Hide download').as('hideDownloadBtn')
// click the label
cy.get('@hideDownloadBtn').get('span').contains('Hide download').click()
cy.get('@hideDownloadBtn').get('input[type=checkbox]').should('be.checked')

// Log out and access link share
cy.logout()
Expand Down
4 changes: 4 additions & 0 deletions cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ Cypress.Commands.add('deleteFile', fileName => {
cy.getFile(fileName).clickAction('delete')
})

Cypress.Commands.add('reloadCurrentFilesList', () => {
cy.get('[data-cy-files-content-breadcrumbs] a[title="Reload current directory"]').click()
})

Cypress.Commands.add(
'clickAction',
{ prevSubject: 'element' },
Expand Down
4 changes: 2 additions & 2 deletions js/viewer-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/viewer-main.js.map

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Large diffs are not rendered by default.