Skip to content

Commit

Permalink
Handle publication date being required
Browse files Browse the repository at this point in the history
  • Loading branch information
markpatton committed Dec 16, 2024
1 parent 3b67ea3 commit 097f5f0
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/baseCaseTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ test('can walk through an nih submission workflow and make a submission - base c
'Quantitative profiling of carbonyl metabolites directly in crude biological extracts using chemoselective tagging and nanoESI-FTMS'
);
await submissionMetadataPage.verifyJournalTitle('The Analyst');
await submissionMetadataPage.inputPublicationDate('05/02/2010');

await submissionMetadataPage.clickNextToFiles();

Expand Down
1 change: 1 addition & 0 deletions tests/journalTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ test('can walk through an submission workflow and make a submission with journal
await submissionMetadataPage.verifyArticleTitle(submissionTitle);
await submissionMetadataPage.verifyJournalTitle('PASS_E2E_TEST_JOURNAL');
await submissionMetadataPage.inputAuthor('PASS_E2E_TEST_AUTHOR');
await submissionMetadataPage.inputPublicationDate('05/02/2010');

await submissionMetadataPage.clickNextToFiles();

Expand Down
1 change: 1 addition & 0 deletions tests/noJournalTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ test('can walk through a submission workflow and make a submission - without sel
await submissionMetadataPage.verifyArticleTitle(submissionTitle);
await submissionMetadataPage.verifyJournalTitle('');
await submissionMetadataPage.inputAuthor('PASS_E2E_TEST_AUTHOR');
await submissionMetadataPage.inputPublicationDate('05/02/2010');
await submissionMetadataPage.clickNextToFiles();

await submissionFilesPage.verifyOAManuscriptsNotExists();
Expand Down
15 changes: 15 additions & 0 deletions tests/page_model/SubmissionMetadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,21 @@ class SubmissionMetadata {
.typeText(authorInput, authorName, { paste: true, speed: 0.75 });
}

async inputPublicationDate(date) {
const publicationDateInput = Selector('input').withAttribute(
'name',
'publicationDate'
);
await t
.expect(publicationDateInput.exists)
.ok()
.typeText(publicationDateInput, date, {
paste: false,
caretPos: 0,
speed: 0.1,
});
}

async clickNextToFiles() {
const goToFilesButton = Selector('.alpaca-form-button-Next');
await t.expect(goToFilesButton.exists).ok();
Expand Down
2 changes: 2 additions & 0 deletions tests/proxySubmissionTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ async function walkThroughSubmissionFlow(t, hasAccount) {
'Quantitative profiling of carbonyl metabolites directly in crude biological extracts using chemoselective tagging and nanoESI-FTMS'
);
await submissionMetadataPage.verifyJournalTitle('The Analyst');
await submissionMetadataPage.inputPublicationDate('05/02/2010');

await submissionMetadataPage.clickNextToFiles();

await submissionFilesPage.verifyOAManuscriptUrl(
Expand Down

0 comments on commit 097f5f0

Please sign in to comment.