[cypress] Always wait for the Citoid inspector

The application logic is not quite ready even if the inspector is
shown. So we should always wait before clicking there.

Change-Id: If81dfb676b6a25c9eba0711e774ae45b3988bca2
This commit is contained in:
WMDE-Fisch 2024-11-01 09:19:21 +01:00
parent c9ab25159a
commit 4a1e04e7c4
2 changed files with 3 additions and 4 deletions

View file

@ -36,8 +36,6 @@ describe( 'Visual Editor Wt 2017 Cite Integration', () => {
} ); } );
it( 'should be able to create a basic reference', () => { it( 'should be able to create a basic reference', () => {
// FIXME: Fix application logic to only render once fully initialized.
cy.wait( 1000 );
if ( usesCitoid ) { if ( usesCitoid ) {
cy.get( '.ve-ui-toolbar-group-citoid' ).click(); cy.get( '.ve-ui-toolbar-group-citoid' ).click();
cy.wait( 500 ); cy.wait( 500 );
@ -65,8 +63,6 @@ describe( 'Visual Editor Wt 2017 Cite Integration', () => {
} ); } );
it( 'should be able to create a VE-Cite tool template', () => { it( 'should be able to create a VE-Cite tool template', () => {
// FIXME: Replace this wait with a trigger when VE is fully initialized.
cy.wait( 1000 );
if ( usesCitoid ) { if ( usesCitoid ) {
cy.get( '.ve-ui-toolbar-group-citoid' ).click(); cy.get( '.ve-ui-toolbar-group-citoid' ).click();
cy.wait( 500 ); cy.wait( 500 );

View file

@ -34,6 +34,9 @@ export function waitForVECiteToLoad() {
export function waitForVECitoidToLoad() { export function waitForVECitoidToLoad() {
helpers.waitForModuleReady( 'ext.citoid.visualEditor' ); helpers.waitForModuleReady( 'ext.citoid.visualEditor' );
// FIXME: Fix application logic to only render once fully initialized.
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait( 1000 );
} }
export function getVEFootnoteMarker( refName, sequenceNumber, index ) { export function getVEFootnoteMarker( refName, sequenceNumber, index ) {