Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# WIRIS INTEGRATIONS TEAM
* @carla-at-wiris @jgonzalez-at-wiris @usantos-at-wiris @xjiang-at-wiris @ncornaglia-at-wiris
* @carla-at-wiris @jgonzalez-at-wiris @xjiang-at-wiris @ncornaglia-at-wiris
9 changes: 9 additions & 0 deletions tests/e2e/enums/track_changes_options.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
enum TrackChangesOptions {
ACCEPT_ALL = 'Accept all suggestions',
ACCEPT_SELECTED = 'Accept all selected suggestions',
DISCARD_ALL = 'Discard all suggestions',
DISCARD_SELECTED = 'Discard all selected suggestions',
PREVIEW_FINAL = 'Preview final content'
}

export default TrackChangesOptions
2 changes: 1 addition & 1 deletion tests/e2e/enums/typing_mode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ enum TypingMode {
UNKNOWN = 'UNKNOWN',
}

export default TypingMode
export default TypingMode
203 changes: 195 additions & 8 deletions tests/e2e/page-objects/base_editor.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Page, Locator, expect, FrameLocator } from '@playwright/test'
import Toolbar from '../enums/toolbar'
import type Equation from '../interfaces/equation'
import TrackChangesOptions from '../enums/track_changes_options'
import BasePage from './page'
const path = require('path')

Expand Down Expand Up @@ -78,7 +79,7 @@

await this.page.locator(this.wirisEditorButtonMathType).waitFor({ state: 'visible' })
await this.page.locator(this.wirisEditorButtonMathType).hover()
await this.page.locator(this.wirisEditorButtonMathType).click()

Check failure on line 82 in tests/e2e/page-objects/base_editor.ts

View workflow job for this annotation

GitHub Actions / E2E Tests - froala

[chromium] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:60:9 › Edit equation (corner cases) - froala editor › MTHTML-100 User edits a formula deleted during edition: froala editor @froala @regression

3) [chromium] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:60:9 › Edit equation (corner cases) - froala editor › MTHTML-100 User edits a formula deleted during edition: froala editor @froala @regression Error: locator.click: Test timeout of 60000ms exceeded. Call log: - waiting for locator('.fr-btn-grp.fr-float-left').locator('#wirisEditor-1') - locator resolved to <button type="button" tabindex="-1" role="button" id="wirisEditor-1" aria-disabled="true" data-cmd="wirisEditor" data-title="Insert a math equation - MathType" class="fr-command fr-btn fr-disabled fr-no-refresh">…</button> - attempting click action 2 × waiting for element to be visible, enabled and stable - element is not enabled - retrying click action - waiting 20ms 2 × waiting for element to be visible, enabled and stable - element is not enabled - retrying click action - waiting 100ms 102 × waiting for element to be visible, enabled and stable - element is not enabled - retrying click action - waiting 500ms - waiting for element to be visible, enabled and stable at ../page-objects/base_editor.ts:82 80 | await this.page.locator(this.wirisEditorButtonMathType).waitFor({ state: 'visible' }) 81 | await this.page.locator(this.wirisEditorButtonMathType).hover() > 82 | await this.page.locator(this.wirisEditorButtonMathType).click() | ^ 83 | break 84 | } 85 | } at Froala.openWirisEditor (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/base_editor.ts:82:65) at Froala.openWirisEditorForLastInsertedFormula (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/base_editor.ts:379:7) at /home/runner/work/html-integrations/html-integrations/tests/e2e/tests/edit/edit_corner_cases.spec.ts:70:7

Check failure on line 82 in tests/e2e/page-objects/base_editor.ts

View workflow job for this annotation

GitHub Actions / E2E Tests - froala

[chromium] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:34:9 › Edit equation (corner cases) - froala editor › MTHTML-85 User edits a formula and continues typing text: froala editor @froala @regression

2) [chromium] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:34:9 › Edit equation (corner cases) - froala editor › MTHTML-85 User edits a formula and continues typing text: froala editor @froala @regression Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: locator.click: Test timeout of 60000ms exceeded. Call log: - waiting for locator('.fr-btn-grp.fr-float-left').locator('#wirisEditor-1') - locator resolved to <button type="button" tabindex="-1" role="button" id="wirisEditor-1" aria-disabled="true" data-cmd="wirisEditor" data-title="Insert a math equation - MathType" class="fr-command fr-btn fr-disabled fr-no-refresh">…</button> - attempting click action 2 × waiting for element to be visible, enabled and stable - element is not enabled - retrying click action - waiting 20ms 2 × waiting for element to be visible, enabled and stable - element is not enabled - retrying click action - waiting 100ms 104 × waiting for element to be visible, enabled and stable - element is not enabled - retrying click action - waiting 500ms - waiting for element to be visible, enabled and stable at ../page-objects/base_editor.ts:82 80 | await this.page.locator(this.wirisEditorButtonMathType).waitFor({ state: 'visible' }) 81 | await this.page.locator(this.wirisEditorButtonMathType).hover() > 82 | await this.page.locator(this.wirisEditorButtonMathType).click() | ^ 83 | break 84 | } 85 | } at Froala.openWirisEditor (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/base_editor.ts:82:65) at Froala.openWirisEditorForLastInsertedFormula (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/base_editor.ts:379:7) at /home/runner/work/html-integrations/html-integrations/tests/e2e/tests/edit/edit_corner_cases.spec.ts:44:7

Check failure on line 82 in tests/e2e/page-objects/base_editor.ts

View workflow job for this annotation

GitHub Actions / E2E Tests - froala

[chromium] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:34:9 › Edit equation (corner cases) - froala editor › MTHTML-85 User edits a formula and continues typing text: froala editor @froala @regression

