Skip to content

Commit

Permalink
Add edit message test case to cypress tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dontry committed Mar 24, 2024
1 parent f50d174 commit 3340e2d
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions cypress/e2e/interaction.spec.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
/* eslint-disable no-undef */
import 'cypress-plugin-snapshots/commands';
describe('Smoke test', function () {
it('interaction', function () {
cy.visit('http://127.0.0.1:8080/cy/smoke-interaction.html');
import "cypress-plugin-snapshots/commands";
describe("Smoke test", function () {
it("interaction", function () {
cy.visit("http://127.0.0.1:8080/cy/smoke-interaction.html");
// This line is to make sure the privacy icon is loaded
cy.get('.privacy>span>svg', { timeout: 5000 }).should('be.visible');
cy.get(".privacy>span>svg", { timeout: 5000 }).should("be.visible");

// Edit the message
const messageLabel = cy.contains("ASelf");
messageLabel.dblclick();
messageLabel.type("A{enter}");
cy.contains("ASelfA").should("be.visible");
cy.get("body").click();

cy.document().toMatchImageSnapshot({
imageConfig: { threshold: 0.01 },
capture: 'viewport',
capture: "viewport",
});
});
});

0 comments on commit 3340e2d

Please sign in to comment.