Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sushmi21 committed Jul 18, 2024
1 parent 94aa44d commit a75448e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cypress/e2e/messageAvatar.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ describe("Webchat Header", () => {
cy.visitWebchat();
});

// Webchat header logo tests

it("should have CognigyAI logo when 'logoUrl' is not configured", () => {
cy.initMockWebchat().openWebchat().startConversation();

Expand All @@ -26,6 +28,8 @@ describe("Webchat Header", () => {
cy.get(".webchat-header-bar .webchat-header-logo").should("have.attr", "src", "https://placewaifu.com/image/300/300");
});

// Webchat header title tests

it("should have 'Cognigy' as the title by default", () => {
cy.initMockWebchat().openWebchat().startConversation();

Expand All @@ -51,6 +55,8 @@ describe("Bot message", () => {
cy.visitWebchat();
});

// Bot message avatar logo tests

xit("should have Cognigy AI avatar when 'logoUrl' is not configured", () => {
cy.initMockWebchat().openWebchat().startConversation();
cy.receiveMessage("bot message", {}, "bot");
Expand Down Expand Up @@ -128,6 +134,8 @@ describe("Bot message", () => {
cy.get('[alt="bot avatar"]').should("have.attr", "src", "https://placewaifu.com/image/300/300");
});

// Bot message avatar name tests

it("should have avatar name as 'Cognigy' by default", () => {
cy.initMockWebchat().openWebchat().startConversation();
cy.receiveMessage("bot message", {}, "bot");
Expand Down Expand Up @@ -203,6 +211,8 @@ describe("Human Agent message", () => {
cy.visitWebchat();
});

// Agent message avatar logo tests

it("should have default avatar when agent avatar is not configured", () => {
cy.initMockWebchat().openWebchat().startConversation();
cy.receiveMessage("agent message", {}, "agent");
Expand Down Expand Up @@ -280,6 +290,8 @@ describe("Human Agent message", () => {
cy.get('[alt="agent avatar"]').should("have.attr", "src", "https://placewaifu.com/image/300/300");
});

// Agent message avatar name tests

it("should have Agent as the avatar name by default", () => {
cy.initMockWebchat().openWebchat().startConversation();
cy.receiveMessage("agent message", {}, "agent");
Expand Down

0 comments on commit a75448e

Please sign in to comment.