Skip to content

Commit

Permalink
Add a link to change an author
Browse files Browse the repository at this point in the history
Refs #388
  • Loading branch information
thewilkybarkid committed Oct 20, 2022
1 parent 386a508 commit 2ce26a4
Show file tree
Hide file tree
Showing 32 changed files with 71 additions and 63 deletions.
6 changes: 3 additions & 3 deletions integration/posting-a-prereview.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ test.extend(canAddAuthors)('can add other authors to the PREreview', async ({ fe
await expect(page.locator('h1')).toHaveText('You have added 3 other authors')
await expect(page).toHaveScreenshot()

await page.goto('/preprints/doi-10.1101-2022.01.13.476201/write-a-prereview/change-author/1')
await page.click('role=link[name="Change Otto Lidenbrock"]')

await expect(page.locator('h1')).toHaveText('Change Otto Lidenbrock')
await expect(page).toHaveScreenshot()
Expand Down Expand Up @@ -1424,7 +1424,7 @@ test.extend(canAddAuthors)("have to add the changed author's name", async ({ fet
await page.fill('role=textbox[name="Name"]', 'Otto Lidenbrock')
await page.click('text="Save and continue"')

await page.goto('/preprints/doi-10.1101-2022.01.13.476201/write-a-prereview/change-author/0')
await page.click('role=link[name="Change Otto Lidenbrock"]')
await page.fill('role=textbox[name="Name"]', '')
await page.click('text="Save and continue"')

Expand Down Expand Up @@ -1478,7 +1478,7 @@ test.extend(canAddAuthors)(
await page.fill('role=textbox[name="Name"]', 'Otto Lidenbrock')
await page.click('text="Save and continue"')

await page.goto('/preprints/doi-10.1101-2022.01.13.476201/write-a-prereview/change-author/0')
await page.click('role=link[name="Change Otto Lidenbrock"]')
await page.fill('role=textbox[name="ORCID iD (optional)"]', 'not an ORCID iD')
await page.click('text="Save and continue"')

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions src/write-review/write-review-add-authors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
writeReviewAddAuthorMatch,
writeReviewAddAuthorsMatch,
writeReviewAuthorsMatch,
writeReviewChangeAuthorMatch,
writeReviewMatch,
writeReviewRemoveAuthorMatch,
} from '../routes'
Expand Down Expand Up @@ -157,6 +158,13 @@ function addAuthorsForm(preprint: Preprint, authors: ReadonlyArray<{ name: NonEm
({ name }, index) => html`
<li>
<span>${name}</span>
<a
href="${format(writeReviewChangeAuthorMatch.formatter, {
doi: preprint.doi,
index,
})}"
>Change<span class="visually-hidden"> ${name}</span></a
>
<a
href="${format(writeReviewRemoveAuthorMatch.formatter, {
doi: preprint.doi,
Expand Down

0 comments on commit 2ce26a4

Please sign in to comment.