Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency eslint-plugin-cypress to ^2.14.0 (stable27) #4709

Merged
merged 2 commits into from
Aug 19, 2023
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
39 changes: 17 additions & 22 deletions cypress/e2e/MenuBar.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,38 +28,33 @@ describe('Test the rich text editor menu bar', function() {
}

beforeEach(cy.clearContent)

it('empty file', () => {
cy.getFile(fileName)
.then($el => {
cy.getActionEntry('remain')
.click()
getWordCount()
.should('include.text', '0 words, 0 chars')
})
cy.getActionEntry('remain')
.click()
getWordCount()
.should('include.text', '0 words, 0 chars')
})

it('single word', () => {
cy.getFile(fileName)
.then($el => {
cy.clearContent()
.type(' Hello ')
cy.getActionEntry('remain')
.click()
getWordCount()
.should('include.text', '1 word, 9 chars')
})
cy.getContent()
.type(' Hello ')
cy.getActionEntry('remain')
.click()
getWordCount()
.should('include.text', '1 word, 9 chars')
})

it('multiple words', () => {
cy.getFile(fileName)
.then($el => {
cy.clearContent()
.type('Hello \nworld')
cy.getActionEntry('remain')
.click()
getWordCount()
.should('include.text', '2 words, 11 chars')
})
cy.getContent()
.type('Hello \nworld')
cy.getActionEntry('remain')
.click()
getWordCount()
.should('include.text', '2 words, 11 chars')
})
})
})
37 changes: 18 additions & 19 deletions cypress/e2e/nodes/FrontMatter.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,33 +33,32 @@ describe('Front matter support', function() {
})

it('Open file with front matter', function() {
cy.openFile('frontmatter.md').then(() => {
cy.getContent().find('pre.frontmatter').should(pre => {
expect(pre.length === 1)
expect(pre[0].text === 'some: value\nother: 1.2')
})
cy.openFile('frontmatter.md')
cy.getContent().find('pre.frontmatter').should(pre => {
expect(pre.length === 1)
expect(pre[0].text === 'some: value\nother: 1.2')
})
})

it('Add front matter', function() {
cy.openFile('empty.md').clearContent().then(() => {
cy.getContent().type('---')
cy.getContent().type('test')
cy.getContent().find('pre.frontmatter').should(pre => {
expect(pre.length === 1)
expect(pre[0].text === 'test')
})
cy.openFile('empty.md')
cy.clearContent()
cy.getContent().type('---')
cy.getContent().type('test')
cy.getContent().find('pre.frontmatter').should(pre => {
expect(pre.length === 1)
expect(pre[0].text === 'test')
})
})

it('Do not add multiple front matter', function() {
cy.openFile('empty.md').clearContent().then(() => {
cy.getContent().type('---test')
cy.getContent().type('{downArrow}')
cy.getContent().type('---test')
cy.getContent().find('pre.frontmatter').should(pre => expect(pre.length === 1))
cy.getContent().find('hr').should(hr => expect(hr.length === 1))
})
cy.openFile('empty.md')
cy.clearContent()
cy.getContent().type('---test')
cy.getContent().type('{downArrow}')
cy.getContent().type('---test')
cy.getContent().find('pre.frontmatter').should(pre => expect(pre.length === 1))
cy.getContent().find('hr').should(hr => expect(hr.length === 1))
})

it('Reopen front matter', function() {
Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/nodes/Links.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ describe('test link marks', function() {

const link = `${Cypress.env('baseUrl')}/apps/files/file-name?fileId=${id}`
cy.clearContent()
cy.getContent()
.type(`${link}{enter}`)

cy.getContent()
Expand All @@ -68,6 +69,7 @@ describe('test link marks', function() {

const link = `${Cypress.env('baseUrl')}/file-name?fileId=${id}`
cy.clearContent()
cy.getContent()
.type(`${link}{enter}`)

cy.getContent()
Expand All @@ -82,6 +84,7 @@ describe('test link marks', function() {

it('without protocol', () => {
cy.clearContent()
cy.getContent()
.type('google.com{enter}')
cy.getContent()
.find('a[href*="google.com"]')
Expand Down Expand Up @@ -118,7 +121,6 @@ describe('test link marks', function() {
.should('have.been.calledWith', url)
}

beforeEach(cy.clearContent)
it('Link website without selection', () => {
cy.getFile(fileName)
.then($el => {
Expand Down Expand Up @@ -148,8 +150,6 @@ describe('test link marks', function() {
.click({ force: true })
}

beforeEach(() => cy.clearContent())

it('without text', () => {
cy.getFile(fileName)
.then($el => {
Expand Down
1 change: 0 additions & 1 deletion cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,6 @@ Cypress.Commands.add('getTOC', () => {
Cypress.Commands.add('clearContent', () => {
cy.getContent().scrollIntoView()
cy.getContent().type('{selectAll}{backspace}')
return cy.getContent()
})

Cypress.Commands.add('openWorkspace', () => {
Expand Down
62 changes: 53 additions & 9 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
"@vue/vue2-jest": "^29.2.5",
"@vueuse/core": "^10.3.0",
"cypress": "^12.17.4",
"eslint-plugin-cypress": "^2.13.3",
"eslint-plugin-cypress": "^2.14.0",
"identity-obj-proxy": "^3.0.0",
"jest": "^29.6.2",
"jest-environment-jsdom": "^29.6.2",
Expand Down
Loading