Remove old close button from Woo Checkout acceptance test

[MAILPOET-5713]
This commit is contained in:
Jan Lysý
2023-12-05 19:21:10 +01:00
committed by Aschepikov
parent de81998ae3
commit 09c4cbb10c

View File

@ -240,19 +240,12 @@ class WooCheckoutBlocksCest {
* Close dialog when is visible.
*/
private function closeDialog(\AcceptanceTester $i): void {
// Todo: [MAILPOET-5164] Remove when testing with WC 6.2
$oldCloseButton = $i->executeJS('return document.querySelectorAll("button[aria-label=\'Close dialog\']");');
$closeButton = $i->executeJS('return document.querySelectorAll("button[aria-label=\'Close\']");');
if ($closeButton) {
$i->click('button[aria-label="Close"]');
$i->waitForElementNotVisible('button[aria-label="Close"]');
}
// Todo: [MAILPOET-5164] Remove when testing with WC 6.2 MAILPOET-5164
if ($oldCloseButton) {
$i->click('button[aria-label="Close dialog"]');
$i->waitForElementNotVisible('button[aria-label="Close dialog"]');
}
}
private function createCheckoutPage(\AcceptanceTester $i, string $postContent = ''): int {