2) [chromium] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:34:9 › Edit equation (corner cases) - froala editor › MTHTML-85 User edits a formula and continues typing text: froala editor @froala @regression Error: locator.click: Test timeout of 60000ms exceeded. Call log: - waiting for locator('.fr-btn-grp.fr-float-left').locator('#wirisEditor-1') - locator resolved to <button type="button" tabindex="-1" role="button" id="wirisEditor-1" aria-disabled="true" data-cmd="wirisEditor" data-title="Insert a math equation - MathType" class="fr-command fr-btn fr-disabled fr-no-refresh">…</button> - attempting click action 2 × waiting for element to be visible, enabled and stable - element is not enabled - retrying click action - waiting 20ms 2 × waiting for element to be visible, enabled and stable - element is not enabled - retrying click action - waiting 100ms 102 × waiting for element to be visible, enabled and stable - element is not enabled - retrying click action - waiting 500ms - waiting for element to be visible, enabled and stable at ../page-objects/base_editor.ts:82 80 | await this.page.locator(this.wirisEditorButtonMathType).waitFor({ state: 'visible' }) 81 | await this.page.locator(this.wirisEditorButtonMathType).hover() > 82 | await this.page.locator(this.wirisEditorButtonMathType).click() | ^ 83 | break 84 | } 85 | } at Froala.openWirisEditor (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/base_editor.ts:82:65) at Froala.openWirisEditorForLastInsertedFormula (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/base_editor.ts:379:7) at /home/runner/work/html-integrations/html-integrations/tests/e2e/tests/edit/edit_corner_cases.spec.ts:44:7

Check failure on line 82 in tests/e2e/page-objects/base_editor.ts

View workflow job for this annotation

GitHub Actions / E2E Tests - froala

[chromium] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:13:9 › Edit equation (corner cases) - froala editor › MTHTML-81 Edit styled equation: froala editor @froala @regression

1) [chromium] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:13:9 › Edit equation (corner cases) - froala editor › MTHTML-81 Edit styled equation: froala editor @froala @regression Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: locator.click: Test timeout of 60000ms exceeded. Call log: - waiting for locator('.fr-btn-grp.fr-float-left').locator('#wirisEditor-1') - locator resolved to <button type="button" tabindex="-1" role="button" id="wirisEditor-1" aria-disabled="true" data-cmd="wirisEditor" data-title="Insert a math equation - MathType" class="fr-command fr-btn fr-disabled fr-no-refresh">…</button> - attempting click action 2 × waiting for element to be visible, enabled and stable - element is not enabled - retrying click action - waiting 20ms 2 × waiting for element to be visible, enabled and stable - element is not enabled - retrying click action - waiting 100ms 104 × waiting for element to be visible, enabled and stable - element is not enabled - retrying click action - waiting 500ms at ../page-objects/base_editor.ts:82 80 | await this.page.locator(this.wirisEditorButtonMathType).waitFor({ state: 'visible' }) 81 | await this.page.locator(this.wirisEditorButtonMathType).hover() > 82 | await this.page.locator(this.wirisEditorButtonMathType).click() | ^ 83 | break 84 | } 85 | } at Froala.openWirisEditor (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/base_editor.ts:82:65) at Froala.openWirisEditorForLastInsertedFormula (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/base_editor.ts:379:7) at /home/runner/work/html-integrations/html-integrations/tests/e2e/tests/edit/edit_corner_cases.spec.ts:23:7

Check failure on line 82 in tests/e2e/page-objects/base_editor.ts

View workflow job for this annotation

GitHub Actions / E2E Tests - froala

[chromium] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:13:9 › Edit equation (corner cases) - froala editor › MTHTML-81 Edit styled equation: froala editor @froala @regression

1) [chromium] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:13:9 › Edit equation (corner cases) - froala editor › MTHTML-81 Edit styled equation: froala editor @froala @regression Error: locator.click: Test timeout of 60000ms exceeded. Call log: - waiting for locator('.fr-btn-grp.fr-float-left').locator('#wirisEditor-1') - locator resolved to <button type="button" tabindex="-1" role="button" id="wirisEditor-1" aria-disabled="true" data-cmd="wirisEditor" data-title="Insert a math equation - MathType" class="fr-command fr-btn fr-disabled fr-no-refresh">…</button> - attempting click action 2 × waiting for element to be visible, enabled and stable - element is not enabled - retrying click action - waiting 20ms 2 × waiting for element to be visible, enabled and stable - element is not enabled - retrying click action - waiting 100ms 101 × waiting for element to be visible, enabled and stable - element is not enabled - retrying click action - waiting 500ms - waiting for element to be visible, enabled and stable at ../page-objects/base_editor.ts:82 80 | await this.page.locator(this.wirisEditorButtonMathType).waitFor({ state: 'visible' }) 81 | await this.page.locator(this.wirisEditorButtonMathType).hover() > 82 | await this.page.locator(this.wirisEditorButtonMathType).click() | ^ 83 | break 84 | } 85 | } at Froala.openWirisEditor (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/base_editor.ts:82:65) at Froala.openWirisEditorForLastInsertedFormula (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/base_editor.ts:379:7) at /home/runner/work/html-integrations/html-integrations/tests/e2e/tests/edit/edit_corner_cases.spec.ts:23:7
break
}
}
Expand All @@ -105,6 +106,150 @@
await this.page.keyboard.type(text)
}

public async getSourceCodeEditFieldValue(): Promise<string> {
const sourceCodeEditField = this.getSourceCodeEditField?.()
if (!sourceCodeEditField) {
throw new Error('Source code edit field selector is not defined.')
}
await this.page.locator(sourceCodeEditField).waitFor({ state: 'visible' })
return await this.page.locator(sourceCodeEditField).inputValue()
}

public async clickTrackChanges(): Promise<void> {
const trackChangesButton = this.getTrackChangesButton?.()
if (trackChangesButton) {
await this.page.locator(trackChangesButton).first().waitFor({ state: 'visible' })
await this.page.locator(trackChangesButton).first().click()
}
}

