Skip to content

Commit

Permalink
Merge pull request #773 from blesildaramirez/i9890
Browse files Browse the repository at this point in the history
pkp/pkp-lib#9890 [OPS] - Implement new sidebar navigation
  • Loading branch information
blesildaramirez authored Sep 18, 2024
2 parents de6e1a7 + 10a49ce commit 82afbd2
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 15 deletions.
10 changes: 7 additions & 3 deletions cypress/tests/data/10-ApplicationSetup/20-CreateContext.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ describe('Data suite tests', function() {
cy.login('admin', 'admin');
cy.get('a').contains('admin').click();
cy.get('a').contains('Dashboard').click();
cy.get('.app__nav a').contains('Administration').click();
cy.get('nav').contains('Administration').click();
cy.get('a').contains('Hosted Servers').click();
cy.get('a[class=show_extras]').click();
cy.contains('Settings wizard').click();
Expand Down Expand Up @@ -99,7 +99,9 @@ describe('Data suite tests', function() {
cy.login('admin', 'admin');
cy.get('a').contains('admin').click();
cy.get('a').contains('Dashboard').click();
cy.get('.app__nav a').contains('Server').click();
cy.get('nav').contains('Settings').click();
// Ensure submenu item click despite animation
cy.get('nav').contains('Server').click({ force: true });

cy.get('input[name="abbreviation-en"]').type('Pub Know Pre', {delay: 0});
cy.get('input[name="acronym-en"]').type(Cypress.env('contextAcronyms')['en'], {delay: 0});
Expand All @@ -112,7 +114,9 @@ describe('Data suite tests', function() {
cy.login('admin', 'admin');
cy.get('a').contains('admin').click();
cy.get('a').contains('Dashboard').click();
cy.get('.app__nav a').contains('Server').click();
cy.get('nav').contains('Settings').click();
// Ensure submenu item click despite animation
cy.get('nav').contains('Server').click({ force: true });
cy.get('button[id="contact-button"]').click();

// Submit the form with required fields missing.
Expand Down
4 changes: 3 additions & 1 deletion cypress/tests/data/10-ApplicationSetup/40-CreateUsers.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ describe('Data suite tests', function() {
cy.login('admin', 'admin');
cy.get('a:contains("admin"):visible').click();
cy.get('a:contains("Dashboard")').click();
cy.get('a:contains("Users & Roles")').click();
cy.get('nav').contains('Settings').click();
// Ensure submenu item click despite animation
cy.get('nav').contains('Users & Roles').click({ force: true });

var users = [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ describe('Data suite tests', function() {
cy.login('admin', 'admin');
cy.get('a').contains('admin').click();
cy.get('a').contains('Dashboard').click();
cy.get('.app__nav a').contains('Server').click();
cy.get('nav').contains('Settings').click();
// Ensure submenu item click despite animation
cy.get('nav').contains('Server').click({ force: true });
cy.get('button[id="sections-button"]').click();

// Edit Preprints section to add section editors
Expand All @@ -28,7 +30,9 @@ describe('Data suite tests', function() {
cy.login('admin', 'admin');
cy.get('a').contains('admin').click();
cy.get('a').contains('Dashboard').click();
cy.get('.app__nav a').contains('Server').click();
cy.get('nav').contains('Settings').click();
// Ensure submenu item click despite animation
cy.get('nav').contains('Server').click({ force: true });
cy.get('button[id="categories-button"]').click();

cy.addCategory('History', 'history');
Expand Down
16 changes: 10 additions & 6 deletions cypress/tests/integration/Doi.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('DOI tests', function() {

const loginAndGoToDoiPage = () => {
cy.login('dbarnes', null, 'publicknowledge');
cy.get('a:contains("DOIs")').click();
cy.get('nav').contains('DOIs').click();
cy.get('button#submission-doi-management-button').click();
};

Expand Down Expand Up @@ -291,7 +291,9 @@ describe('DOI tests', function() {
cy.log("Check DOI versioning off creates new DOI for first version");

// Turn DOI versioning off
cy.get('a:contains("Distribution")').click();
cy.get('nav').contains('Settings').click();
// Ensure submenu item click despite animation
cy.get('nav').contains('Distribution').click({ force: true });
cy.get('button#dois-button').click();

cy.get("input[name=doiVersioning][value=false]").click();
Expand All @@ -302,7 +304,7 @@ describe('DOI tests', function() {
cy.get('#doisSetup [role="status"]').contains('Saved');

//Go to publication and rollback to first publication being unpublished, then republish first publication
cy.get('a:contains("Submissions")').click();
cy.get('nav').contains('Submissions').click();
cy.get('button:contains("Archived")').click();
cy.get(`div#archive .listPanel__item:contains("${articleTitle}") a:contains("View")`).click();

Expand Down Expand Up @@ -347,7 +349,7 @@ describe('DOI tests', function() {
cy.log("Check DOI versioning off copies previous DOI for subsequent versions");

// Publish Version 2
cy.get('a:contains("Submissions")').click();
cy.get('nav').contains('Submissions').click();
cy.get('button:contains("Archived")').click();
cy.get(`div#archive .listPanel__item:contains("${articleTitle}") a:contains("View")`).click();
cy.get('button#publication-button').click();
Expand Down Expand Up @@ -400,7 +402,9 @@ describe('DOI tests', function() {
);

// Change DOI versioning to "on" to confirm DOI was copied properly
cy.get('a:contains("Distribution")').click();
cy.get('nav').contains('Settings').click();
// Ensure submenu item click despite animation
cy.get('nav').contains('Distribution').click({ force: true });
cy.get('button#dois-button').click();

cy.get("input[name=doiVersioning][value=true]").click();
Expand Down Expand Up @@ -483,7 +487,7 @@ describe('DOI tests', function() {

// Check creates new version
// Go to publication and publish Version 2
cy.get('a:contains("Submissions")').click();
cy.get('nav').contains('Submissions').click();
cy.get('button:contains("Archived")').click();
cy.get(`div#archive .listPanel__item:contains("${articleTitle}") a:contains("View")`).click();
cy.get('button#publication-button').click();
Expand Down
12 changes: 9 additions & 3 deletions cypress/tests/integration/DoiCrossref.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ describe('Crossref tests', function () {
it('Check Crossref Configuration', function() {
cy.login('dbarnes', null, 'publicknowledge');

cy.get('a:contains("Website")').click();
cy.get('nav').contains('Settings').click();
// Ensure submenu item click despite animation
cy.get('nav').contains('Website').click({ force: true });

cy.waitJQuery();
cy.get('button#plugins-button').click();
Expand All @@ -23,7 +25,9 @@ describe('Crossref tests', function () {
cy.get('input[id^=select-cell-crossrefplugin]').should('be.checked');

// Crossref is enabled as DOI registration agency.
cy.get('a:contains("Distribution")').click();
cy.get('nav').contains('Settings').click();
// Ensure submenu item click despite animation
cy.get('nav').contains('Distribution').click({ force: true });
cy.get('button#dois-button').click();
cy.get(
'#doiSetup input[name="enabledDoiTypes"][value="representation"]'
Expand Down Expand Up @@ -73,7 +77,9 @@ describe('Crossref tests', function () {
});

cy.log('Deselect Crossref as registered agency for downstream tests');
cy.get('a:contains("Distribution")').click();
cy.get('nav').contains('Settings').click();
// Ensure submenu item click despite animation
cy.get('nav').contains('Distribution').click({ force: true });
cy.get('button#dois-button').click();
cy.get('button#doisRegistration-button').click();
cy.get('select#doiRegistrationSettings-registrationAgency-control').select(
Expand Down

0 comments on commit 82afbd2

Please sign in to comment.