diff --git a/cypress/e2e/attachments.spec.js b/cypress/e2e/attachments.spec.js index 2779b76f6a6..1e7a515b942 100644 --- a/cypress/e2e/attachments.spec.js +++ b/cypress/e2e/attachments.spec.js @@ -339,13 +339,16 @@ describe('Test all attachment insertion methods', () => { }) it('Create a new whiteboard file as an attachment', () => { - const check = (documentId, fileName) => { + const check = (documentId, dirname, fileName) => { cy.log( - 'Check the attachment is visible and well formed', + 'Check a preview is inserted for the whiteboard attachment', documentId, fileName, ) - return cy.get('.preview .widget-file.whiteboard').should('be.visible') + expect(fileName).to.match(/\.whiteboard$/) + // The widget inside the preview is rendered by the files app, + // so only check that one is there, not how it looks + return cy.get('.preview .widget-file').should('exist') } cy.visit('/apps/files') diff --git a/src/css/print.scss b/src/css/print.scss index 071e3294af9..e525b812272 100644 --- a/src/css/print.scss +++ b/src/css/print.scss @@ -41,8 +41,8 @@ // NcModal uses fixed, which will be cropped when printed position: absolute !important; - .modal-header { - // Hide modal header (close button) + .modal-header, .viewer__settings { + // Hide modal header (close button) and viewer settings button display: none !important; } .modal-wrapper {