cy.get("[data-cy=form-dialog]").should("not.contain", "Color: Magenta");
cy.get("[data-cy=resource-properties-form]").within(() => {
cy.get("[data-cy=property-field-key]").within(() => {
- cy.get("input").type("Color");
+ cy.get("input").type("Color").blur();
});
cy.get("[data-cy=property-field-value]").within(() => {
- cy.get("input").type("Magenta");
+ cy.get("input").type("Magenta").blur();
});
- cy.root().submit();
+ cy.get("[data-cy=property-add-btn]").click();
+
cy.get("[data-cy=property-field-value]").within(() => {
- cy.get("input").type("Pink");
+ cy.get("input").type("Pink").blur();
});
- cy.root().submit();
+ cy.get("[data-cy=property-add-btn]").click();
+
cy.get("[data-cy=property-field-value]").within(() => {
- cy.get("input").type("Yellow");
+ cy.get("input").type("Yellow").blur();
});
- cy.root().submit();
+ cy.get("[data-cy=property-add-btn]").click();
});
// Confirm proper vocabulary labels are displayed on the UI.
cy.get("[data-cy=form-dialog]").should("contain", "Color: Magenta");
// Add another property
cy.get("[data-cy=resource-properties-form]").within(() => {
cy.get("[data-cy=property-field-key]").within(() => {
- cy.get("input").type("Animal");
+ cy.get("input").type("Animal").blur();
});
cy.get("[data-cy=property-field-value]").within(() => {
- cy.get("input").type("Dog");
+ cy.get("input").type("Dog").blur();
});
- cy.root().submit();
+ cy.get("[data-cy=property-add-btn]").click();
});
- cy.get("[data-cy=form-submit-btn]").click({ force: true });
+ cy.get("[data-cy=form-submit-btn]").click();
// Reopen edit via breadcrumbs and verify properties
cy.get("[data-cy=breadcrumbs]").contains(projName).rightclick();
cy.get("[data-cy=context-menu]").contains("Edit").click();
it('shows the appropriate buttons in the multiselect toolbar', () => {
const msButtonTooltips = [
+ 'View details',
+ 'Open in new tab',
+ 'Copy link to clipboard',
+ 'Open with 3rd party client',
'API Details',
- 'Add to Favorites',
- 'Copy to clipboard',
+ 'Share',
+ 'New project',
'Edit project',
- 'Freeze Project',
'Move to',
'Move to trash',
- 'New project',
- 'Open in new tab',
- 'Open with 3rd party client',
- 'Share',
- 'View details',
+ 'Freeze project',
+ 'Add to favorites',
];
cy.loginAs(activeUser);
});
});
- it("copies project URL to clipboard", () => {
+ // The following test is enabled on Electron only, as Chromium and Firefox
+ // require permissions to access the clipboard.
+ it("copies project URL to clipboard", { browser: 'electron' }, () => {
const projectName = `Test project (${Math.floor(999999 * Math.random())})`;
cy.loginAs(activeUser);
cy.get("[data-cy=side-panel-tree]").contains("Projects").click();
cy.waitForDom();
cy.get("[data-cy=project-panel]").contains(projectName).should("be.visible").rightclick();
- cy.get("[data-cy=context-menu]").contains("Copy to clipboard").click();
+ cy.get("[data-cy=context-menu]").contains("Copy link to clipboard").click();
cy.window().then(win =>
win.navigator.clipboard.readText().then(text => {
expect(text).to.match(/https\:\/\/127\.0\.0\.1\:[0-9]+\/projects\/[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{15}/);