/**
* Retrieves all track change suggestion markers from the editor area.
* Each item includes its type (insertion or deletion), the equation data, and the suggestion ID.
* @returns {Promise<Array<{ type: 'insertion' | 'deletion'; altText: string; mathml: string; suggestionId: string; authorId: string }>>}
*/
public async getTrackChangesItems(): Promise<
Array<{
type: 'insertion' | 'deletion'
altText: string
mathml: string
suggestionId: string
authorId: string
}>
> {
let frameOrPage: Page | FrameLocator
if (this.iframe) {
frameOrPage = this.page.frameLocator(this.iframe)
} else {
frameOrPage = this.page
}

await this.page.waitForTimeout(500)

const suggestionMarkers = frameOrPage.locator(
`${this.editField} span.ck-suggestion-marker`
)
const count = await suggestionMarkers.count()
const items: Array<{
type: 'insertion' | 'deletion'
altText: string
mathml: string
suggestionId: string
authorId: string
}> = []

for (let i = 0; i < count; i++) {
const marker = suggestionMarkers.nth(i)
const classList = await marker.getAttribute('class') || ''
const suggestionId = await marker.getAttribute('data-suggestion') || ''
const authorId = await marker.getAttribute('data-author-id') || ''

let type: 'insertion' | 'deletion'
if (classList.includes('ck-suggestion-marker-deletion')) {
type = 'deletion'
} else if (classList.includes('ck-suggestion-marker-insertion')) {
type = 'insertion'
} else {
// Default to insertion if neither specific class is found
type = 'insertion'
}

// Get equation data from the img inside the marker
const img = marker.locator('img.Wirisformula')
const imgCount = await img.count()

if (imgCount > 0) {
const altText = await img.first().getAttribute('alt') || ''
const mathml = await img.first().getAttribute('data-mathml') || ''
items.push({ type, altText, mathml, suggestionId, authorId })
} else {
// Marker exists but has no equation image (could be text-only change)
const textContent = await marker.textContent() || ''
items.push({ type, altText: textContent, mathml: '', suggestionId, authorId })
}
}

return items
}

/**
* Gets only the track change insertions from the editor.
*/
public async getTrackChangeInsertions() {
const items = await this.getTrackChangesItems()
return items.filter((item) => item.type === 'insertion')
}

/**
* Gets only the track change deletions from the editor.
*/
public async getTrackChangeDeletions() {
const items = await this.getTrackChangesItems()
return items.filter((item) => item.type === 'deletion')
}

/**
* Retrieves all equations from the track changes preview container.
* @returns {Promise<Equation[]>} Array of equations found in the preview.
*/
public async getTrackChangesPreviewEquations(): Promise<Equation[]> {
const previewContainer = this.getTrackChangesPreviewContainer?.()
if (!previewContainer) {
throw new Error('Track changes preview container selector is not defined.')
}

await this.page.locator(previewContainer).waitFor({ state: 'visible' })

const images = this.page.locator(`${previewContainer} img.Wirisformula`)
const count = await images.count()
const equations: Equation[] = []

for (let i = 0; i < count; i++) {
const img = images.nth(i)
const altText = await img.getAttribute('alt') || ''
const mathml = await img.getAttribute('data-mathml') || ''
equations.push({ altText, mathml })
}

return equations
}

/**
* Clicks on a specific track change option in the editor.
* @param option - The track change option to click, such as accepting or discarding suggestions.
*/
public async clickTrackChangeOption(option: TrackChangesOptions): Promise<void> {
const trackChangesDropdown = this.getTrackChangesDropdown?.()
if (trackChangesDropdown) {
await this.page.locator(trackChangesDropdown).click()
}

const trackChangeOptionButton = this.page.getByRole('menuitem', { name: option })
if (trackChangeOptionButton) {
await trackChangeOptionButton.click()
}
}

/**
* Retrieves all equations from the editor using the alt text and data-mathml DOM attributes.
* @returns {Promise<Equation[]>} Array of equation interface.
Expand Down Expand Up @@ -154,7 +299,17 @@
return this.page.frameLocator(this.iframe).locator(`${this.editField} img[alt="${equation.altText}"]`)
}

return this.page.locator(`${this.editField} img[alt="${equation.altText}"]`)
return this.page.locator(`${this.editField} img[alt="${equation.altText}"]`).first()
}

/**
* Deletes a specific equation from the editor.
* @param {Equation} equation - The equation to delete.
*/
public async deleteEquation(equation: Equation): Promise<void> {
const equationElement = this.getEquationElement(equation)
await equationElement.click()
await this.page.keyboard.press('Delete')
}

