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

E2E fix 6.x.x #801

Merged
merged 72 commits into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
d292baa
release-6.0.1.
mandan2 Jul 17, 2023
68b1840
updating the e2e on PR yml
SimonasB88 Jul 17, 2023
de5ab2b
adding Ngrok launch fix
SimonasB88 Jul 24, 2023
a43261d
small yml fix
SimonasB88 Jul 24, 2023
1a53444
fixing the module upgrade CI testing
SimonasB88 Jul 24, 2023
3897dfd
small fix
SimonasB88 Jul 24, 2023
71b827e
upgrading text fix
SimonasB88 Jul 24, 2023
15a29a3
test fixes
SimonasB88 Jul 24, 2023
ef32571
small fix
SimonasB88 Jul 24, 2023
74421a8
removing the PS8 CI upgrading test
SimonasB88 Jul 24, 2023
ec97be4
cypress upgrading
SimonasB88 Jul 31, 2023
0f3fdcb
useful E2E test spec updates
SimonasB88 Jul 31, 2023
d5ce019
adding improved Cypress terminal logs
SimonasB88 Aug 1, 2023
94b712b
debug mode enabling
SimonasB88 Aug 1, 2023
8655206
Update prestashop_1784_2.sql
SimonasB88 Aug 21, 2023
40a53b4
useful cypress updates
SimonasB88 Aug 21, 2023
c7ef7a9
useful test code updates
SimonasB88 Aug 21, 2023
e1bd867
specs updates
SimonasB88 Aug 21, 2023
2eea085
ps8 test spec updates
SimonasB88 Aug 21, 2023
fe7bbcd
Update Makefile
SimonasB88 Aug 21, 2023
d90bc30
test spec updates
SimonasB88 Aug 21, 2023
c751d65
updates for test specs
SimonasB88 Aug 21, 2023
7da8736
updates for test specs
SimonasB88 Aug 21, 2023
c0e6c63
Update 02_mollie.ps1784.EnablingPaymentsOrdersAPI.specs.js
SimonasB88 Aug 21, 2023
7c9fc8f
ps8 test code updates
SimonasB88 Aug 21, 2023
8636337
ps1784 test spec updates
SimonasB88 Aug 21, 2023
39badac
in3 payment wip
SimonasB88 Aug 21, 2023
2fc8b22
Update 03_mollie.ps8.Subscriptions.WIP.js
SimonasB88 Aug 21, 2023
1a1475e
Update .htaccess1784
SimonasB88 Aug 22, 2023
eab976d
Update prestashop_1784_2.sql
SimonasB88 Aug 22, 2023
ee798cf
ps1784 test updates
SimonasB88 Aug 22, 2023
c1b5a4e
Update 03_mollie.ps1784.PaymentTests.js
SimonasB88 Aug 22, 2023
c959d40
ps1784 test updates
SimonasB88 Aug 22, 2023
ed26c59
Update 03_mollie.ps1784.PaymentTests.js
SimonasB88 Aug 22, 2023
5e68c81
Update .gitignore
SimonasB88 Aug 22, 2023
bcbd5c0
ps1784 finalized updates
SimonasB88 Aug 22, 2023
f5eeaf3
disabling debug mode
SimonasB88 Aug 28, 2023
6b110d1
Revert "disabling debug mode"
SimonasB88 Aug 28, 2023
1f98f24
spec update
SimonasB88 Aug 28, 2023
fe2033d
spec updates
SimonasB88 Aug 28, 2023
c6fed84
spec updates (ps1784/ps8)
SimonasB88 Aug 28, 2023
a478f7d
Update 04_mollie.ps8.Subscriptions.WIP.js
SimonasB88 Aug 28, 2023
a6b71c0
Update 02_mollie.ps8.EnablingPaymentsOrdersAPI.specs.js
SimonasB88 Aug 28, 2023
cfb360b
Update Makefile
SimonasB88 Aug 28, 2023
ddc19b8
Update prestashop_8.sql
SimonasB88 Aug 28, 2023
ac1abc1
Update prestashop_8.sql
SimonasB88 Aug 28, 2023
95e5782
Update .htaccess8
SimonasB88 Aug 28, 2023
4667a3d
Update prestashop_8.sql
SimonasB88 Aug 28, 2023
3763091
Update 02_mollie.ps8.EnablingPaymentsOrdersAPI.specs.js
SimonasB88 Aug 28, 2023
ce4c534
spec updates
SimonasB88 Aug 28, 2023
bfe5951
ps8 test spec updates
SimonasB88 Aug 28, 2023
50164d3
ps8 small typo fixes
SimonasB88 Aug 28, 2023
1efbbdf
Update 03_mollie.ps8.PaymentTests.js
SimonasB88 Aug 28, 2023
be2c8d2
cypress updates
SimonasB88 Sep 4, 2023
6b654d4
Update 03_mollie.ps1784.PaymentTests.js
SimonasB88 Sep 4, 2023
98a6708
Update cypress.config.js
SimonasB88 Sep 4, 2023
8d85a20
adding ps8.0.5 docker build
SimonasB88 Sep 4, 2023
e567042
Update .htaccess8
SimonasB88 Sep 4, 2023
1604077
Update 03_mollie.ps8.PaymentTests.js
SimonasB88 Sep 4, 2023
8d2d13b
Update 03_mollie.ps8.PaymentTests.js
SimonasB88 Sep 4, 2023
1ebe297
ps1784 debug mode disabling
SimonasB88 Sep 4, 2023
0630989
ps8 debug mode disabling
SimonasB88 Sep 4, 2023
a20f688
small update
SimonasB88 Sep 4, 2023
96ea420
small typo fix
SimonasB88 Sep 4, 2023
3a380f1
Update E2E_On_PR.yml
SimonasB88 Sep 4, 2023
22e2a5e
adding random branch string ending
SimonasB88 Sep 4, 2023
3481517
Update upgrading_check.yml
SimonasB88 Sep 4, 2023
25812d3
Update cypress.config.js
SimonasB88 Sep 5, 2023
a73abb5
selector updates
SimonasB88 Sep 5, 2023
c5223a5
updating the testrail extension
SimonasB88 Sep 5, 2023
18ddcfa
temporary disabling the error checking
SimonasB88 Sep 5, 2023
3d7272f
increasing timeout for selectors
SimonasB88 Sep 5, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .docker/.htaccess1784
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ RewriteEngine on


