Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion tests/baseCaseTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ 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
2 changes: 1 addition & 1 deletion tests/commonTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ async function loginSsoMs() {
export async function logout() {
return await t
.click('#user-menu-name') // Open the app menu to make logout btn visible
.click(Selector('#user-menu a').withText('Logout'));
.click(Selector('a.dropdown-item').withText('Logout'));
}

export async function verifyJScholarshipDepositStatusIfNeeded(
Expand Down
27 changes: 14 additions & 13 deletions tests/page_model/SubmissionMetadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,33 +20,31 @@ class SubmissionMetadata {
constructor() {}

async verifyArticleTitle(expectedArticleTitle) {
const articleTitle = Selector('textarea').withAttribute('name', 'title');
const articleTitle = Selector('div[data-name=title] input');
await t.expect(articleTitle.value).eql(expectedArticleTitle);
}

async verifyJournalTitle(expectedJournalTitle) {
const journalTitle = Selector('input').withAttribute(
'name',
'journal-title'
);
const journalTitle = Selector('div[data-name=journal-title] input');
await t.expect(journalTitle.value).eql(expectedJournalTitle);
}

async inputAuthor(authorName) {
const authorInput = Selector('input').withAttribute(
'name',
'authors_0_author'
);
const createAuthorButton = Selector('div[data-name=authors] button');
const authorInput = Selector('div[data-name=author] input');

await t
.expect(createAuthorButton.exists)
.ok()
.click(createAuthorButton)
.expect(authorInput.exists)
.ok()
.typeText(authorInput, authorName, { paste: true, speed: 0.75 });
}

async inputPublicationDate(date) {
const publicationDateInput = Selector('input').withAttribute(
'name',
'publicationDate'
const publicationDateInput = Selector(
'div[data-name=publicationDate] input'
);
await t
.expect(publicationDateInput.exists)
Expand All @@ -56,7 +54,10 @@ class SubmissionMetadata {
}

async clickNextToFiles() {
const goToFilesButton = Selector('.alpaca-form-button-Next');
const goToFilesButton = Selector('button').withAttribute(
'data-test-workflow-metadata-next'
);

await t.expect(goToFilesButton.exists).ok();
await t.click(goToFilesButton);
await t
Expand Down
2 changes: 1 addition & 1 deletion tests/page_model/SubmissionReview.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class SubmissionReview {
async verifyJournal(expectedJournal) {
const reviewJournal = Selector('ul.list-unstyled')
.child('li')
.withText('Journal title : ' + expectedJournal);
.withText('Journal Title : ' + expectedJournal);
await t.expect(reviewJournal.exists).ok();
}

Expand Down
2 changes: 1 addition & 1 deletion tests/page_model/SubmissionThankYou.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class SubmissionThankYou {
const linkToSubmission = Selector('a').withText('here');
await t.expect(linkToSubmission.exists).ok();
await t.click(linkToSubmission);
const submissionDetailsBody = Selector('h2', {
const submissionDetailsBody = Selector('h1', {
timeout: TIMEOUT_LENGTH,
}).withText('Submission Detail');
await t.expect(submissionDetailsBody.exists).ok();
Expand Down
Loading