/**
Expand Down Expand Up @@ -190,7 +345,7 @@
} else {
editFieldLocator = this.page.locator(this.editField)
}
await editFieldLocator.click()

Check failure on line 348 in tests/e2e/page-objects/base_editor.ts

View workflow job for this annotation

GitHub Actions / E2E Tests - tinymce5

[webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:60:9 › Edit equation (corner cases) - tinymce5 editor › MTHTML-100 User edits a formula deleted during edition: tinymce5 editor @tinymce5 @regression

3) [webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:60:9 › Edit equation (corner cases) - tinymce5 editor › MTHTML-100 User edits a formula deleted during edition: tinymce5 editor @tinymce5 @regression Error: locator.click: Test timeout of 60000ms exceeded. Call log: - waiting for locator('iframe[id=\'editor_ifr\']').contentFrame().locator('body') - locator resolved to <body id="tinymce" data-id="editor" spellcheck="false" contenteditable="true" class="mce-content-body " aria-label="Rich Text Area. Press ALT-0 for help.">…</body> - attempting click action - waiting for element to be visible, enabled and stable at ../page-objects/base_editor.ts:348 346 | editFieldLocator = this.page.locator(this.editField) 347 | } > 348 | await editFieldLocator.click() | ^ 349 | await this.pause(1000) 350 | } 351 | at TinyMCE5.focus (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/base_editor.ts:348:28) at TinyMCE5.clear (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/base_editor.ts:536:35) at /home/runner/work/html-integrations/html-integrations/tests/e2e/tests/edit/edit_corner_cases.spec.ts:72:7

Check failure on line 348 in tests/e2e/page-objects/base_editor.ts

View workflow job for this annotation

GitHub Actions / E2E Tests - tinymce8

[firefox] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:60:9 › Edit equation (corner cases) - tinymce8 editor › MTHTML-100 User edits a formula deleted during edition: tinymce8 editor @tinymce8 @regression

1) [firefox] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:60:9 › Edit equation (corner cases) - tinymce8 editor › MTHTML-100 User edits a formula deleted during edition: tinymce8 editor @tinymce8 @regression Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: locator.click: Test timeout of 60000ms exceeded. Call log: - waiting for locator('iframe[id=\'editor_ifr\']').contentFrame().locator('body') - locator resolved to <body id="tinymce" data-id="editor" spellcheck="false" contenteditable="true" class="mce-content-body ">…</body> - attempting click action 2 × waiting for element to be visible, enabled and stable - element is visible, enabled and stable - scrolling into view if needed - done scrolling - <div class="tox-tooltip__body">Insert a math equation - MathType</div> from <div class="tox tox-silver-sink tox-tinymce-aux">…</div> subtree intercepts pointer events - retrying click action - waiting 20ms 2 × waiting for element to be visible, enabled and stable - element is visible, enabled and stable - scrolling into view if needed - done scrolling - <div class="tox-tooltip__body">Insert a math equation - MathType</div> from <div class="tox tox-silver-sink tox-tinymce-aux">…</div> subtree intercepts pointer events - retrying click action - waiting 100ms 96 × waiting for element to be visible, enabled and stable - element is visible, enabled and stable - scrolling into view if needed - done scrolling - <div class="tox-tooltip__body">Insert a math equation - MathType</div> from <div class="tox tox-silver-sink tox-tinymce-aux">…</div> subtree intercepts pointer events - retrying click action - waiting 500ms - waiting for element to be visible, enabled and stable - element is visible, enabled and stable - scrolling into view if needed at ../page-objects/base_editor.ts:348 346 | editFieldLocator = this.page.locator(this.editField) 347 | } > 348 | await editFieldLocator.click() | ^ 349 | await this.pause(1000) 350 | } 351 | at TinyMCE8.focus (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/base_editor.ts:348:28) at TinyMCE8.clear (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/base_editor.ts:535:16) at /home/runner/work/html-integrations/html-integrations/tests/e2e/tests/edit/edit_corner_cases.spec.ts:72:20

Check failure on line 348 in tests/e2e/page-objects/base_editor.ts

View workflow job for this annotation

GitHub Actions / E2E Tests - tinymce8

[firefox] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:60:9 › Edit equation (corner cases) - tinymce8 editor › MTHTML-100 User edits a formula deleted during edition: tinymce8 editor @tinymce8 @regression

1) [firefox] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:60:9 › Edit equation (corner cases) - tinymce8 editor › MTHTML-100 User edits a formula deleted during edition: tinymce8 editor @tinymce8 @regression Error: locator.click: Test timeout of 60000ms exceeded. Call log: - waiting for locator('iframe[id=\'editor_ifr\']').contentFrame().locator('body') - locator resolved to <body id="tinymce" data-id="editor" spellcheck="false" contenteditable="true" class="mce-content-body ">…</body> - attempting click action 2 × waiting for element to be visible, enabled and stable - element is visible, enabled and stable - scrolling into view if needed - done scrolling - <div class="tox-tooltip__body">Insert a math equation - MathType</div> from <div class="tox tox-silver-sink tox-tinymce-aux">…</div> subtree intercepts pointer events - retrying click action - waiting 20ms 2 × waiting for element to be visible, enabled and stable - element is visible, enabled and stable - scrolling into view if needed - done scrolling - <div class="tox-tooltip__body">Insert a math equation - MathType</div> from <div class="tox tox-silver-sink tox-tinymce-aux">…</div> subtree intercepts pointer events - retrying click action - waiting 100ms 96 × waiting for element to be visible, enabled and stable - element is visible, enabled and stable - scrolling into view if needed - done scrolling - <div class="tox-tooltip__body">Insert a math equation - MathType</div> from <div class="tox tox-silver-sink tox-tinymce-aux">…</div> subtree intercepts pointer events - retrying click action - waiting 500ms at ../page-objects/base_editor.ts:348 346 | editFieldLocator = this.page.locator(this.editField) 347 | } > 348 | await editFieldLocator.click() | ^ 349 | await this.pause(1000) 350 | } 351 | at TinyMCE8.focus (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/base_editor.ts:348:28) at TinyMCE8.clear (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/base_editor.ts:535:16) at /home/runner/work/html-integrations/html-integrations/tests/e2e/tests/edit/edit_corner_cases.spec.ts:72:20
await this.pause(1000)
}

Expand All @@ -203,31 +358,57 @@

await this.page.keyboard.press('Control+End')
await this.pause(500)
await this.page.keyboard.type(textToInsert)
await this.type(textToInsert)
}

/**
* Open the wiris Editor to edit the last item inserted
* Uses selectItemAtCursor, but that's not compatible with froala, so in that case does a click in the contextual toolbar
* @param {Toolbar} toolbar - toolbar of the test
*/
public async openWirisEditorForLastInsertedFormula(toolbar: Toolbar, equation: Equation): Promise<void> {
public async openWirisEditorForLastInsertedFormula(toolbar: Toolbar, equation?: Equation): Promise<void> {
const isFroala = this.getName() === 'froala'
if (isFroala && !equation) {
if (!equation) {
throw new Error('Equation must be provided for Froala editor')
}

await this.openWirisEditorForFormula(toolbar, equation)
} else {
await this.selectItemAtCursor()
await this.openWirisEditor(toolbar)
}
}

/**
* Open the wiris Editor to edit a specific formula by clicking on it and opening the wiris editor.
* @param {Toolbar} toolbar - toolbar of the test
* @param {Equation} equation - The equation to edit
*/
public async openWirisEditorForFormula(toolbar: Toolbar, equation: Equation): Promise<void> {
const isFroala = this.getName() === 'froala'
const equationElement = this.getEquationElement(equation)
if (isFroala) {
const equationElement = this.getEquationElement(equation)
await equationElement.click()

const mathTypeButton = this.getContextualToolbarMathTypeButton?.()
if (mathTypeButton) {
await this.page.locator(mathTypeButton).click()
}
} else {
await this.selectItemAtCursor()
await equationElement.click()
await this.openWirisEditor(toolbar)
}
}

/**
* Selects a formula in the editor by clicking on it.
* @param equation - The equation to select.
*/
public async selectFormula(equation: Equation): Promise<void> {
const equationElement = this.getEquationElement(equation)
await equationElement.click()
}

/**
* Selects the item at the current cursor position within the editor. This uses shift + the left arrow key to select.
*/
Expand Down Expand Up @@ -268,7 +449,7 @@
frameOrPage = this.page
}

const textContents = await frameOrPage.locator(this.editField).textContent()
const textContents = await frameOrPage.locator(this.editField).first().textContent()

if (!textContents) {
return undefined
Expand Down Expand Up @@ -400,8 +581,8 @@
await this.page.mouse.move(box.x - 10, box.y - 10)
await this.pause(500)
await this.page.mouse.up()
}
}
}

