From 1657d1ad7c0cd060c137a665601fb94ddecd313f Mon Sep 17 00:00:00 2001 From: Spencer Gabhart Date: Tue, 20 Dec 2022 09:33:57 -0500 Subject: [PATCH 1/9] ASD-1020 - (wip) Testing conditions for second screen behavior --- Test/Mftf-24/Helper/HandlePopupSecondScreen.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Test/Mftf-24/Helper/HandlePopupSecondScreen.php b/Test/Mftf-24/Helper/HandlePopupSecondScreen.php index 1956b1dd8..bfbc80178 100644 --- a/Test/Mftf-24/Helper/HandlePopupSecondScreen.php +++ b/Test/Mftf-24/Helper/HandlePopupSecondScreen.php @@ -23,6 +23,8 @@ public function handleClickOnly($signInButton) $remoteWebDriver->findElement( WebDriverBy::cssSelector($signInButton) )->click(); + + $magentoWebDriver->waitForJS('return document.querySelector(".maxo_spinner.hide") !== null;', 15); $magentoWebDriver->switchToNextTab(); $magentoWebDriver->wait(5); } catch (\Exception $ex) { @@ -68,10 +70,6 @@ public function navigateToAddressAndPaymentOptions( if (empty($continueAs) && empty($checkout)) { $stepLog[] = 'Popup didn\'t finish loading, closing popup and re-initiating Amazon Pay'; - // $url = $magentoWebDriver->_getCurrentUri(); - // $magentoWebDriver->amOnPage($url); - // $magentoWebDriver->wait(3); - $stepLog[] = 'Closing tab'; $magentoWebDriver->closeTab(); $stepLog[] = 'Switching back to opener'; From 1970731d569822cd9b23f8ac0d6d3c04ab7cf587 Mon Sep 17 00:00:00 2001 From: Spencer Gabhart Date: Tue, 20 Dec 2022 12:34:48 -0500 Subject: [PATCH 2/9] ASD-1020 - (wip) Better react to behavior of popup second screen --- Test/Mftf-23/ActionGroup/AmazonBeginLoginOnlyActionGroup.xml | 2 ++ Test/Mftf-23/ActionGroup/AmazonLoginActionGroup.xml | 2 ++ Test/Mftf-23/ActionGroup/AmazonLoginAndCheckoutActionGroup.xml | 2 ++ Test/Mftf-23/ActionGroup/AmazonLoginOnlyActionGroup.xml | 2 ++ Test/Mftf-23/ActionGroup/AmazonLoginOnlyRedirectActionGroup.xml | 2 ++ Test/Mftf-23/Test/AmazonCancelReturnUrl.xml | 2 ++ 6 files changed, 12 insertions(+) diff --git a/Test/Mftf-23/ActionGroup/AmazonBeginLoginOnlyActionGroup.xml b/Test/Mftf-23/ActionGroup/AmazonBeginLoginOnlyActionGroup.xml index df51bf8e7..eff550f23 100644 --- a/Test/Mftf-23/ActionGroup/AmazonBeginLoginOnlyActionGroup.xml +++ b/Test/Mftf-23/ActionGroup/AmazonBeginLoginOnlyActionGroup.xml @@ -11,6 +11,8 @@ $remoteWebDriver->findElement( \Facebook\WebDriver\WebDriverBy::cssSelector('{{AmazonPageSection.signInButton}}') )->click(); + + $I->waitForJS('return document.querySelector('.maxo_spinner.hide') !== null;', 15); $remoteWebDriver->switchTo()->window($openerName); $I->wait(5); } catch (\Exception $ex) { diff --git a/Test/Mftf-23/ActionGroup/AmazonLoginActionGroup.xml b/Test/Mftf-23/ActionGroup/AmazonLoginActionGroup.xml index 530da756d..9ceac374a 100644 --- a/Test/Mftf-23/ActionGroup/AmazonLoginActionGroup.xml +++ b/Test/Mftf-23/ActionGroup/AmazonLoginActionGroup.xml @@ -11,6 +11,8 @@ $remoteWebDriver->findElement( \Facebook\WebDriver\WebDriverBy::cssSelector('{{AmazonPageSection.signInButton}}') )->click(); + + $I->waitForJS('return document.querySelector('.maxo_spinner.hide') !== null;', 15); $remoteWebDriver->switchTo()->window($openerName); $I->wait(5); } catch (\Exception $ex) { diff --git a/Test/Mftf-23/ActionGroup/AmazonLoginAndCheckoutActionGroup.xml b/Test/Mftf-23/ActionGroup/AmazonLoginAndCheckoutActionGroup.xml index 4f5bd2a45..7bdb49f58 100644 --- a/Test/Mftf-23/ActionGroup/AmazonLoginAndCheckoutActionGroup.xml +++ b/Test/Mftf-23/ActionGroup/AmazonLoginAndCheckoutActionGroup.xml @@ -28,6 +28,8 @@ $remoteWebDriver->findElement( \Facebook\WebDriver\WebDriverBy::cssSelector('{{AmazonPageSection.signInButton}}') )->click(); + + $I->waitForJS('return document.querySelector('.maxo_spinner.hide') !== null;', 15); $remoteWebDriver->switchTo()->window($openerName); $I->wait(5); } catch (\Exception $ex) { diff --git a/Test/Mftf-23/ActionGroup/AmazonLoginOnlyActionGroup.xml b/Test/Mftf-23/ActionGroup/AmazonLoginOnlyActionGroup.xml index b9aa176cf..cae591d72 100644 --- a/Test/Mftf-23/ActionGroup/AmazonLoginOnlyActionGroup.xml +++ b/Test/Mftf-23/ActionGroup/AmazonLoginOnlyActionGroup.xml @@ -23,6 +23,8 @@ $remoteWebDriver->findElement( \Facebook\WebDriver\WebDriverBy::cssSelector('{{AmazonPageSection.signInButton}}') )->click(); + + $I->waitForJS('return document.querySelector('.maxo_spinner.hide') !== null;', 15); $remoteWebDriver->switchTo()->window($openerName); $I->wait(5); } catch (\Exception $ex) { diff --git a/Test/Mftf-23/ActionGroup/AmazonLoginOnlyRedirectActionGroup.xml b/Test/Mftf-23/ActionGroup/AmazonLoginOnlyRedirectActionGroup.xml index cef9aeef8..4d479e2d0 100644 --- a/Test/Mftf-23/ActionGroup/AmazonLoginOnlyRedirectActionGroup.xml +++ b/Test/Mftf-23/ActionGroup/AmazonLoginOnlyRedirectActionGroup.xml @@ -11,6 +11,8 @@ $remoteWebDriver->findElement( \Facebook\WebDriver\WebDriverBy::cssSelector('{{AmazonPageSection.signInButton}}') )->click(); + + $I->waitForJS('return document.querySelector('.maxo_spinner.hide') !== null;', 15); $remoteWebDriver->switchTo()->window($openerName); $I->wait(5); } catch (\Exception $ex) { diff --git a/Test/Mftf-23/Test/AmazonCancelReturnUrl.xml b/Test/Mftf-23/Test/AmazonCancelReturnUrl.xml index f3bc78234..48063bfda 100644 --- a/Test/Mftf-23/Test/AmazonCancelReturnUrl.xml +++ b/Test/Mftf-23/Test/AmazonCancelReturnUrl.xml @@ -67,6 +67,8 @@ $remoteWebDriver->findElement( \Facebook\WebDriver\WebDriverBy::cssSelector('{{AmazonPageSection.signInButton}}') )->click(); + + $I->waitForJS('return document.querySelector('.maxo_spinner.hide') !== null;', 15); $remoteWebDriver->switchTo()->window($openerName); $I->wait(5); } catch (\Exception $ex) { From 1e7e86013c042130ea6bd83da9701f8bfb3f2700 Mon Sep 17 00:00:00 2001 From: Spencer Gabhart Date: Thu, 2 Feb 2023 15:59:54 -0500 Subject: [PATCH 3/9] ASD-1020 - MFTF tweaks for address change/sign in failures --- .../AmazonLoginAndCheckoutActionGroup.xml | 1 + .../AmazonLoginOnlyRedirectActionGroup.xml | 18 +++++++----------- Test/Mftf-24/Section/AmazonLoginSection.xml | 1 + .../Test/AmazonSignInToExistingTest.xml | 8 +++----- 4 files changed, 12 insertions(+), 16 deletions(-) diff --git a/Test/Mftf-23/ActionGroup/AmazonLoginAndCheckoutActionGroup.xml b/Test/Mftf-23/ActionGroup/AmazonLoginAndCheckoutActionGroup.xml index 7bdb49f58..ed3ba08f1 100644 --- a/Test/Mftf-23/ActionGroup/AmazonLoginAndCheckoutActionGroup.xml +++ b/Test/Mftf-23/ActionGroup/AmazonLoginAndCheckoutActionGroup.xml @@ -90,6 +90,7 @@ + diff --git a/Test/Mftf-24/ActionGroup/AmazonLoginOnlyRedirectActionGroup.xml b/Test/Mftf-24/ActionGroup/AmazonLoginOnlyRedirectActionGroup.xml index 4363598c0..ef4fd7d83 100644 --- a/Test/Mftf-24/ActionGroup/AmazonLoginOnlyRedirectActionGroup.xml +++ b/Test/Mftf-24/ActionGroup/AmazonLoginOnlyRedirectActionGroup.xml @@ -1,17 +1,13 @@ - - - - - - - {{AmazonPageSection.signInButton}} - + + + - - {{AmazonLoginSection.consentButton}} - + + + + diff --git a/Test/Mftf-24/Section/AmazonLoginSection.xml b/Test/Mftf-24/Section/AmazonLoginSection.xml index 5ad1e5aac..be780bc5e 100644 --- a/Test/Mftf-24/Section/AmazonLoginSection.xml +++ b/Test/Mftf-24/Section/AmazonLoginSection.xml @@ -3,6 +3,7 @@
+
diff --git a/Test/Mftf-24/Test/AmazonSignInToExistingTest.xml b/Test/Mftf-24/Test/AmazonSignInToExistingTest.xml index ac47521e0..d80deaec0 100644 --- a/Test/Mftf-24/Test/AmazonSignInToExistingTest.xml +++ b/Test/Mftf-24/Test/AmazonSignInToExistingTest.xml @@ -38,11 +38,9 @@ - - - - - + + + From f2b12ee2f3ce2d2d61108b7190d1cb4cc1280b9b Mon Sep 17 00:00:00 2001 From: Spencer Gabhart Date: Fri, 3 Feb 2023 09:40:31 -0500 Subject: [PATCH 4/9] ASD-1020 - Revert MFTF changes (wait for Amazon loader) --- Test/Mftf-23/ActionGroup/AmazonBeginLoginOnlyActionGroup.xml | 2 -- Test/Mftf-23/ActionGroup/AmazonLoginActionGroup.xml | 2 -- Test/Mftf-23/ActionGroup/AmazonLoginAndCheckoutActionGroup.xml | 2 -- Test/Mftf-23/ActionGroup/AmazonLoginOnlyActionGroup.xml | 2 -- Test/Mftf-23/ActionGroup/AmazonLoginOnlyRedirectActionGroup.xml | 2 -- Test/Mftf-23/Test/AmazonCancelReturnUrl.xml | 2 -- 6 files changed, 12 deletions(-) diff --git a/Test/Mftf-23/ActionGroup/AmazonBeginLoginOnlyActionGroup.xml b/Test/Mftf-23/ActionGroup/AmazonBeginLoginOnlyActionGroup.xml index eff550f23..df51bf8e7 100644 --- a/Test/Mftf-23/ActionGroup/AmazonBeginLoginOnlyActionGroup.xml +++ b/Test/Mftf-23/ActionGroup/AmazonBeginLoginOnlyActionGroup.xml @@ -11,8 +11,6 @@ $remoteWebDriver->findElement( \Facebook\WebDriver\WebDriverBy::cssSelector('{{AmazonPageSection.signInButton}}') )->click(); - - $I->waitForJS('return document.querySelector('.maxo_spinner.hide') !== null;', 15); $remoteWebDriver->switchTo()->window($openerName); $I->wait(5); } catch (\Exception $ex) { diff --git a/Test/Mftf-23/ActionGroup/AmazonLoginActionGroup.xml b/Test/Mftf-23/ActionGroup/AmazonLoginActionGroup.xml index 9ceac374a..530da756d 100644 --- a/Test/Mftf-23/ActionGroup/AmazonLoginActionGroup.xml +++ b/Test/Mftf-23/ActionGroup/AmazonLoginActionGroup.xml @@ -11,8 +11,6 @@ $remoteWebDriver->findElement( \Facebook\WebDriver\WebDriverBy::cssSelector('{{AmazonPageSection.signInButton}}') )->click(); - - $I->waitForJS('return document.querySelector('.maxo_spinner.hide') !== null;', 15); $remoteWebDriver->switchTo()->window($openerName); $I->wait(5); } catch (\Exception $ex) { diff --git a/Test/Mftf-23/ActionGroup/AmazonLoginAndCheckoutActionGroup.xml b/Test/Mftf-23/ActionGroup/AmazonLoginAndCheckoutActionGroup.xml index ed3ba08f1..48c0919f8 100644 --- a/Test/Mftf-23/ActionGroup/AmazonLoginAndCheckoutActionGroup.xml +++ b/Test/Mftf-23/ActionGroup/AmazonLoginAndCheckoutActionGroup.xml @@ -28,8 +28,6 @@ $remoteWebDriver->findElement( \Facebook\WebDriver\WebDriverBy::cssSelector('{{AmazonPageSection.signInButton}}') )->click(); - - $I->waitForJS('return document.querySelector('.maxo_spinner.hide') !== null;', 15); $remoteWebDriver->switchTo()->window($openerName); $I->wait(5); } catch (\Exception $ex) { diff --git a/Test/Mftf-23/ActionGroup/AmazonLoginOnlyActionGroup.xml b/Test/Mftf-23/ActionGroup/AmazonLoginOnlyActionGroup.xml index cae591d72..b9aa176cf 100644 --- a/Test/Mftf-23/ActionGroup/AmazonLoginOnlyActionGroup.xml +++ b/Test/Mftf-23/ActionGroup/AmazonLoginOnlyActionGroup.xml @@ -23,8 +23,6 @@ $remoteWebDriver->findElement( \Facebook\WebDriver\WebDriverBy::cssSelector('{{AmazonPageSection.signInButton}}') )->click(); - - $I->waitForJS('return document.querySelector('.maxo_spinner.hide') !== null;', 15); $remoteWebDriver->switchTo()->window($openerName); $I->wait(5); } catch (\Exception $ex) { diff --git a/Test/Mftf-23/ActionGroup/AmazonLoginOnlyRedirectActionGroup.xml b/Test/Mftf-23/ActionGroup/AmazonLoginOnlyRedirectActionGroup.xml index 4d479e2d0..cef9aeef8 100644 --- a/Test/Mftf-23/ActionGroup/AmazonLoginOnlyRedirectActionGroup.xml +++ b/Test/Mftf-23/ActionGroup/AmazonLoginOnlyRedirectActionGroup.xml @@ -11,8 +11,6 @@ $remoteWebDriver->findElement( \Facebook\WebDriver\WebDriverBy::cssSelector('{{AmazonPageSection.signInButton}}') )->click(); - - $I->waitForJS('return document.querySelector('.maxo_spinner.hide') !== null;', 15); $remoteWebDriver->switchTo()->window($openerName); $I->wait(5); } catch (\Exception $ex) { diff --git a/Test/Mftf-23/Test/AmazonCancelReturnUrl.xml b/Test/Mftf-23/Test/AmazonCancelReturnUrl.xml index 48063bfda..f3bc78234 100644 --- a/Test/Mftf-23/Test/AmazonCancelReturnUrl.xml +++ b/Test/Mftf-23/Test/AmazonCancelReturnUrl.xml @@ -67,8 +67,6 @@ $remoteWebDriver->findElement( \Facebook\WebDriver\WebDriverBy::cssSelector('{{AmazonPageSection.signInButton}}') )->click(); - - $I->waitForJS('return document.querySelector('.maxo_spinner.hide') !== null;', 15); $remoteWebDriver->switchTo()->window($openerName); $I->wait(5); } catch (\Exception $ex) { From 0dda6dfc2ed0a2f92bd57cd8b1670cf641a2c9e6 Mon Sep 17 00:00:00 2001 From: Spencer Gabhart Date: Fri, 3 Feb 2023 09:44:21 -0500 Subject: [PATCH 5/9] ASD-1020 - Remove wait for Amazon loader from popup helper --- Test/Mftf-24/Helper/HandlePopupSecondScreen.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/Test/Mftf-24/Helper/HandlePopupSecondScreen.php b/Test/Mftf-24/Helper/HandlePopupSecondScreen.php index bfbc80178..707a7fff9 100644 --- a/Test/Mftf-24/Helper/HandlePopupSecondScreen.php +++ b/Test/Mftf-24/Helper/HandlePopupSecondScreen.php @@ -23,8 +23,6 @@ public function handleClickOnly($signInButton) $remoteWebDriver->findElement( WebDriverBy::cssSelector($signInButton) )->click(); - - $magentoWebDriver->waitForJS('return document.querySelector(".maxo_spinner.hide") !== null;', 15); $magentoWebDriver->switchToNextTab(); $magentoWebDriver->wait(5); } catch (\Exception $ex) { From 7ca7403b6970d3bb489314c3180d754f763b2d40 Mon Sep 17 00:00:00 2001 From: Spencer Gabhart Date: Wed, 8 Feb 2023 13:15:56 -0500 Subject: [PATCH 6/9] ASD-1020 - Amazon Sign In fix for 2.4 MFTFs --- Test/Mftf-24/Test/AmazonSignInToExistingTest.xml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Test/Mftf-24/Test/AmazonSignInToExistingTest.xml b/Test/Mftf-24/Test/AmazonSignInToExistingTest.xml index d80deaec0..246afaf53 100644 --- a/Test/Mftf-24/Test/AmazonSignInToExistingTest.xml +++ b/Test/Mftf-24/Test/AmazonSignInToExistingTest.xml @@ -35,12 +35,10 @@ + - - - - + From a1ea473a5ec3d60f2d404c1d5d2935382f437eac Mon Sep 17 00:00:00 2001 From: Spencer Gabhart Date: Fri, 10 Feb 2023 14:12:58 -0500 Subject: [PATCH 7/9] ASD-1020 - Remove doubled click on AP Sign In button (MFTF 2.4) --- Test/Mftf-24/Test/AmazonSignInToExistingTest.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/Test/Mftf-24/Test/AmazonSignInToExistingTest.xml b/Test/Mftf-24/Test/AmazonSignInToExistingTest.xml index 246afaf53..3f799a3a1 100644 --- a/Test/Mftf-24/Test/AmazonSignInToExistingTest.xml +++ b/Test/Mftf-24/Test/AmazonSignInToExistingTest.xml @@ -36,8 +36,6 @@ - - From 1269a9a94b85fd3c4c45567a3da084ce5a4e6137 Mon Sep 17 00:00:00 2001 From: Spencer Gabhart Date: Mon, 10 Apr 2023 10:26:30 -0400 Subject: [PATCH 8/9] ASD-1060 - Remove trailing comma in parameter list of CheckoutSessionManagement constructor --- Model/CheckoutSessionManagement.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Model/CheckoutSessionManagement.php b/Model/CheckoutSessionManagement.php index a059ed1af..c672b24fc 100755 --- a/Model/CheckoutSessionManagement.php +++ b/Model/CheckoutSessionManagement.php @@ -279,7 +279,7 @@ public function __construct( \Amazon\Pay\Logger\Logger $logger, Session $session, Translate $translationRenderer, - UpdateCouponUsages $updateCouponUsages, + UpdateCouponUsages $updateCouponUsages ) { $this->storeManager = $storeManager; $this->quoteIdMaskFactory = $quoteIdMaskFactory; From 872c43567c7f8ceae5ccbf170fee68ae93779bcd Mon Sep 17 00:00:00 2001 From: Spencer Gabhart Date: Mon, 10 Apr 2023 10:31:32 -0400 Subject: [PATCH 9/9] Version bump to 5.14.3 and update changelog --- CHANGELOG.md | 3 +++ README.md | 2 +- composer.json | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a649567b0..6d533c159 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Change Log +## 5.14.3 +* Fixed PHP 7 compatibility + ## 5.14.2 * Removed usage of Zend libraries and updated requirements for PHP 8.2/Magento 2.4.6 compatibility * Fixed issue where coupon usage is not properly decremented when placing order fails diff --git a/README.md b/README.md index 5988f75f6..e43164907 100755 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ The following table provides an overview on which Git branch is compatible to wh Magento Version | Github Branch | Latest release ---|---|--- 2.2.6 - 2.2.11 (EOL) | [V2checkout-1.2.x](https://github.com/amzn/amazon-payments-magento-2-plugin/tree/V2checkout-1.2.x) | 1.20.0 (EOL) -2.3.0 - 2.4.x | [master](https://github.com/amzn/amazon-payments-magento-2-plugin/tree/master) | 5.14.2 +2.3.0 - 2.4.x | [master](https://github.com/amzn/amazon-payments-magento-2-plugin/tree/master) | 5.14.3 ## Release Notes See [CHANGELOG.md](/CHANGELOG.md) diff --git a/composer.json b/composer.json index 1a8226231..8972185b0 100755 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "amzn/amazon-pay-magento-2-module", "description": "Official Magento2 Plugin to integrate with Amazon Pay", "type": "magento2-module", - "version": "5.14.2", + "version": "5.14.3", "license": [ "Apache-2.0" ],