mirror of
https://github.com/AppFlowy-IO/AppFlowy-Web.git
synced 2026-03-13 10:00:26 +08:00
test: fix test
This commit is contained in:
@@ -46,12 +46,12 @@ describe('Text Formatting - Selection and Formatting', () => {
|
||||
waitForReactUpdate(1000);
|
||||
|
||||
// Wait for selection toolbar to appear and click bold button
|
||||
cy.get('[data-testid="selection-toolbar"]', { timeout: 10000 })
|
||||
.should('exist')
|
||||
EditorSelectors.selectionToolbar()
|
||||
.should('exist', { timeout: 10000 })
|
||||
.should('have.css', 'opacity', '1');
|
||||
|
||||
cy.get('[data-testid="toolbar-bold-button"]', { timeout: 10000 })
|
||||
.should('exist')
|
||||
EditorSelectors.boldButton()
|
||||
.should('exist', { timeout: 10000 })
|
||||
.should('be.visible')
|
||||
.click({ force: true });
|
||||
|
||||
@@ -72,12 +72,12 @@ describe('Text Formatting - Selection and Formatting', () => {
|
||||
waitForReactUpdate(1000);
|
||||
|
||||
// Wait for selection toolbar and click italic button
|
||||
cy.get('[data-testid="selection-toolbar"]', { timeout: 10000 })
|
||||
.should('exist')
|
||||
EditorSelectors.selectionToolbar()
|
||||
.should('exist', { timeout: 10000 })
|
||||
.should('have.css', 'opacity', '1');
|
||||
|
||||
cy.get('[data-testid="toolbar-italic-button"]', { timeout: 10000 })
|
||||
.should('exist')
|
||||
EditorSelectors.italicButton()
|
||||
.should('exist', { timeout: 10000 })
|
||||
.should('be.visible')
|
||||
.click({ force: true });
|
||||
|
||||
@@ -98,12 +98,12 @@ describe('Text Formatting - Selection and Formatting', () => {
|
||||
waitForReactUpdate(1000);
|
||||
|
||||
// Wait for selection toolbar and click underline button
|
||||
cy.get('[data-testid="selection-toolbar"]', { timeout: 10000 })
|
||||
.should('exist')
|
||||
EditorSelectors.selectionToolbar()
|
||||
.should('exist', { timeout: 10000 })
|
||||
.should('have.css', 'opacity', '1');
|
||||
|
||||
cy.get('[data-testid="toolbar-underline-button"]', { timeout: 10000 })
|
||||
.should('exist')
|
||||
EditorSelectors.underlineButton()
|
||||
.should('exist', { timeout: 10000 })
|
||||
.should('be.visible')
|
||||
.click({ force: true });
|
||||
|
||||
@@ -124,12 +124,12 @@ describe('Text Formatting - Selection and Formatting', () => {
|
||||
waitForReactUpdate(1000);
|
||||
|
||||
// Wait for selection toolbar and click strikethrough button
|
||||
cy.get('[data-testid="selection-toolbar"]', { timeout: 10000 })
|
||||
.should('exist')
|
||||
EditorSelectors.selectionToolbar()
|
||||
.should('exist', { timeout: 10000 })
|
||||
.should('have.css', 'opacity', '1');
|
||||
|
||||
cy.get('[data-testid="toolbar-strikethrough-button"]', { timeout: 10000 })
|
||||
.should('exist')
|
||||
EditorSelectors.strikethroughButton()
|
||||
.should('exist', { timeout: 10000 })
|
||||
.should('be.visible')
|
||||
.click({ force: true });
|
||||
|
||||
|
||||
@@ -320,11 +320,11 @@ export const EditorSelectors = {
|
||||
selectionToolbar: () => cy.get('[data-testid="selection-toolbar"]'),
|
||||
|
||||
// Formatting buttons in toolbar
|
||||
boldButton: () => cy.get('[data-testid="toolbar-bold-button"]'),
|
||||
italicButton: () => cy.get('[data-testid="toolbar-italic-button"]'),
|
||||
underlineButton: () => cy.get('[data-testid="toolbar-underline-button"]'),
|
||||
strikethroughButton: () => cy.get('[data-testid="toolbar-strikethrough-button"]'),
|
||||
codeButton: () => cy.get('[data-testid="toolbar-code-button"]'),
|
||||
boldButton: () => cy.get(byTestId('toolbar-bold-button')),
|
||||
italicButton: () => cy.get(byTestId('toolbar-italic-button')),
|
||||
underlineButton: () => cy.get(byTestId('toolbar-underline-button')),
|
||||
strikethroughButton: () => cy.get(byTestId('toolbar-strikethrough-button')),
|
||||
codeButton: () => cy.get(byTestId('toolbar-code-button')),
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user