Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing E2E tests in WP 6.7 #2813

Merged
merged 15 commits into from
Dec 9, 2024
Merged
64 changes: 42 additions & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/llms-e2e-test-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"main": "src/index.js",
"dependencies": {
"@wordpress/e2e-test-utils": "^7.0.0",
"@wordpress/e2e-test-utils": "^11.13.0",
"css-xpath": "^1.0.0",
"semver": "^7.3.5"
},
Expand Down
6 changes: 4 additions & 2 deletions packages/llms-e2e-test-utils/src/run-setup-wizard.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { findElementByText } from './find-element-by-text';
import { wpVersionCompare } from './wp-version-compare';
import { dismissEditorWelcomeGuide } from './dismiss-editor-welcome-guide';

import { visitAdminPage } from '@wordpress/e2e-test-utils';
import { visitAdminPage, clickButton } from '@wordpress/e2e-test-utils';

/**
* Retrieve the Setup Wizard Page Title.
Expand Down Expand Up @@ -83,7 +83,9 @@ export async function runSetupWizard( {
await clickElementByText( courseTitle, 'h3' );
}

await clickAndWait( '.llms-setup-actions .llms-button-primary' );
await clickButton( 'Import Courses' );

await page.waitForNavigation();

if ( 1 === coursesToImport.length ) {
// Single course imported.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,10 @@ public function test_dismiss_nope() {
try {
$this->main->dismiss();
} catch ( WPDieException $e ) {
$review = get_option( 'llms_review' );

$this->assertEquals( array(
'time' => time(),
'dismissed' => true,
'success' => 'no',
), get_option( 'llms_review' ) );
$this->assertTrue( $review['dismissed'] );
$this->assertEquals( 'no', $review['success'] );

}

Expand Down
Loading