-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
271d161
commit ae4b8cb
Showing
2 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/** | ||
* @file cypress/tests/integration/Orcid.cy.js | ||
* | ||
* Copyright (c) 2014-2024 Simon Fraser University | ||
* Copyright (c) 2000-2024 John Willinsky | ||
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING. | ||
* | ||
*/ | ||
|
||
describe('ORCID tests', function() { | ||
before(() => { | ||
cy.enableOrcid(); | ||
}); | ||
|
||
it('Sends ORCID verification request to author', function() { | ||
cy.login('dbarnes'); | ||
cy.visit( | ||
'index.php/publicknowledge/en/dashboard/editorial?currentViewId=assigned-to-me' | ||
); | ||
|
||
// Select a submission in submission list | ||
cy.findSubmissionAsEditor('dbarnes', null, 'Bernnard'); | ||
|
||
cy.get('a').contains('Contributors').click(); | ||
|
||
cy.get('div.listPanel__itemActions') | ||
.contains('Primary Contact') | ||
.parents('div.listPanel__itemActions') | ||
.within(() => { | ||
cy.contains('button', 'Edit').click(); | ||
}) | ||
.then(() => { | ||
// Ensure side modal is opened before continuing | ||
cy.wait(10000); | ||
|
||
cy.get('[data-cy="sidemodal-header"]').should('be.visible'); | ||
cy.contains('Request verification').click(); | ||
cy.get('button').contains('Yes').click(); | ||
cy.contains( | ||
'ORCID Verification has been requested! Resend Verification Email' | ||
).should('be.visible'); | ||
}); | ||
}); | ||
}); |