public async applyStyle(): Promise<void> {
await this.focus()
Expand Down Expand Up @@ -477,4 +658,10 @@
public getSourceCodeEditorButton?(): string

public getSourceCodeEditField?(): string

public getTrackChangesButton?(): string

public getTrackChangesDropdown?(): string

public getTrackChangesPreviewContainer?(): string
}
18 changes: 17 additions & 1 deletion tests/e2e/page-objects/html/ckeditor5.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import { Page } from '@playwright/test'
import BaseEditor from '../base_editor'
import TrackChangesOptions from '../../enums/track_changes_options'

class CKEditor5 extends BaseEditor {
protected readonly wirisEditorButtonMathType = "[data-cke-tooltip-text='Insert a math equation - MathType']"
protected readonly wirisEditorButtonChemType = "[data-cke-tooltip-text='Insert a chemistry formula - ChemType']"
protected readonly sourceCodeEditorButton = "[data-cke-tooltip-text='Source']"
protected readonly sourceCodeEditField = '.ck-source-editing-area'
protected readonly trackChangesButton = "[data-cke-tooltip-text='Track changes']"
protected readonly trackChangesDropdown = '.ck-splitbutton__arrow';
protected readonly trackChangesPreviewContainer = '.ck-track-changes-preview__root-container';
protected readonly editField = '.ck-editor__editable'
protected readonly name = 'ckeditor5'

Expand All @@ -20,6 +24,18 @@ class CKEditor5 extends BaseEditor {
public getSourceCodeEditField(): string {
return this.sourceCodeEditField
}

public getTrackChangesButton(): string {
return this.trackChangesButton
}

public getTrackChangesDropdown(): string {
return this.trackChangesDropdown
}

public getTrackChangesPreviewContainer(): string {
return this.trackChangesPreviewContainer
}
}

export default CKEditor5
export default CKEditor5
11 changes: 11 additions & 0 deletions tests/e2e/page-objects/page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@
* Wait for a specific amount of time
*/
async pause(milliseconds: number): Promise<void> {
await this.page.waitForTimeout(milliseconds)

Check failure on line 14 in tests/e2e/page-objects/page.ts

View workflow job for this annotation

GitHub Actions / E2E Tests - ckeditor4

[webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:60:9 › Edit equation (corner cases) - ckeditor4 editor › MTHTML-100 User edits a formula deleted during edition: ckeditor4 editor @ckeditor4 @regression

3) [webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:60:9 › Edit equation (corner cases) - ckeditor4 editor › MTHTML-100 User edits a formula deleted during edition: ckeditor4 editor @ckeditor4 @regression Error: page.waitForTimeout: Test timeout of 60000ms exceeded. at ../page-objects/page.ts:14 12 | */ 13 | async pause(milliseconds: number): Promise<void> { > 14 | await this.page.waitForTimeout(milliseconds) | ^ 15 | } 16 | 17 | public async press(key: string, options?: { times?: number }): Promise<void> { at CKEditor4.pause (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/page.ts:14:21) at CKEditor4.focus (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/base_editor.ts:349:16) at CKEditor4.clear (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/base_editor.ts:535:5) at /home/runner/work/html-integrations/html-integrations/tests/e2e/tests/edit/edit_corner_cases.spec.ts:72:7

Check failure on line 14 in tests/e2e/page-objects/page.ts

View workflow job for this annotation

GitHub Actions / E2E Tests - ckeditor4

[webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:34:9 › Edit equation (corner cases) - ckeditor4 editor › MTHTML-85 User edits a formula and continues typing text: ckeditor4 editor @ckeditor4 @regression

2) [webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:34:9 › Edit equation (corner cases) - ckeditor4 editor › MTHTML-85 User edits a formula and continues typing text: ckeditor4 editor @ckeditor4 @regression Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: page.waitForTimeout: Test timeout of 60000ms exceeded. at ../page-objects/page.ts:14 12 | */ 13 | async pause(milliseconds: number): Promise<void> { > 14 | await this.page.waitForTimeout(milliseconds) | ^ 15 | } 16 | 17 | public async press(key: string, options?: { times?: number }): Promise<void> { at WirisEditor.pause (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/page.ts:14:21) at WirisEditor.typeEquationViaKeyboard (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/wiris_editor.ts:123:16) at WirisEditor.insertEquationViaKeyboard (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/wiris_editor.ts:132:5) at /home/runner/work/html-integrations/html-integrations/tests/e2e/tests/edit/edit_corner_cases.spec.ts:46:7

Check failure on line 14 in tests/e2e/page-objects/page.ts

View workflow job for this annotation

GitHub Actions / E2E Tests - ckeditor4

[webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:34:9 › Edit equation (corner cases) - ckeditor4 editor › MTHTML-85 User edits a formula and continues typing text: ckeditor4 editor @ckeditor4 @regression

2) [webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:34:9 › Edit equation (corner cases) - ckeditor4 editor › MTHTML-85 User edits a formula and continues typing text: ckeditor4 editor @ckeditor4 @regression Error: page.waitForTimeout: Test timeout of 60000ms exceeded. at ../page-objects/page.ts:14 12 | */ 13 | async pause(milliseconds: number): Promise<void> { > 14 | await this.page.waitForTimeout(milliseconds) | ^ 15 | } 16 | 17 | public async press(key: string, options?: { times?: number }): Promise<void> { at WirisEditor.pause (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/page.ts:14:21) at WirisEditor.typeEquationViaKeyboard (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/wiris_editor.ts:125:16) at WirisEditor.insertEquationViaKeyboard (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/wiris_editor.ts:132:5) at /home/runner/work/html-integrations/html-integrations/tests/e2e/tests/edit/edit_corner_cases.spec.ts:46:7

Check failure on line 14 in tests/e2e/page-objects/page.ts

View workflow job for this annotation

GitHub Actions / E2E Tests - ckeditor4

[webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:13:9 › Edit equation (corner cases) - ckeditor4 editor › MTHTML-81 Edit styled equation: ckeditor4 editor @ckeditor4 @regression

1) [webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:13:9 › Edit equation (corner cases) - ckeditor4 editor › MTHTML-81 Edit styled equation: ckeditor4 editor @ckeditor4 @regression Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: page.waitForTimeout: Test timeout of 60000ms exceeded. at ../page-objects/page.ts:14 12 | */ 13 | async pause(milliseconds: number): Promise<void> { > 14 | await this.page.waitForTimeout(milliseconds) | ^ 15 | } 16 | 17 | public async press(key: string, options?: { times?: number }): Promise<void> { at WirisEditor.pause (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/page.ts:14:21) at WirisEditor.typeEquationViaKeyboard (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/wiris_editor.ts:123:16) at /home/runner/work/html-integrations/html-integrations/tests/e2e/tests/edit/edit_corner_cases.spec.ts:25:7

Check failure on line 14 in tests/e2e/page-objects/page.ts

View workflow job for this annotation

GitHub Actions / E2E Tests - generic

[webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:60:9 › Edit equation (corner cases) - generic editor › MTHTML-100 User edits a formula deleted during edition: generic editor @generic @regression

3) [webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:60:9 › Edit equation (corner cases) - generic editor › MTHTML-100 User edits a formula deleted during edition: generic editor @Generic @regression Error: page.waitForTimeout: Test timeout of 60000ms exceeded. at ../page-objects/page.ts:14 12 | */ 13 | async pause(milliseconds: number): Promise<void> { > 14 | await this.page.waitForTimeout(milliseconds) | ^ 15 | } 16 | 17 | public async press(key: string, options?: { times?: number }): Promise<void> { at Generic.pause (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/page.ts:14:21) at Generic.focus (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/base_editor.ts:349:16) at Generic.clear (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/base_editor.ts:535:5) at /home/runner/work/html-integrations/html-integrations/tests/e2e/tests/edit/edit_corner_cases.spec.ts:72:7

Check failure on line 14 in tests/e2e/page-objects/page.ts

View workflow job for this annotation

GitHub Actions / E2E Tests - generic

[webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:13:9 › Edit equation (corner cases) - generic editor › MTHTML-81 Edit styled equation: generic editor @generic @regression

1) [webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:13:9 › Edit equation (corner cases) - generic editor › MTHTML-81 Edit styled equation: generic editor @Generic @regression Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: page.waitForTimeout: Target page, context or browser has been closed at ../page-objects/page.ts:14 12 | */ 13 | async pause(milliseconds: number): Promise<void> { > 14 | await this.page.waitForTimeout(milliseconds) | ^ 15 | } 16 | 17 | public async press(key: string, options?: { times?: number }): Promise<void> { at WirisEditor.pause (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/page.ts:14:21) at WirisEditor.typeEquationViaKeyboard (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/wiris_editor.ts:123:16) at /home/runner/work/html-integrations/html-integrations/tests/e2e/tests/edit/edit_corner_cases.spec.ts:25:7

Check failure on line 14 in tests/e2e/page-objects/page.ts

View workflow job for this annotation

GitHub Actions / E2E Tests - tinymce6

[webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:60:9 › Edit equation (corner cases) - tinymce6 editor › MTHTML-100 User edits a formula deleted during edition: tinymce6 editor @tinymce6 @regression

3) [webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:60:9 › Edit equation (corner cases) - tinymce6 editor › MTHTML-100 User edits a formula deleted during edition: tinymce6 editor @tinymce6 @regression Error: page.waitForTimeout: Test timeout of 60000ms exceeded. at ../page-objects/page.ts:14 12 | */ 13 | async pause(milliseconds: number): Promise<void> { > 14 | await this.page.waitForTimeout(milliseconds) | ^ 15 | } 16 | 17 | public async press(key: string, options?: { times?: number }): Promise<void> { at TinyMCE6.pause (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/page.ts:14:21) at TinyMCE6.focus (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/base_editor.ts:349:16) at TinyMCE6.clear (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/base_editor.ts:535:5) at /home/runner/work/html-integrations/html-integrations/tests/e2e/tests/edit/edit_corner_cases.spec.ts:72:7

Check failure on line 14 in tests/e2e/page-objects/page.ts

View workflow job for this annotation

GitHub Actions / E2E Tests - tinymce6

[webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:34:9 › Edit equation (corner cases) - tinymce6 editor › MTHTML-85 User edits a formula and continues typing text: tinymce6 editor @tinymce6 @regression

2) [webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:34:9 › Edit equation (corner cases) - tinymce6 editor › MTHTML-85 User edits a formula and continues typing text: tinymce6 editor @tinymce6 @regression Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: page.waitForTimeout: Test timeout of 60000ms exceeded. at ../page-objects/page.ts:14 12 | */ 13 | async pause(milliseconds: number): Promise<void> { > 14 | await this.page.waitForTimeout(milliseconds) | ^ 15 | } 16 | 17 | public async press(key: string, options?: { times?: number }): Promise<void> { at WirisEditor.pause (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/page.ts:14:21) at WirisEditor.typeEquationViaKeyboard (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/wiris_editor.ts:125:16) at WirisEditor.insertEquationViaKeyboard (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/wiris_editor.ts:132:5) at /home/runner/work/html-integrations/html-integrations/tests/e2e/tests/edit/edit_corner_cases.spec.ts:46:7

Check failure on line 14 in tests/e2e/page-objects/page.ts

View workflow job for this annotation

GitHub Actions / E2E Tests - tinymce6

[webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:34:9 › Edit equation (corner cases) - tinymce6 editor › MTHTML-85 User edits a formula and continues typing text: tinymce6 editor @tinymce6 @regression

2) [webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:34:9 › Edit equation (corner cases) - tinymce6 editor › MTHTML-85 User edits a formula and continues typing text: tinymce6 editor @tinymce6 @regression Error: page.waitForTimeout: Test timeout of 60000ms exceeded. at ../page-objects/page.ts:14 12 | */ 13 | async pause(milliseconds: number): Promise<void> { > 14 | await this.page.waitForTimeout(milliseconds) | ^ 15 | } 16 | 17 | public async press(key: string, options?: { times?: number }): Promise<void> { at WirisEditor.pause (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/page.ts:14:21) at WirisEditor.typeEquationViaKeyboard (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/wiris_editor.ts:123:16) at WirisEditor.insertEquationViaKeyboard (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/wiris_editor.ts:132:5) at /home/runner/work/html-integrations/html-integrations/tests/e2e/tests/edit/edit_corner_cases.spec.ts:46:7

Check failure on line 14 in tests/e2e/page-objects/page.ts

View workflow job for this annotation

GitHub Actions / E2E Tests - tinymce6

[webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:13:9 › Edit equation (corner cases) - tinymce6 editor › MTHTML-81 Edit styled equation: tinymce6 editor @tinymce6 @regression

1) [webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:13:9 › Edit equation (corner cases) - tinymce6 editor › MTHTML-81 Edit styled equation: tinymce6 editor @tinymce6 @regression Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: page.waitForTimeout: Test timeout of 60000ms exceeded. at ../page-objects/page.ts:14 12 | */ 13 | async pause(milliseconds: number): Promise<void> { > 14 | await this.page.waitForTimeout(milliseconds) | ^ 15 | } 16 | 17 | public async press(key: string, options?: { times?: number }): Promise<void> { at WirisEditor.pause (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/page.ts:14:21) at WirisEditor.typeEquationViaKeyboard (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/wiris_editor.ts:125:16) at /home/runner/work/html-integrations/html-integrations/tests/e2e/tests/edit/edit_corner_cases.spec.ts:25:7

Check failure on line 14 in tests/e2e/page-objects/page.ts

View workflow job for this annotation

GitHub Actions / E2E Tests - tinymce6

[webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:13:9 › Edit equation (corner cases) - tinymce6 editor › MTHTML-81 Edit styled equation: tinymce6 editor @tinymce6 @regression

1) [webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:13:9 › Edit equation (corner cases) - tinymce6 editor › MTHTML-81 Edit styled equation: tinymce6 editor @tinymce6 @regression Error: page.waitForTimeout: Test timeout of 60000ms exceeded. at ../page-objects/page.ts:14 12 | */ 13 | async pause(milliseconds: number): Promise<void> { > 14 | await this.page.waitForTimeout(milliseconds) | ^ 15 | } 16 | 17 | public async press(key: string, options?: { times?: number }): Promise<void> { at WirisEditor.pause (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/page.ts:14:21) at WirisEditor.typeEquationViaKeyboard (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/wiris_editor.ts:125:16) at /home/runner/work/html-integrations/html-integrations/tests/e2e/tests/edit/edit_corner_cases.spec.ts:25:7

Check failure on line 14 in tests/e2e/page-objects/page.ts

View workflow job for this annotation

GitHub Actions / E2E Tests - tinymce7

[webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:60:9 › Edit equation (corner cases) - tinymce7 editor › MTHTML-100 User edits a formula deleted during edition: tinymce7 editor @tinymce7 @regression

3) [webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:60:9 › Edit equation (corner cases) - tinymce7 editor › MTHTML-100 User edits a formula deleted during edition: tinymce7 editor @tinymce7 @regression Error: page.waitForTimeout: Test timeout of 60000ms exceeded. at ../page-objects/page.ts:14 12 | */ 13 | async pause(milliseconds: number): Promise<void> { > 14 | await this.page.waitForTimeout(milliseconds) | ^ 15 | } 16 | 17 | public async press(key: string, options?: { times?: number }): Promise<void> { at TinyMCE7.pause (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/page.ts:14:21) at TinyMCE7.focus (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/base_editor.ts:349:16) at TinyMCE7.clear (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/base_editor.ts:535:5) at /home/runner/work/html-integrations/html-integrations/tests/e2e/tests/edit/edit_corner_cases.spec.ts:72:7

Check failure on line 14 in tests/e2e/page-objects/page.ts

View workflow job for this annotation

GitHub Actions / E2E Tests - tinymce7

[webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:34:9 › Edit equation (corner cases) - tinymce7 editor › MTHTML-85 User edits a formula and continues typing text: tinymce7 editor @tinymce7 @regression

2) [webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:34:9 › Edit equation (corner cases) - tinymce7 editor › MTHTML-85 User edits a formula and continues typing text: tinymce7 editor @tinymce7 @regression Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: page.waitForTimeout: Test timeout of 60000ms exceeded. at ../page-objects/page.ts:14 12 | */ 13 | async pause(milliseconds: number): Promise<void> { > 14 | await this.page.waitForTimeout(milliseconds) | ^ 15 | } 16 | 17 | public async press(key: string, options?: { times?: number }): Promise<void> { at WirisEditor.pause (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/page.ts:14:21) at WirisEditor.typeEquationViaKeyboard (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/wiris_editor.ts:125:16) at WirisEditor.insertEquationViaKeyboard (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/wiris_editor.ts:132:5) at /home/runner/work/html-integrations/html-integrations/tests/e2e/tests/edit/edit_corner_cases.spec.ts:46:7

Check failure on line 14 in tests/e2e/page-objects/page.ts

View workflow job for this annotation

GitHub Actions / E2E Tests - tinymce7

[webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:34:9 › Edit equation (corner cases) - tinymce7 editor › MTHTML-85 User edits a formula and continues typing text: tinymce7 editor @tinymce7 @regression

2) [webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:34:9 › Edit equation (corner cases) - tinymce7 editor › MTHTML-85 User edits a formula and continues typing text: tinymce7 editor @tinymce7 @regression Error: page.waitForTimeout: Target page, context or browser has been closed at ../page-objects/page.ts:14 12 | */ 13 | async pause(milliseconds: number): Promise<void> { > 14 | await this.page.waitForTimeout(milliseconds) | ^ 15 | } 16 | 17 | public async press(key: string, options?: { times?: number }): Promise<void> { at WirisEditor.pause (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/page.ts:14:21) at WirisEditor.typeEquationViaKeyboard (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/wiris_editor.ts:125:16) at WirisEditor.insertEquationViaKeyboard (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/wiris_editor.ts:132:5) at /home/runner/work/html-integrations/html-integrations/tests/e2e/tests/edit/edit_corner_cases.spec.ts:46:7

Check failure on line 14 in tests/e2e/page-objects/page.ts

View workflow job for this annotation

GitHub Actions / E2E Tests - tinymce5

[webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:34:9 › Edit equation (corner cases) - tinymce5 editor › MTHTML-85 User edits a formula and continues typing text: tinymce5 editor @tinymce5 @regression

2) [webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:34:9 › Edit equation (corner cases) - tinymce5 editor › MTHTML-85 User edits a formula and continues typing text: tinymce5 editor @tinymce5 @regression Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: page.waitForTimeout: Test timeout of 60000ms exceeded. at ../page-objects/page.ts:14 12 | */ 13 | async pause(milliseconds: number): Promise<void> { > 14 | await this.page.waitForTimeout(milliseconds) | ^ 15 | } 16 | 17 | public async press(key: string, options?: { times?: number }): Promise<void> { at WirisEditor.pause (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/page.ts:14:21) at WirisEditor.typeEquationViaKeyboard (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/wiris_editor.ts:123:16) at WirisEditor.insertEquationViaKeyboard (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/wiris_editor.ts:132:5) at /home/runner/work/html-integrations/html-integrations/tests/e2e/tests/edit/edit_corner_cases.spec.ts:46:7

Check failure on line 14 in tests/e2e/page-objects/page.ts

View workflow job for this annotation

GitHub Actions / E2E Tests - tinymce5

[webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:34:9 › Edit equation (corner cases) - tinymce5 editor › MTHTML-85 User edits a formula and continues typing text: tinymce5 editor @tinymce5 @regression

2) [webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:34:9 › Edit equation (corner cases) - tinymce5 editor › MTHTML-85 User edits a formula and continues typing text: tinymce5 editor @tinymce5 @regression Error: page.waitForTimeout: Test timeout of 60000ms exceeded. at ../page-objects/page.ts:14 12 | */ 13 | async pause(milliseconds: number): Promise<void> { > 14 | await this.page.waitForTimeout(milliseconds) | ^ 15 | } 16 | 17 | public async press(key: string, options?: { times?: number }): Promise<void> { at WirisEditor.pause (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/page.ts:14:21) at WirisEditor.typeEquationViaKeyboard (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/wiris_editor.ts:125:16) at WirisEditor.insertEquationViaKeyboard (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/wiris_editor.ts:132:5) at /home/runner/work/html-integrations/html-integrations/tests/e2e/tests/edit/edit_corner_cases.spec.ts:46:7

Check failure on line 14 in tests/e2e/page-objects/page.ts

View workflow job for this annotation

GitHub Actions / E2E Tests - tinymce5

[webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:13:9 › Edit equation (corner cases) - tinymce5 editor › MTHTML-81 Edit styled equation: tinymce5 editor @tinymce5 @regression

1) [webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:13:9 › Edit equation (corner cases) - tinymce5 editor › MTHTML-81 Edit styled equation: tinymce5 editor @tinymce5 @regression Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: page.waitForTimeout: Test timeout of 60000ms exceeded. at ../page-objects/page.ts:14 12 | */ 13 | async pause(milliseconds: number): Promise<void> { > 14 | await this.page.waitForTimeout(milliseconds) | ^ 15 | } 16 | 17 | public async press(key: string, options?: { times?: number }): Promise<void> { at WirisEditor.pause (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/page.ts:14:21) at WirisEditor.typeEquationViaKeyboard (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/wiris_editor.ts:125:16) at /home/runner/work/html-integrations/html-integrations/tests/e2e/tests/edit/edit_corner_cases.spec.ts:25:7

Check failure on line 14 in tests/e2e/page-objects/page.ts

View workflow job for this annotation

GitHub Actions / E2E Tests - tinymce8

[webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:34:9 › Edit equation (corner cases) - tinymce8 editor › MTHTML-85 User edits a formula and continues typing text: tinymce8 editor @tinymce8 @regression

3) [webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:34:9 › Edit equation (corner cases) - tinymce8 editor › MTHTML-85 User edits a formula and continues typing text: tinymce8 editor @tinymce8 @regression Error: page.waitForTimeout: Test timeout of 60000ms exceeded. at ../page-objects/page.ts:14 12 | */ 13 | async pause(milliseconds: number): Promise<void> { > 14 | await this.page.waitForTimeout(milliseconds) | ^ 15 | } 16 | 17 | public async press(key: string, options?: { times?: number }): Promise<void> { at WirisEditor.pause (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/page.ts:14:21) at WirisEditor.typeEquationViaKeyboard (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/wiris_editor.ts:125:16) at WirisEditor.insertEquationViaKeyboard (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/wiris_editor.ts:132:5) at /home/runner/work/html-integrations/html-integrations/tests/e2e/tests/edit/edit_corner_cases.spec.ts:46:7

Check failure on line 14 in tests/e2e/page-objects/page.ts

View workflow job for this annotation

GitHub Actions / E2E Tests - tinymce8

[webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:13:9 › Edit equation (corner cases) - tinymce8 editor › MTHTML-81 Edit styled equation: tinymce8 editor @tinymce8 @regression

2) [webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:13:9 › Edit equation (corner cases) - tinymce8 editor › MTHTML-81 Edit styled equation: tinymce8 editor @tinymce8 @regression Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: page.waitForTimeout: Test timeout of 60000ms exceeded. at ../page-objects/page.ts:14 12 | */ 13 | async pause(milliseconds: number): Promise<void> { > 14 | await this.page.waitForTimeout(milliseconds) | ^ 15 | } 16 | 17 | public async press(key: string, options?: { times?: number }): Promise<void> { at WirisEditor.pause (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/page.ts:14:21) at WirisEditor.typeEquationViaKeyboard (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/wiris_editor.ts:125:16) at /home/runner/work/html-integrations/html-integrations/tests/e2e/tests/edit/edit_corner_cases.spec.ts:25:7

Check failure on line 14 in tests/e2e/page-objects/page.ts

View workflow job for this annotation

GitHub Actions / E2E Tests - tinymce8

[webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:13:9 › Edit equation (corner cases) - tinymce8 editor › MTHTML-81 Edit styled equation: tinymce8 editor @tinymce8 @regression

2) [webkit] › tests/e2e/tests/edit/edit_corner_cases.spec.ts:13:9 › Edit equation (corner cases) - tinymce8 editor › MTHTML-81 Edit styled equation: tinymce8 editor @tinymce8 @regression Error: page.waitForTimeout: Test timeout of 60000ms exceeded. at ../page-objects/page.ts:14 12 | */ 13 | async pause(milliseconds: number): Promise<void> { > 14 | await this.page.waitForTimeout(milliseconds) | ^ 15 | } 16 | 17 | public async press(key: string, options?: { times?: number }): Promise<void> { at WirisEditor.pause (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/page.ts:14:21) at WirisEditor.typeEquationViaKeyboard (/home/runner/work/html-integrations/html-integrations/tests/e2e/page-objects/wiris_editor.ts:123:16) at /home/runner/work/html-integrations/html-integrations/tests/e2e/tests/edit/edit_corner_cases.spec.ts:25:7
}

public async press(key: string, options?: { times?: number }): Promise<void> {
const times = options?.times || 1
for (let i = 0; i < times; i++) {
await this.page.keyboard.press(key)
}
}

public async type(text: string): Promise<void> {
await this.page.keyboard.type(text)
}
}
Loading
Loading