-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from checkout/dev
Frames 3D Secure fix
- Loading branch information
Showing
17 changed files
with
8,242 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
tests/ export-ignore | ||
circle.yml export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
general: | ||
artifacts: | ||
- "/home/ubuntu/checkout-magento2-plugin/tests/reports/screenshots" | ||
machine: | ||
node: | ||
version: 6 | ||
timezone: | ||
Europe/London | ||
|
||
dependencies: | ||
override: | ||
- echo "Ignore CircleCI defaults" | ||
pre: | ||
- mysql -u ubuntu -e "create database magento" | ||
- sudo add-apt-repository ppa:ondrej/php -y | ||
- wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | ||
- sudo dpkg -i google-chrome*.deb | ||
- npm install -g npm | ||
- cd ~/checkout-magento2-plugin/tests && npm install | ||
post: | ||
- sudo rm /etc/apache2/mods-enabled/php5.load && sudo rm /etc/apache2/mods-enabled/php5.conf | ||
- sudo cp ~/checkout-magento2-plugin/tests/config/000-default.conf /etc/apache2/sites-available | ||
- sudo service apache2 restart | ||
- sudo apt-get purge php5-common | ||
- sudo apt-get update | ||
- sudo apt-get install php7.0 php7.0-gd php7.0-curl php7.0-intl php7.0-zip php7.0-mbstring php7.0-mcrypt php7.0-mysql php7.0-xml -y | ||
- sudo a2ensite 000-default.conf | ||
- sudo service apache2 restart | ||
- sudo rm -rf /usr/local/bin/composer | ||
- sudo curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer | ||
- sudo php /usr/local/bin/composer init --no-interaction && sudo php /usr/local/bin/composer config -a http-basic.repo.magento.com ${MG2_USERNAME} ${MG2_PASSWORD} | ||
- sudo mkdir /var/www/html/magento2 | ||
- sudo php /usr/local/bin/composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition=2.1.7 /var/www/html/magento2 | ||
- sudo chmod -R 777 /var/www/html/magento2 | ||
- sudo php /var/www/html/magento2/bin/magento setup:install --admin-email "[email protected]" --admin-firstname "checkout" --admin-lastname "plugin" --admin-password "Checkout17" --admin-user "admin" --backend-frontname admin --base-url "http://127.0.0.1/magento2" --db-host 127.0.0.1 --db-name magento --db-user ubuntu --session-save files --use-rewrites 1 --use-secure 0 -vvv | ||
- sudo php /var/www/html/magento2/bin/magento setup:upgrade | ||
- sudo php /var/www/html/magento2/bin/magento setup:di:compile | ||
- cd /var/www/html/magento2/app && sudo mkdir code && cd code && sudo mkdir CheckoutCom && cd CheckoutCom && sudo mkdir Magento2 && sudo cp -R ~/checkout-magento2-plugin/* Magento2/ | ||
- sudo chmod -R 777 /var/www/html/magento2 | ||
- sudo php /var/www/html/magento2/bin/magento setup:upgrade | ||
- sudo php /var/www/html/magento2/bin/magento setup:static-content:deploy | ||
- sudo php /var/www/html/magento2/bin/magento indexer:reindex | ||
- cd /var/www/html/magento2 && sudo php /usr/local/bin/composer config -a http-basic.repo.magento.com ${MG2_USERNAME} ${MG2_PASSWORD} | ||
- sudo php /var/www/html/magento2/bin/magento sampledata:deploy | ||
- sudo php /var/www/html/magento2/bin/magento setup:upgrade | ||
- sudo php /var/www/html/magento2/bin/magento setup:di:compile | ||
- sudo php /var/www/html/magento2/bin/magento cache:clean | ||
- sudo a2enmod rewrite | ||
- mysql -u ubuntu -e "use magento; insert core_config_data (config_id, scope, scope_id, path, value) values (null, 'default', 0, 'dev/static/sign', 0);" | ||
- sudo php /var/www/html/magento2/bin/magento cache:clean | ||
- sudo chmod -R 777 /var/www/html/magento2 | ||
- sudo service apache2 restart | ||
|
||
test: | ||
override: | ||
- npm test --prefix tests/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<VirtualHost *:80> | ||
ServerAdmin [email protected] | ||
DocumentRoot /var/www/html | ||
|
||
<Directory /var/www/html> | ||
Options Indexes FollowSymLinks | ||
AllowOverride All | ||
Require all granted | ||
</Directory> | ||
|
||
ErrorLog ${APACHE_LOG_DIR}/error.log | ||
CustomLog ${APACHE_LOG_DIR}/access.log combined | ||
|
||
</VirtualHost> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
module.exports = { | ||
path: './features', | ||
screenshotsPath: './reports/screenshots', | ||
screenshotsOnError: true, | ||
saveScreenshotsToDisk: true, | ||
saveScreenshotsToReport: true, | ||
timeout: 120000, | ||
webdriverio: { | ||
logLevel: 'silent', | ||
screenshotPath: './reports/screenshots', | ||
desiredCapabilities: { | ||
chromeOptions: { | ||
args: ['headless', 'disable-gpu'], | ||
}, | ||
isHeadless: true, | ||
}, | ||
debug: true, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Feature: Setup Magento | ||
Keys, Url's | ||
|
||
Scenario: I should be able to disable magento's URL incription and set the plugin keys | ||
Given I set the viewport and timeout | ||
Given I disable the url secret key encryption | ||
Given I update the stock for my test item | ||
Given I go to the backend of Checkout's plugin | ||
Given I set the sandbox keys | ||
Given I save the backend settings | ||
Given I create an account | ||
Given I logout from the registered customer account |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
Feature: Guest Customer Test Suite | ||
MAGENTO 2.1 | ||
|
||
Scenario: I should be able to complete a 3D transaction using Frames integration | ||
Given I go to the backend of Checkout's plugin | ||
Given I enable 3D Secure | ||
Given I set the integration type to frames | ||
Given I save the backend settings | ||
Then I clear magento's cache | ||
Then I complete the order flow as a unregistered customer until the payment stage | ||
Then I choose Checkout as a payment option | ||
Then I complete Checkout Frames with a mastercard card | ||
Then I submit the order for the frames integration | ||
Then I complete the THREE D details | ||
Then I should see the success page | ||
|
||
Scenario: I should be able to complete a non-3D transaction using Frames integration | ||
Given I go to the backend of Checkout's plugin | ||
Given I disable 3D Secure | ||
Given I set the integration type to frames | ||
Given I save the backend settings | ||
Then I clear magento's cache | ||
Then I complete the order flow as a unregistered customer until the payment stage | ||
Then I choose Checkout as a payment option | ||
Then I complete Checkout Frames with a mastercard card | ||
Then I submit the order for the frames integration | ||
Then I should see the success page | ||
|
||
Scenario: I should be able to complete a 3D transaction using Hosted integration | ||
Given I go to the backend of Checkout's plugin | ||
Given I enable 3D Secure | ||
Given I set the integration type to hosted | ||
Given I save the backend settings | ||
Then I clear magento's cache | ||
Then I complete the order flow as a unregistered customer until the payment stage | ||
Then I choose Checkout as a payment option | ||
Then I submit the order for the hosted integration | ||
Then I complete Checkout Hosted with a mastercard card | ||
Then I complete the THREE D details | ||
Then I should see the success page | ||
|
||
Scenario: I should be able to complete a non-3D transaction using Hosted integration | ||
Given I go to the backend of Checkout's plugin | ||
Given I disable 3D Secure | ||
Given I set the integration type to hosted | ||
Given I save the backend settings | ||
Then I clear magento's cache | ||
Then I complete the order flow as a unregistered customer until the payment stage | ||
Then I choose Checkout as a payment option | ||
Then I submit the order for the hosted integration | ||
Then I complete Checkout Hosted with a mastercard card | ||
Then I should see the success page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
Feature: Registered Customer Test Suite | ||
MAGENTO 2.1 | ||
|
||
Scenario: I should be able to complete a 3D transaction using Frames integration | ||
Given I go to the backend of Checkout's plugin | ||
Given I enable 3D Secure | ||
Given I set the integration type to frames | ||
Given I save the backend settings | ||
Then I clear magento's cache | ||
Given I login the registered customer account | ||
Then I complete the order flow as a registered customer until the payment stage | ||
Then I choose Checkout as a payment option | ||
Then I complete Checkout Frames with a mastercard card | ||
Then I submit the order for the frames integration | ||
Then I complete the THREE D details | ||
Then I should see the success page | ||
Given I logout from the registered customer account | ||
|
||
Scenario: I should be able to complete a non-3D transaction using Frames integration | ||
Given I go to the backend of Checkout's plugin | ||
Given I disable 3D Secure | ||
Given I set the integration type to frames | ||
Given I save the backend settings | ||
Then I clear magento's cache | ||
Given I login the registered customer account | ||
Then I complete the order flow as a registered customer until the payment stage | ||
Then I choose Checkout as a payment option | ||
Then I complete Checkout Frames with a mastercard card | ||
Then I submit the order for the frames integration | ||
Then I should see the success page | ||
Given I logout from the registered customer account | ||
|
||
Scenario: I should be able to complete a 3D transaction using Hosted integration | ||
Given I go to the backend of Checkout's plugin | ||
Given I set the integration type to hosted | ||
Given I enable 3D Secure | ||
Given I save the backend settings | ||
Then I clear magento's cache | ||
Given I login the registered customer account | ||
Then I complete the order flow as a registered customer until the payment stage | ||
Then I choose Checkout as a payment option | ||
Then I submit the order for the hosted integration | ||
Then I complete Checkout Hosted with a mastercard card | ||
Then I complete the THREE D details | ||
Then I should see the success page | ||
Given I logout from the registered customer account | ||
|
||
Scenario: I should be able to complete a non-3D transaction using Hosted integration | ||
Given I go to the backend of Checkout's plugin | ||
Given I disable 3D Secure | ||
Given I set the integration type to hosted | ||
Given I save the backend settings | ||
Then I clear magento's cache | ||
Given I login the registered customer account | ||
Then I complete the order flow as a registered customer until the payment stage | ||
Then I choose Checkout as a payment option | ||
Then I submit the order for the hosted integration | ||
Then I complete Checkout Hosted with a mastercard card | ||
Then I should see the success page | ||
Given I logout from the registered customer account | ||
|
||
Scenario: I should be able to customise Hosted integration | ||
Given I go to the backend of Checkout's plugin | ||
Given I set the integration type to hosted | ||
Given I set the theme color | ||
Given I set the button label | ||
Given I save the backend settings | ||
Then I clear magento's cache | ||
Given I login the registered customer account | ||
Then I complete the order flow as a registered customer until the payment stage | ||
Then I choose Checkout as a payment option | ||
Then I submit the order for the hosted integration | ||
Then I should see a customised hosted page | ||
|
||
|
||
Scenario: I should be able to set the Checkout plugin paymet option title as the first payment option | ||
Given I go to the backend of Checkout's plugin | ||
Given I set the payment option title | ||
Given I set the payment option order | ||
Given I save the backend settings | ||
Then I clear magento's cache | ||
Given I login the registered customer account | ||
Then I complete the order flow as a registered customer until the payment stage | ||
Then I should see the plugin title | ||
|
||
Scenario: In Checkout Hosted I should be able see alternaive payments for the mixed payment mode | ||
Given I go to the backend of Checkout's plugin | ||
Given I set the integration type to hosted | ||
Given I disable 3D Secure | ||
Given I set the payment mode to mixed | ||
Given I save the backend settings | ||
Then I clear magento's cache | ||
Given I login the registered customer account | ||
Then I complete the order flow as a registered customer until the payment stage | ||
Then I choose Checkout as a payment option | ||
Then I submit the order for the hosted integration | ||
Then I should see the card tab | ||
Then I should see the alternative payments tab | ||
|
||
Scenario: In Checkout Hosted I should be able see only alternaive payments for the coresponding payment mode | ||
Given I go to the backend of Checkout's plugin | ||
Given I set the integration type to hosted | ||
Given I disable 3D Secure | ||
Given I set the payment mode to cards | ||
Given I save the backend settings | ||
Then I clear magento's cache | ||
Given I login the registered customer account | ||
Then I complete the order flow as a registered customer until the payment stage | ||
Then I choose Checkout as a payment option | ||
Then I submit the order for the hosted integration | ||
Then I should see the just the card options |
Oops, something went wrong.