Skip to content

Commit

Permalink
NTR - Add Curl for debug
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisGarding committed Jun 21, 2023
1 parent 93fe013 commit 373bba8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
18 changes: 16 additions & 2 deletions Tests/E2E/helper/clearCacheHelper.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { exec } from 'child_process';

export default (function () {
export default (function() {
return {
clearCache: async function () {
clearCache: async function() {
return new Promise((resolve, reject) => {
exec('php ../../../../../bin/console sw:cache:clear', (error, stdout, stderr) => {
if (error) {
Expand All @@ -14,6 +14,20 @@ export default (function () {
return;
}

resolve();
});
});
},

makeCurl: async function() {
return new Promise((resolve, reject) => {
exec('curl shopware.localhost', (error, stdout, stderr) => {
// TODO: REMOVE AFTER DEBUG
console.log('OUT: ' + stdout);
// console.log('ERROR: ' + error);
// console.log('STD_ERROR: ' + stderr);
// TODO: REMOVE AFTER DEBUG

resolve();
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import clearPaypalSettingsSql from '../helper/clearPaypalSettingsHelper.mjs';
import backendHandleSaveHelper from '../helper/backendHandleSaveHelper.mjs';
import backendLoginHelper from '../helper/backendLoginHelper.mjs';
import defaultPaypalSettingsSql from "../helper/paypalSqlHelper.mjs";
import clearCacheHelper from "../helper/clearCacheHelper.mjs";

const connection = MysqlFactory.getInstance();

Expand All @@ -16,6 +17,7 @@ test.describe('Check the active state of PUI and ACDC', () => {

test('Check active state', async({ page }) => {
await backendLoginHelper.login(page);
await clearCacheHelper.makeCurl();

await page.hover('.customers--main');
await page.hover('.settings--payment-methods');
Expand Down

0 comments on commit 373bba8

Please sign in to comment.