Skip to content

Commit

Permalink
Add dandiset creation popup
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettmflynn committed Apr 4, 2024
1 parent 779089d commit 03a977a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
Binary file added docs/assets/tutorials/dandi/create-dandiset.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion docs/tutorials/dataset_publication.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@ Continue to the next page to trigger your upload to the DANDI Archive.

Creating a Dandiset from the GUIDE
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If you do not already own a Dandiset on staging, you will need to create one. Press the Create New Dandiset button to open a pop-up that guides you through the required fields for Dandiset creation—particularly Title, Archive (in this case, Development Server), Description, and License.
If you do not already own a Dandiset on staging, you will need to create one. Press the Create New Dandiset button to open a pop-up that guides you through the required fields for Dandiset creation.

.. figure:: ../assets/tutorials/dandi/create-dandiset.png
:align: center
:alt: Dandiset creation pop-up


Once this pop-up form is submitted, the Dandiset input will now contain your new Dandiset.

Expand Down
18 changes: 18 additions & 0 deletions tests/e2e/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,24 @@ export const uploadToDandi = (subdirectory, forceSkip = false) => {

await takeScreenshot(join(subdirectory, 'api-token-added'), 100)


// Open dandiset creation modal
await evaluate(() => {
const dashboard = document.querySelector('nwb-dashboard')
const form = dashboard.page.form
const dandisetInput = form.getFormElement(['dandiset'])
const createDandiset = dandisetInput.controls[0]
createDandiset.onClick()
})

await takeScreenshot(join(subdirectory, 'create-dandiset'), 100)

// Close modal
await evaluate(() => {
const modal = document.querySelector('nwb-modal') as any
modal.toggle(false)
})

await evaluate(async (dandisetId) => {
const dashboard = document.querySelector('nwb-dashboard')
const page = dashboard.page
Expand Down

0 comments on commit 03a977a

Please sign in to comment.