-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Files] Add view file information modal test #2130
[Files] Add view file information modal test #2130
Conversation
Your Render PR Server URL is https://chainsafe-components-stage-pr-2130.onrender.com. Follow its progress at https://dashboard.render.com/static/srv-c9v62bb0tnui3m4438bg. |
Your Render PR Server URL is https://files-ui-stage-pr-2130.onrender.com. Follow its progress at https://dashboard.render.com/static/srv-c9v62cb0tnui3m4438g0. |
Your Render PR Server URL is https://storage-ui-stage-pr-2130.onrender.com. Follow its progress at https://dashboard.render.com/static/srv-c9v62db0tnui3m44391g. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left 2 small comments, looks good otherwise, thanks for adding this test :)
Looks great for the most part, just some very minor suggestions. I will approve once the issue with test execution in CI / headless is resolved :) |
…b.com:ChainSafe/ui-monorepo into mnt/add-view-file-information-modal-test-2124
permissions: ['clipboardReadWrite', 'clipboardSanitizedWrite'], | ||
origin: window.location.origin, | ||
}, | ||
})) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be good to take the above block out of the test layer and move it to cypress/support/index.ts.
If we get it working there then clipboard ability will be turned on for all tests by default which I think is what is best in this scenario.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree, done!
origin: window.location.origin, | ||
}, | ||
})) | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to put it in this area of code 👍
Just a small tidy up needed, the indentation is a little off in that block of code and the ;
is not needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done! and I added as well the "grant clipboard permissions" in storage
fileInfoModal.closeButton().click() | ||
fileInfoModal.body().should("not.exist") | ||
}) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for adding this and great job on getting Cypress to read the clipboard contents
|
||
before(() => { | ||
// grant clipboard read permissions to the browser | ||
cy.wrap( | ||
Cypress.automation("remote:debugger:protocol", { | ||
command: "Browser.grantPermissions", | ||
params: { | ||
permissions: ["clipboardReadWrite", "clipboardSanitizedWrite"], | ||
origin: window.location.origin, | ||
} | ||
}) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd advise to only add things when they are needed. In this case, I would personally prefer to add this to storage cypress in the same PR that will actually use this reading from the clipboard in a test. I bet this will come shortly though, so I don't intend to bother you with that in this specific case :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Tbaut This was my fault, I advised Juan to add to storage too as I knew we'd want the ability in Storage UI (when copying the API keys).
I hear what you are saying though - it could be confusing to have code that is not being utilized in the project and adding it when we need it and not in advance prevents that.
I believe we had this chat in the past so my bad for not remembering that 🤦♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No prob at all, it's a small thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job, that's elegantly solved
closes #2124