Skip to content

Commit f01a273

Browse files
committed
chore: update Cypress and systeminformation dependencies, adjust editor visit URL, and enhance document creation logic
- Upgraded Cypress from 15.6.0 to 15.8.1 in package.json and bun.lock. - Updated systeminformation version to 5.28.3. - Changed editor visit URL from localhost:3000 to localhost:3001 in multiple test files. - Improved document creation logic to utilize direct insertion for better performance. - Added error handling for invalid heading levels in document structure.
1 parent 88e09ad commit f01a273

14 files changed

Lines changed: 1986 additions & 129 deletions

File tree

bun.lock

Lines changed: 3 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/webapp/cypress/e2e/editor/Heading/Change/normal-text/heading-2-noraml-text.cy.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable no-undef */
12
import { TEST_TITLE, TEST_CONTENT } from '../../../../../support/commands'
23
import { section, paragraph, heading } from '../../../../../fixtures/docMaker'
34

@@ -72,17 +73,20 @@ const expectedStructureAfterConversion = {
7273

7374
describe('Convert Heading to Normal Text', { testIsolation: false }, () => {
7475
before(() => {
75-
cy.visitEditor({ persist: true, docName: 'heading-to-normal-text-doc' })
76+
// Use clearDoc: true to ensure fresh start each run
77+
cy.visitEditor({ persist: false, docName: 'heading-to-normal-text-doc', clearDoc: true })
7678
})
7779

7880
it('should create a complex document with nested headings', () => {
79-
// Validate initial document structure
81+
// Create the document first
82+
cy.createDocument(ComplexDocumentStructure)
83+
cy.wait(500) // Wait for DOM to settle
84+
85+
// Then validate the structure
8086
cy.validateDocumentStructure(ComplexDocumentStructure).then((result) => {
8187
expect(result.valid).to.be.true
8288
expect(result.errors).to.be.undefined
8389
})
84-
// Create the document
85-
cy.createDocument(ComplexDocumentStructure)
8690
})
8791

8892
it('should convert a heading to normal text using keyboard shortcut', () => {

0 commit comments

Comments
 (0)