Skip to content

Commit

Permalink
Replicate issue using clipboard with screen of previous version
Browse files Browse the repository at this point in the history
  • Loading branch information
caleeli committed Oct 21, 2024
1 parent 2fee83e commit c731d35
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/e2e/fixtures/UUID_compatibility.json

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions tests/e2e/specs/ClipboardBwCompatibility.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import ClipboardManager from "../../../src/store/modules/ClipboardManager";

describe("Clipboard backward compatibility", () => {
beforeEach(() => {
cy.visit("/");
});

it("FOUR-19630: Check clipboard with a screen from a previous version", () => {
ClipboardManager.saveToLocalStorage([]);
cy.loadFromJson("UUID_compatibility.json", 1);

// for each control, check if it can be added to the clipboard
cy.get('.control-item').each(($el, index) => {
cy.wrap($el).click({ force: true });
cy.get('[data-cy="addToClipboard"]').click({ force: true });
cy.get('[data-cy="addToClipboard"]').should("not.exist").then(() => {
// Verify it was added to the clipboard storage
const content = ClipboardManager.loadFromLocalStorage();
expect(content.length).to.equal(index + 1);
});
});
});
});

0 comments on commit c731d35

Please sign in to comment.