@@ -15,6 +15,7 @@ export var TestMethods = {
1515 ShopName : 'oscommerce' ,
1616 PaylikeName : 'paylike' ,
1717 PaymentMethodsAdminUrl : '/modules.php?set=payment' ,
18+ SystemInfoAdminUrl : '/server_info.php' ,
1819
1920 /**
2021 * Login to admin backend account
@@ -131,19 +132,35 @@ export var TestMethods = {
131132 * Get Shop & Paylike versions and send log data.
132133 */
133134 logVersions ( ) {
135+ /** Go to system information. */
136+ cy . goToPage ( this . SystemInfoAdminUrl ) ;
137+
134138 /** Get framework version. */
135139 cy . get ( 'h1' ) . contains ( this . ShopName , { matchCase : false } ) . then ( $frameworkVersion => {
136140 var frameworkVersion = ( $frameworkVersion . text ( ) ) . replace ( / \. ? [ ^ 0 - 9 . ] / g, '' ) ;
137141 cy . wrap ( frameworkVersion ) . as ( 'frameworkVersion' ) ;
138142 } ) ;
139143
144+ // Cypress.$.ajax({
145+ // method: 'POST',
146+ // url: this.StoreUrl + '/includes/modules/paylike.php?action=getOrderTotalsData',
147+ // auth: {
148+ // username: Cypress.env('ENV_HTTP_USER'),
149+ // password: Cypress.env('ENV_HTTP_PASS')
150+ // },
151+ // }).then((resp) => {
152+ // cy.wrap(resp).as('paylikeVersion');
153+ // });
154+
140155 /** Get paylike version with request from a file. */
141156 cy . request ( {
157+ // url: this.StoreUrl + '/includes/modules/payment/paylike_version.txt',
142158 url : this . StoreUrl + '/includes/modules/payment/paylike_version.txt' ,
143159 auth : {
144160 username : Cypress . env ( 'ENV_HTTP_USER' ) ,
145161 password : Cypress . env ( 'ENV_HTTP_PASS' )
146- } } ) . then ( ( resp ) => {
162+ } ,
163+ } ) . then ( ( resp ) => {
147164 cy . wrap ( resp . body ) . as ( 'paylikeVersion' ) ;
148165 } ) ;
149166
0 commit comments