Skip to content

Commit

Permalink
fixup! fixup! more renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusknorr committed Aug 18, 2023
1 parent 5e6f7a9 commit e81b315
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 24 deletions.
6 changes: 3 additions & 3 deletions cypress/e2e/files.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,23 @@ describe('Text and server mimetypes', () => {
it('handle plaintext in a pre tag', () => {
cy.uploadFile('empty.md', 'text/plain', 'textfile.txt')
cy.visit('/apps/files')
cy.get('#app-content-files table tr').should('contain', 'textfile.txt')
cy.getFile('textfile.txt')
cy.openFile('textfile.txt')
cy.getContent().find('pre').should('exist')
})

it('handle asciidoc as plaintext for now', () => {
cy.uploadFile('test.adoc', 'text/asciidoc', 'hello.adoc')
cy.visit('/apps/files')
cy.get('#app-content-files table tr').should('contain', 'hello.adoc')
cy.getFile('hello.adoc')
cy.openFile('hello.adoc')
cy.getContent().find('pre').should('contain', 'Hello world')
})

it('handle markdown with richtext editor', () => {
cy.uploadFile('test.md', 'text/markdown', 'markdown.md')
cy.visit('/apps/files')
cy.get('#app-content-files table tr').should('contain', 'markdown.md')
cy.getFile('markdown.md')
cy.openFile('markdown.md')
cy.getContent().find('h2').should('contain', 'Hello world')
})
Expand Down
4 changes: 1 addition & 3 deletions cypress/e2e/mobile.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ describe('Mobile actions', {
cy.uploadFile('test.md', 'text/markdown', `${encodeURIComponent(folderName)}/text.md`)
cy.visit(`apps/files?dir=/${encodeURIComponent(folderName)}`)

cy.get('.files-controls .crumb:not(.hidden) a')
.last()
.click({ force: true })
cy.reload()

cy.openFile('text.md', { force: true })
})
Expand Down
6 changes: 1 addition & 5 deletions cypress/e2e/nodes/ImageView.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@ import { randUser } from '../../utils/index.js'

const user = randUser()

const refresh = () => cy.get('.files-controls .crumb:not(.hidden) a')
.last()
.click({ force: true })

const createMarkdown = (fileName, content) => {
return cy.createFile(fileName, content, 'text/markdown')
.then(refresh)
.then(cy.reload)
}

describe('Image View', () => {
Expand Down
14 changes: 1 addition & 13 deletions cypress/e2e/workspace.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,7 @@ describe('Workspace', function() {
})

it('adds a Readme.md', function() {
const url = '**/remote.php/dav/files/**'
cy.intercept({ method: 'PUT', url })
.as('addDescription')

cy.visit(`apps/files?dir=/${encodeURIComponent(currentFolder)}`)
cy.getFile('README.md').should('not.contain', 'Readme.md')

cy.get('.files-controls').first().within(() => {
cy.get('.button.new').click()
cy.get('.newFileMenu a.menuitem[data-action="rich-workspace-init"]').click()
cy.wait('@addDescription')
})

cy.createDescription()
openSidebar('Readme.md')
cy.get('#rich-workspace .text-editor .text-editor__wrapper')
.should('be.visible')
Expand Down

0 comments on commit e81b315

Please sign in to comment.