mirror of
https://github.com/nocodb/nocodb.git
synced 2026-05-02 12:37:08 +00:00
refactor(tests): add cy selectors and update share link test
This commit is contained in:
@@ -12,26 +12,18 @@ const generateLinkWithPwd = () => {
|
||||
.contains("This view is shared via a private link")
|
||||
.should("be.visible");
|
||||
|
||||
cy.getActiveModal(".nc-modal-share-view")
|
||||
.find(`[data-cy="nc-share-view-checkbox-password"]`)
|
||||
.should("exist")
|
||||
.click();
|
||||
cy.getActiveModal(".nc-modal-share-view")
|
||||
.find('input[type="password"]')
|
||||
.clear()
|
||||
.type("1");
|
||||
cy.getActiveModal(".nc-modal-share-view")
|
||||
.find('button:contains("Save password")')
|
||||
.click();
|
||||
// enable checkbox & feed pwd, save
|
||||
cy.get('[data-cy="nc-modal-share-view__with-password"]').click();
|
||||
cy.get('[data-cy="nc-modal-share-view__password"]').clear().type('1')
|
||||
cy.get('[data-cy="nc-modal-share-view__save-password"]').click();
|
||||
cy.toastWait("Successfully updated");
|
||||
|
||||
// copy link text, visit URL
|
||||
cy.getActiveModal(".nc-modal-share-view")
|
||||
.find(".nc-share-link-box")
|
||||
.then(($obj) => {
|
||||
linkText = $obj.text().trim();
|
||||
cy.log(linkText);
|
||||
});
|
||||
cy.get('[data-cy="nc-modal-share-view__link"]').then(($el) => {
|
||||
linkText = $el.text();
|
||||
// todo: visit url?
|
||||
cy.log(linkText);
|
||||
})
|
||||
};
|
||||
|
||||
export const genTest = (apiType, dbType) => {
|
||||
|
||||
Reference in New Issue
Block a user