#Domain: demoshop1784.ngrok.io
RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api(?:/(.*))?$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]

Expand All @@ -35,12 +34,10 @@ RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBAS
RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$
RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L]
# AlphaImageLoader for IE and fancybox
RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]


#Domain: demoshop1784.ngrok.io
RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api(?:/(.*))?$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]

Expand Down Expand Up @@ -69,16 +66,13 @@ RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBAS
RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$
RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L]
# AlphaImageLoader for IE and fancybox
RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]

# Dispatcher
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$
RewriteRule ^.*$ - [NC,L]
RewriteCond %{HTTP_HOST} ^demoshop1784.ngrok.io$
RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L]
</IfModule>

Expand Down
39 changes: 0 additions & 39 deletions .docker/.htaccess8
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ RewriteEngine on


#Domain: demoshop8.ngrok.io
RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api(?:/(.*))?$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]
RewriteRule ^upload/.+$ %{ENV:REWRITEBASE}index.php [QSA,L]
Expand All @@ -36,51 +35,13 @@ RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBAS
RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$
RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L]
# AlphaImageLoader for IE and fancybox
RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]


#Domain: demoshop8.ngrok.io
RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api(?:/(.*))?$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]
RewriteRule ^upload/.+$ %{ENV:REWRITEBASE}index.php [QSA,L]

RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$
RewriteRule ^shop2$ /shop2/ [L,R]
RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$
RewriteRule ^shop2/(.*) /$1 [L]

# Images
RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$
RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L]
RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$
RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L]
RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$
RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L]
RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L]
RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L]
RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L]
RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L]
RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$
RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L]
RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$
RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L]
# AlphaImageLoader for IE and fancybox
RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]

# Dispatcher
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$
RewriteRule ^.*$ - [NC,L]
RewriteCond %{HTTP_HOST} ^demoshop8.ngrok.io$
RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L]
</IfModule>

Expand Down
2 changes: 1 addition & 1 deletion .docker/Dockerfile.8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM prestashop/prestashop:8.0.1-apache
FROM prestashop/prestashop:8.0.5-apache

RUN cd /usr/local/etc/php/conf.d/ && \
echo 'memory_limit = 4096M' >> /usr/local/etc/php/conf.d/docker-php-memlimit.ini
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/E2E_On_PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Cypress E2E Automation [develop branch]
on:
pull_request:
types: [opened, reopened]
branches: [develop]
branches: [develop, develop**, develop-**]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upgrading_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Module upgrade / downgrade testing (last version > v.5.2.0 > `develop` ver
on:
pull_request:
types: [opened, reopened]
branches: [develop]
branches: [develop, develop**, develop-**]
jobs:
Module-upgrading-check:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ cypress/screenshots
vendor
node_modules
composer.lock
ngrok
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ e2eh1784:
# configuring base database
mysql -h 127.0.0.1 -P 9002 --protocol=tcp -u root -pprestashop prestashop < ${PWD}/tests/seed/database/prestashop_1784_2.sql
# installing module
docker exec -i prestashop-mollie-1784 sh -c "cd /var/www/html && php bin/console prestashop:module install mollie --id_shop=3"
docker exec -i prestashop-mollie-1784 sh -c "cd /var/www/html && php bin/console prestashop:module install mollie"
# uninstalling module
docker exec -i prestashop-mollie-1784 sh -c "cd /var/www/html && php bin/console prestashop:module uninstall mollie --id_shop=3"
docker exec -i prestashop-mollie-1784 sh -c "cd /var/www/html && php bin/console prestashop:module uninstall mollie"
# installing the module again
docker exec -i prestashop-mollie-1784 sh -c "cd /var/www/html && php bin/console prestashop:module install mollie --id_shop=3"
docker exec -i prestashop-mollie-1784 sh -c "cd /var/www/html && php bin/console prestashop:module install mollie"
# enabling the module
docker exec -i prestashop-mollie-1784 sh -c "cd /var/www/html && php bin/console prestashop:module enable mollie --id_shop=3"
docker exec -i prestashop-mollie-1784 sh -c "cd /var/www/html && php bin/console prestashop:module enable mollie"
# chmod all folders
docker exec -i prestashop-mollie-1784 sh -c "chmod -R 777 /var/www/html"

Expand All @@ -40,13 +40,13 @@ e2eh8:
# configuring base database
mysql -h 127.0.0.1 -P 9459 --protocol=tcp -u root -pprestashop prestashop < ${PWD}/tests/seed/database/prestashop_8.sql
# installing module
docker exec -i prestashop-mollie-8 sh -c "cd /var/www/html && php bin/console prestashop:module install mollie --id_shop=2"
docker exec -i prestashop-mollie-8 sh -c "cd /var/www/html && php bin/console prestashop:module install mollie"
# uninstalling module
docker exec -i prestashop-mollie-8 sh -c "cd /var/www/html && php bin/console prestashop:module uninstall mollie --id_shop=2"
docker exec -i prestashop-mollie-8 sh -c "cd /var/www/html && php bin/console prestashop:module uninstall mollie"
# installing the module again
docker exec -i prestashop-mollie-8 sh -c "cd /var/www/html && php bin/console prestashop:module install mollie --id_shop=2"
docker exec -i prestashop-mollie-8 sh -c "cd /var/www/html && php bin/console prestashop:module install mollie"
# enabling the module
docker exec -i prestashop-mollie-8 sh -c "cd /var/www/html && php bin/console prestashop:module enable mollie --id_shop=2"
docker exec -i prestashop-mollie-8 sh -c "cd /var/www/html && php bin/console prestashop:module enable mollie"
# chmod all folders
docker exec -i prestashop-mollie-8 sh -c "chmod -R 777 /var/www/html"

Expand Down
16 changes: 14 additions & 2 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,33 @@
const { defineConfig } = require('cypress')

module.exports = defineConfig({
video: true,
chromeWebSecurity: false,
experimentalMemoryManagement: true,
experimentalSourceRewriting: true,
numTestsKeptInMemory: 0,
defaultCommandTimeout: 15000,
defaultCommandTimeout: 30000,
projectId: 'xb89dr',
retries: 3,
videoUploadOnPasses: false,
videoCompression: 8,
viewportHeight: 1080,
viewportWidth: 1920,
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
on('after:spec', (spec, results) => {
if (results && results.video) {
// Do we have failures for any retry attempts?
const failures = results.tests.some((test) =>
test.attempts.some((attempt) => attempt.state === 'failed')
)
if (!failures) {
// delete the video if the spec passed and no tests retried
fs.unlinkSync(results.video)
}
}
})
require('./cypress/plugins/index.js')(on, config)
require("cypress-fail-fast/plugin")(on, config);
require('cypress-terminal-report/src/installLogsPrinter')(on);
Expand Down
44 changes: 20 additions & 24 deletions cypress/e2e/ps1784/01_mollie.ps1784.ModuleConfiguration.specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,21 @@ function prepareCookie()

});
}
//Caching the BO and FO session
const login = (MollieBOFOLoggingIn) => {
cy.session(MollieBOFOLoggingIn,() => {
cy.visit('/admin1/')
cy.url().should('contain', 'https').as('Check if HTTPS exists')
cy.get('#email').type('[email protected]',{delay: 0, log: false})
cy.get('#passwd').type('demodemo',{delay: 0, log: false})
cy.get('#submit_login').click().wait(1000).as('Connection successsful')
//switching the multistore PS1784
cy.get('#header_shop > .dropdown').click()
cy.get('.open > .dropdown-menu').find('[class="shop"]').eq(1).find('[href]').eq(0).click()
cy.visit('/SHOP2/index.php?controller=my-account')
cy.get('#login-form [name="email"]').eq(0).type('[email protected]')
cy.get('#login-form [name="password"]').eq(0).type('demodemo')
cy.get('#login-form [type="submit"]').eq(0).click({force:true})
cy.get('#history-link > .link-item').click()
})
}

