diff options
author | Vinicius Reis <vinicius.reis@nextcloud.com> | 2022-06-09 00:33:53 +0300 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2022-06-09 11:35:55 +0300 |
commit | 00d508bac3cc2227cfea296465376225e7320317 (patch) | |
tree | af2072173ce1b85408fef470340e4face32c73d7 /cypress | |
parent | 36e497deb8e12af09eae8b4392eb1c347115544b (diff) |
✅ (#2463): add error tests
Signed-off-by: Vinicius Reis <vinicius.reis@nextcloud.com>
Diffstat (limited to 'cypress')
-rw-r--r-- | cypress/e2e/ImageView.spec.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/cypress/e2e/ImageView.spec.js b/cypress/e2e/ImageView.spec.js index 944303df9..ae60df358 100644 --- a/cypress/e2e/ImageView.spec.js +++ b/cypress/e2e/ImageView.spec.js @@ -105,4 +105,30 @@ describe('Image View', () => { }) }) }) + + describe('fail to load', () => { + it.only('direct access', () => { + const fileName = `${Cypress.currentTest.title}.md` + + createMarkdown(fileName, '# from root\n\n ![yaha](/yaha.png)') + + cy.openFile(fileName) + + cy.getEditor() + .find('[data-component="image-view"]') + .should('have.class', 'image-view--failed') + + cy.getEditor() + .find('[data-component="image-view"] svg') + .should('be.visible') + + cy.getEditor() + .find('[data-component="image-view"] .image__error-message') + .should('be.visible') + + cy.getEditor() + .find('[data-component="image-view"] .image__caption input') + .should('have.value', 'yaha') + }) + }) }) |