Skip to content

Commit

Permalink
additional useless code elimination
Browse files Browse the repository at this point in the history
+ added Cypress cache clearing
  • Loading branch information
SimonasB88 committed Dec 11, 2023
1 parent 542483f commit 245549b
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 490 deletions.
1 change: 1 addition & 0 deletions .github/workflows/E2E_On_PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ jobs:
export CYPRESS_TESTRAIL_DOMAIN='${{ secrets.TESTRAIL_DOMAIN }}'
export CYPRESS_TESTRAIL_USERNAME='${{ secrets.TESTRAIL_USERNAME }}'
export CYPRESS_TESTRAIL_PASSWORD='${{ secrets.TESTRAIL_PASSWORD }}'
cypress cache prune
npm install -D cypress
npm ci
npx cypress run --spec "${{ matrix.test_spec }}" --browser chrome
Expand Down
32 changes: 0 additions & 32 deletions cypress/e2e/ps1785/01_mollie.ps1785.ModuleConfiguration.specs.js
Original file line number Diff line number Diff line change
@@ -1,36 +1,4 @@
/// <reference types="Cypress" />
function prepareCookie()
{
const name = 'PrestaShop-';

cy.request(
{
url: '/'
}
).then((res) => {

const cookies = res.requestHeaders.cookie.split(/; */);

cookies.forEach(cookie => {

const parts = cookie.split('=');
const key = parts[0]
const value = parts[1];

if (key.startsWith(name)) {
cy.setCookie(
key,
value,
{
sameSite: 'None',
secure: true
}
);
}
});

});
}
//Caching the BO and FO session
const login = (MollieBOFOLoggingIn) => {
cy.session(MollieBOFOLoggingIn,() => {
Expand Down
Loading

0 comments on commit 245549b

Please sign in to comment.