//Caching the BO and FO session
const login = (MollieBOFOLoggingIn) => {
cy.session(MollieBOFOLoggingIn,() => {
cy.visit('/admin1/')
cy.url().should('contain', 'https').as('Check if HTTPS exists')
cy.get('#email').type('[email protected]',{delay: 0, log: false})
cy.get('#passwd').type('demodemo',{delay: 0, log: false})
cy.get('#submit_login').click().wait(1000).as('Connection successsful')
cy.visit('/en/my-account')
cy.get('#login-form [name="email"]').eq(0).type('[email protected]')
cy.get('#login-form [name="password"]').eq(0).type('demodemo')
cy.get('#login-form [type="submit"]').eq(0).click({force:true})
cy.get('#history-link > .link-item').click()
})
}
//Checking the console for errors
let windowConsoleError;
Cypress.on('window:before:load', (win) => {
Expand All @@ -70,7 +66,7 @@ describe('PS1784 Module initial configuration setup', () => {
})
it('C339305: 01 Connecting test API successsfully', () => {
cy.visit('/admin1/')
cy.OpenModuleDashboard()
cy.OpeningModuleDashboardURL()
cy.get('#MOLLIE_ACCOUNT_SWITCH_on').click({force:true})
cy.get('#MOLLIE_API_KEY_TEST').type((Cypress.env('MOLLIE_TEST_API_KEY')),{delay: 0, log: false})
cy.get('#module_form_submit_btn').click()
Expand All @@ -83,11 +79,11 @@ it('C339338: 02 Enabling Mollie carriers in Prestashop successfully', () => {
})
it('C339339: 03 Checking the Advanced Settings tab, verifying the Front-end components, Saving the form, checking if there are no Errors in Console', () => {
cy.visit('/admin1/')
cy.OpenModuleDashboard()
cy.OpeningModuleDashboardURL()
cy.get('[href="#advanced_settings"]').click({force:true})
cy.get('[id="MOLLIE_PAYMENTSCREEN_LOCALE"]').should('be.visible')
cy.get('[id="MOLLIE_SEND_ORDER_CONFIRMATION"]').should('be.visible')
cy.get('[id="MOLLIE_KLARNA_INVOICE_ON"]').should('be.visible')
cy.get('[id="MOLLIE_AUTHORIZABLE_PAYMENT_INVOICE_ON_STATUS"]').should('be.visible')
cy.get('[class="help-block"]').should('be.visible')
cy.get('[id="MOLLIE_STATUS_AWAITING"]').should('be.visible')
cy.get('[id="MOLLIE_STATUS_PAID"]').should('be.visible')
Expand Down Expand Up @@ -117,13 +113,13 @@ it('C339339: 03 Checking the Advanced Settings tab, verifying the Front-end comp
});
it('C688472 Checking the Subscriptions tab, and console errors', () => {
cy.visit('/admin1/')
cy.OpenModuleDashboard()
cy.OpeningModuleDashboardURL()
cy.get('#subtab-AdminMollieSubscriptionOrders').click()
cy.get('[id="invertus_mollie_subscription_grid_panel"]').should('be.visible')
});
it('C688473 Checking the Subscriptions FAQ, and console errors', () => {
cy.visit('/admin1/')
cy.OpenModuleDashboard()
cy.OpeningModuleDashboardURL()
cy.get('#subtab-AdminMollieSubscriptionFAQ').click()
cy.get(':nth-child(2) > .col-lg-12 > .card').should('be.visible')
cy.get(':nth-child(3) > .col-lg-12 > .card').should('be.visible')
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/// <reference types="Cypress" />
//Caching the BO and FO session
const login = (MollieBOFOLoggingIn) => {
cy.session(MollieBOFOLoggingIn,() => {
cy.visit('/admin1/')
cy.url().should('contain', 'https').as('Check if HTTPS exists')
cy.get('#email').type('[email protected]',{delay: 0, log: false})
cy.get('#passwd').type('demodemo',{delay: 0, log: false})
cy.get('#submit_login').click().wait(1000).as('Connection successsful')
})
}
//Checking the console for errors
let windowConsoleError;
Cypress.on('window:before:load', (win) => {
windowConsoleError = cy.spy(win.console, 'error');
})
let failEarly = false;
afterEach(() => {
expect(windowConsoleError).to.not.be.called;
if (failEarly) throw new Error("Failing Early due to an API or other module configuration problem. If running on CI, please check Cypress VIDEOS/SCREENSHOTS in the Artifacts for more details.")
})
afterEach(function() {
if (this.currentTest.state === "failed") failEarly = true
});
describe('PS1784 Enabling Payments', () => {
beforeEach(() => {
cy.viewport(1920,1080)
login('MollieBOFOLoggingIn')
})
it('C339341: 04 Enabling All payments in Module BO [Orders API]', () => {
cy.visit('/admin1/')
cy.OpeningModuleDashboardURL()
cy.ConfOrdersAPI1784()
cy.get('[type="submit"]').first().click({force:true})
cy.get('[class="alert alert-success"]').should('be.visible')
})
})
Loading