Skip to content

Commit

Permalink
pkp#7495 Migrating e2e tests for new workflow&submissions
Browse files Browse the repository at this point in the history
  • Loading branch information
jardakotesovec committed Oct 17, 2024
1 parent 1850144 commit ecee4e2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
21 changes: 16 additions & 5 deletions cypress/support/commands_new_workflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,19 +182,30 @@ Cypress.Commands.add('openReviewAssignment', (familyName) => {
});


Cypress.Commands.add('openWorkflowMenu', (name) => {
cy.get(`[data-cy="active-modal"] nav a:contains("${name}")`).click();
Cypress.Commands.add('openWorkflowMenu', (name, subitem = null) => {
if(subitem) {
cy.get(`[data-cy="active-modal"] nav a:contains("${name}")`).contains(subitem).click()
} else {
cy.get(`[data-cy="active-modal"] nav a:contains("${name}")`).click();

}
cy.get('[data-cy="active-modal"] h2').contains(name);
});


Cypress.Commands.add('openReviewAssignment', (familyName) => {
cy.contains('table tr', familyName).within(() => {
cy.get('button').click()
})
});



Cypress.Commands.add('findSubmissionAsEditor', (username, password, familyName, context) => {
Cypress.Commands.add('findSubmissionAsEditor', (username, password, familyName, context = null, viewName = null) => {
context = context || 'publicknowledge';
viewName = viewName || 'Active submissions';
cy.login(username, password, context);
cy.get('nav').contains('Active submissions').click();
cy.get('nav').contains(viewName).click();
cy.contains('table tr', familyName).within(() => {
cy.get('button').contains('View').click()
})
Expand Down Expand Up @@ -465,7 +476,7 @@ Cypress.Commands.add('submissionIsDeclined', () => {
});

Cypress.Commands.add('isActiveStageTab', (stageName) => {
cy.get('[data-cy="active-modal"] nav .bg-selection-dark').contains(stageName);
cy.get('[data-cy="active-modal"] h2').contains(stageName);
});

/**
Expand Down
2 changes: 1 addition & 1 deletion cypress/tests/integration/Multilingual.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
*/
// Temporarly Skip until OMP&OPS is migrated to new side modal workflow
describe.skip('Multilingual configurations', function() {
describe('Multilingual configurations', function() {
it('Tests when locale is active for Forms and Submissions but not UI', function() {
cy.login('dbarnes');
cy.visit('index.php/publicknowledge/management/settings/website');
Expand Down

0 comments on commit ecee4e2

Please sign in to comment.