Skip to content

Commit

Permalink
Add identifier for the upload status box (#1122)
Browse files Browse the repository at this point in the history
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
  • Loading branch information
asnaith and Tbaut authored Jun 10, 2021
1 parent 8159c53 commit dd01814
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/files-ui/cypress/support/page-objects/homePage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const homePage = {
// main browser elements
uploadButton: () => cy.get("[data-cy=upload-modal-button]"),
uploadFileForm: () => cy.get("[data-cy=upload-file-form] input"),
uploadStatusToast: () => cy.get("[data-cy=upload_status_toast_message]", { timeout: 10000 }),

// file browser row elements
fileItemRow: () => cy.get("[data-cy=file-item-row]", { timeout: 20000 }),
Expand Down Expand Up @@ -36,7 +37,9 @@ export const homePage = {
this.uploadFileForm().attachFile(filePath)
this.fileUploadList().should("have.length", 1)
this.startUploadButton().click()
// ensure upload is complete before proceeding
this.uploadFileForm().should("not.exist")
this.uploadStatusToast().should("not.exist")
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ const UploadBox: React.FC<IUploadBox> = (props) => {

return (
<>
<div className={clsx(classes.appearBox, classes.boxContainer)}>
<div className={clsx(classes.appearBox, classes.boxContainer)}
data-cy="upload_status_toast_message" >
{complete ? (
<div className={classes.contentContainer}>
<CheckCircleIcon className={classes.marginRight} />
Expand Down

0 comments on commit dd01814

Please sign in to comment.