Skip to content

Commit

Permalink
Remove unnecessary codes
Browse files Browse the repository at this point in the history
WIP
  • Loading branch information
hannyle committed Sep 24, 2021
1 parent e723b56 commit aa34b29
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cypress/integration/home.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe("Home e2e", function () {
cy.contains("Your Draft Submissions", { timeout: 10000 }).should("be.visible")
cy.contains("Your Published Submissions", { timeout: 10000 }).should("be.visible")

// cy.get("ul.MuiList-root").eq(0).children().should("have.length.at.most", 5)
cy.get("ul.MuiList-root").eq(0).children().should("have.length.at.most", 5)

// Create a new Unpublished folder
cy.get("button").contains("Create Submission").click()
Expand Down
4 changes: 2 additions & 2 deletions src/features/wizardSubmissionFolderSlice.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,14 @@ export const replaceObjectInFolder =
): ((dispatch: (any) => void) => Promise<any>) =>
async (dispatch: any => void) => {
const changes =
objectStatus?.toLowerCase() === ObjectStatus.submitted.toLowerCase()
objectStatus === ObjectStatus.submitted
? [{ op: "replace", path: `/metadataObjects/${index}/tags`, value: tags }]
: [{ op: "replace", path: `/drafts/${index}/tags`, value: tags }]

const response = await folderAPIService.patchFolderById(folderID, changes)
return new Promise((resolve, reject) => {
if (response.ok) {
objectStatus?.toLowerCase() === ObjectStatus.submitted.toLowerCase()
objectStatus === ObjectStatus.submitted
? dispatch(modifyObjectTags({ accessionId: accessionId, tags: tags }))
: dispatch(
modifyDraftObjectTags({
Expand Down

0 comments on commit aa34b29

Please sign in to comment.