From 9b66f9d9d31eb2fdeeac8b54e709318d78438f93 Mon Sep 17 00:00:00 2001 From: Johannes Siipola Date: Mon, 18 Dec 2023 15:00:17 +0200 Subject: [PATCH] Fix test --- tests/acceptance/AcceptanceCest.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/acceptance/AcceptanceCest.php b/tests/acceptance/AcceptanceCest.php index bcf1182..90f8af9 100644 --- a/tests/acceptance/AcceptanceCest.php +++ b/tests/acceptance/AcceptanceCest.php @@ -19,8 +19,6 @@ public function iSeeDropCap(AcceptanceTester $I) $I->loginAsAdmin(); $I->amOnPage('wp-admin/post-new.php'); - //$I->clickTextField(); - if (version_compare($wp_version, '6.3', 'ge')) { $I->switchToIFrame("editor-canvas"); $I->wait(1); @@ -30,7 +28,10 @@ public function iSeeDropCap(AcceptanceTester $I) $I->click('.block-editor-default-block-appender__content'); } - if (version_compare($wp_version, '6.0', 'ge')) { + if (version_compare($wp_version, '6.4', 'ge')) { + $I->click("aria-label='Typography options']"); + $I->wait(1); + } else if (version_compare($wp_version, '6.0', 'ge')) { $I->click('//*[@id="editor"]/div/div[1]/div[1]/div[2]/div[3]/div/div[3]/div/div[3]/div[1]/div/button'); $I->wait(1); } @@ -44,7 +45,6 @@ public function iActivatePlugin(AcceptanceTester $I) { $I->loginAsAdmin(); $I->amOnPluginsPage(); - //$I->activatePlugin('remove-drop-cap'); $I->activatePlugin('disable-drop-cap'); } @@ -64,9 +64,11 @@ public function iDontSeeDropCap(AcceptanceTester $I) } else { $I->click('.block-editor-default-block-appender__content'); } - //$I->clickTextField(); - if (version_compare($wp_version, '6.0', 'ge')) { + if (version_compare($wp_version, '6.4', 'ge')) { + $I->click("aria-label='Typography options']"); + $I->wait(1); + } else if (version_compare($wp_version, '6.0', 'ge')) { $I->click('//*[@id="editor"]/div/div[1]/div[1]/div[2]/div[3]/div/div[3]/div/div[3]/div[1]/div/button'); $I->wait(1); }