Skip to content
Draft
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
9 changes: 2 additions & 7 deletions src/engine-scripts/puppet/echo.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
const moduleReady = require( './moduleReady' );

/**
* Setup Echo notifications
*
Expand All @@ -15,15 +13,12 @@ module.exports = async ( page, hashtags ) => {

// Open the drawer for tests that require interaction
if ( hashtags.includes( '#echo-drawer' ) ) {
await moduleReady( page, 'ext.echo.init' );
await page.evaluate( async () => {
const btn = document.querySelector( '#pt-notifications-alert a' );
btn.click();
} );
await moduleReady(
page,
hashtags.includes( '#mobile' ) ? 'ext.echo.mobile' : 'ext.echo.ui.desktop'
);
// Wait for JS to load.
await page.waitForNetworkIdle();

// Wait for the OOUI pending element to disappear.
await page.waitForSelector( '.oo-ui-pendingElement-pending', {
Expand Down
44 changes: 0 additions & 44 deletions src/engine-scripts/puppet/jsReady.js

This file was deleted.

20 changes: 0 additions & 20 deletions src/engine-scripts/puppet/moduleReady.js

This file was deleted.

4 changes: 2 additions & 2 deletions src/engine-scripts/puppet/onReady.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ module.exports = async ( page, scenario ) => {
const label = scenario.label;
const hashtags = label.match( /(#[^ ,)]*)/g ) || [];

// Make sure the main skin JavaScript module has loaded.
await require( './jsReady' )( page, hashtags );
// Wait for async js to finish loading.
await page.waitForNetworkIdle();

if ( hashtags.includes( '#scroll' ) ) {
await require( './scroll.js' )( page );
Expand Down
6 changes: 3 additions & 3 deletions src/engine-scripts/puppet/search.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
const moduleReady = require( './moduleReady' );
const fastForwardAnimations = require( './fastForwardAnimations' );

/**
Expand Down Expand Up @@ -49,8 +48,9 @@ module.exports = async ( page, hashtags ) => {
} else {
// Make sure Codex kicked in.
await page.waitForSelector( '.cdx-typeahead-search' );
// Wait for Vue to load.
await moduleReady( page, 'vue' );
// Wait for JS to load.
await page.waitForNetworkIdle();

// focus and type into the newly added input
await page.focus( selectorSearchInput );
await page.keyboard.type( 't' );
Expand Down