From 6f59c7857c59598177ea4c8be12d706cb7f105bf Mon Sep 17 00:00:00 2001 From: withanage Date: Wed, 9 Aug 2023 13:17:07 +0200 Subject: [PATCH] https://github.com/pkp/pkp-lib/issues/9214 Add github workflow --- cypress/support/commands.js | 2 +- cypress/tests/integration/SubmissionWizard.cy.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 722cfae4cd4..a8f5ff998dc 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -38,7 +38,7 @@ Cypress.Commands.add('checkViewableGalley', (galleyTitle) => { }); Cypress.Commands.add('createSubmissionWithApi', (data, csrfToken) => { - const api = new Api(Cypress.env('baseUrl') + '/index.php/publicknowledge/api/v1'); + const api = new Api(Cypress.config('baseUrl') + '/index.php/publicknowledge/api/v1'); return cy.beginSubmissionWithApi(api, data, csrfToken) .putMetadataWithApi(data, csrfToken) diff --git a/cypress/tests/integration/SubmissionWizard.cy.js b/cypress/tests/integration/SubmissionWizard.cy.js index 091bbb92380..3d88d64a5dd 100644 --- a/cypress/tests/integration/SubmissionWizard.cy.js +++ b/cypress/tests/integration/SubmissionWizard.cy.js @@ -171,7 +171,7 @@ describe('Submission Wizard', function() { }); it('When a copyright notice is configured in the context, it appears in the review step of the submission wizard and I am unable to submit without checking its checkbox.', function() { - const api = new Api(Cypress.env('baseUrl') + '/index.php/publicknowledge/api/v1'); + const api = new Api(Cypress.config('baseUrl') + '/index.php/publicknowledge/api/v1'); const title = 'Et malesuada fames ac turpis'; const copyrightNotice = { en: 'Turpis massa tincidunt dui ut ornare.', @@ -309,7 +309,7 @@ describe('Submission Wizard', function() { ]; // Require all submission wizard fields - const api = new Api(Cypress.env('baseUrl') + '/index.php/publicknowledge/api/v1'); + const api = new Api(Cypress.config('baseUrl') + '/index.php/publicknowledge/api/v1'); cy.login('dbarnes', null, 'publicknowledge'); cy.getCsrfToken() .then(() => { @@ -446,7 +446,7 @@ describe('Submission Wizard', function() { it('I can change the submission language to a different language from the language I am using the site, and the submission forms and validation checks are applied to the language of the submission', function() { // Enable all submission wizard fields - const api = new Api(Cypress.env('baseUrl') + '/index.php/publicknowledge/api/v1'); + const api = new Api(Cypress.config('baseUrl') + '/index.php/publicknowledge/api/v1'); cy.login('dbarnes', null, 'publicknowledge'); cy.getCsrfToken() .then(() => { @@ -612,7 +612,7 @@ describe('Submission Wizard', function() { it('Resets the submission wizard fields to more common configuration', function() { // Reset all submission wizard fields - const api = new Api(Cypress.env('baseUrl') + '/index.php/publicknowledge/api/v1'); + const api = new Api(Cypress.config('baseUrl') + '/index.php/publicknowledge/api/v1'); cy.login('dbarnes', null, 'publicknowledge'); cy.getCsrfToken() .then(() => { @@ -641,4 +641,4 @@ describe('Submission Wizard', function() { expect(xhr.status).to.eq(200); }); }); -}) \ No newline at end of file +})