Skip to content

Release/v3.2.0 #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 42 additions & 14 deletions OSS_LICENSES.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Created on 14-08-2024 at 16:51:27
Created on 26-08-2024 at 18:02:17

{
"@babel/code-frame@7.24.2": {
Expand Down Expand Up @@ -63,19 +63,19 @@ Created on 14-08-2024 at 16:51:27
"licenseFile": "node_modules/@braintree/sanitize-url/LICENSE",
"copyright": "Copyright (c) 2017 Braintree"
},
"@cognigy/chat-components@0.31.0": {
"@cognigy/chat-components@0.32.1": {
"licenses": "MIT*",
"licenseFile": "node_modules/@cognigy/chat-components/LICENSE",
"copyright": "Copyright (c) 2024 Cognigy GmbH"
},
"@cognigy/socket-client@5.0.0-beta.17": {
"@cognigy/socket-client@5.0.0-beta.20": {
"licenses": "MIT*",
"publisher": "Robin Schuster",
"email": "r.schuster@cognigy.com",
"licenseFile": "node_modules/@cognigy/socket-client/LICENSE",
"copyright": "Copyright (c) 2019 Cognigy GmbH"
},
"@cognigy/webchat@3.1.0": {
"@cognigy/webchat@3.2.0": {
"licenses": "MIT*",
"publisher": "Cognigy GmbH",
"email": "info@cognigy.com",
Expand Down Expand Up @@ -213,6 +213,27 @@ Created on 14-08-2024 at 16:51:27
"licenseFile": "node_modules/@emotion/react/node_modules/@emotion/weak-memoize/LICENSE",
"copyright": "Copyright (c) Emotion team and other contributors"
},
"@floating-ui/core@1.6.7": {
"licenses": "MIT",
"repository": "https://github.com/floating-ui/floating-ui",
"publisher": "atomiks",
"licenseFile": "node_modules/@floating-ui/core/LICENSE",
"copyright": "Copyright (c) 2021-present Floating UI contributors"
},
"@floating-ui/dom@1.6.10": {
"licenses": "MIT",
"repository": "https://github.com/floating-ui/floating-ui",
"publisher": "atomiks",
"licenseFile": "node_modules/@floating-ui/dom/LICENSE",
"copyright": "Copyright (c) 2021-present Floating UI contributors"
},
"@floating-ui/utils@0.2.7": {
"licenses": "MIT",
"repository": "https://github.com/floating-ui/floating-ui",
"publisher": "atomiks",
"licenseFile": "node_modules/@floating-ui/utils/LICENSE",
"copyright": "Copyright (c) 2021-present Floating UI contributors"
},
"@fontsource/figtree@5.0.19": {
"licenses": "OFL-1.1",
"repository": "https://github.com/fontsource/font-files",
Expand All @@ -228,7 +249,7 @@ Created on 14-08-2024 at 16:51:27
"licenseFile": "node_modules/@reduxjs/toolkit/LICENSE",
"copyright": "Copyright (c) 2018 Mark Erikson"
},
"@socket.io/component-emitter@3.1.0": {
"@socket.io/component-emitter@3.1.2": {
"licenses": "MIT",
"repository": "https://github.com/socketio/emitter",
"licenseFile": "node_modules/@socket.io/component-emitter/LICENSE",
Expand Down Expand Up @@ -457,7 +478,7 @@ Created on 14-08-2024 at 16:51:27
"licenseFile": "node_modules/aws4/LICENSE",
"copyright": "Copyright 2013 Michael Hart (michael.hart.au@gmail.com)"
},
"axios@1.6.4": {
"axios@1.7.4": {
"licenses": "MIT",
"repository": "https://github.com/axios/axios",
"publisher": "Matt Zabriskie",
Expand Down Expand Up @@ -906,17 +927,17 @@ Created on 14-08-2024 at 16:51:27
"licenseFile": "node_modules/end-of-stream/LICENSE",
"copyright": "Copyright (c) 2014 Mathias Buus"
},
"engine.io-client@6.5.3": {
"engine.io-client@6.5.4": {
"licenses": "MIT",
"repository": "https://github.com/socketio/engine.io-client",
"licenseFile": "node_modules/engine.io-client/LICENSE",
"copyright": "Copyright (c) 2014-2015 Automattic <dev@cloudup.com>"
},
"engine.io-parser@5.2.2": {
"engine.io-parser@5.2.3": {
"licenses": "MIT",
"repository": "https://github.com/socketio/engine.io-parser",
"repository": "https://github.com/socketio/socket.io",
"licenseFile": "node_modules/engine.io-parser/LICENSE",
"copyright": "Copyright (c) 2016 Guillermo Rauch (@rauchg)"
"copyright": "Copyright (c) 2014-present Guillermo Rauch and Socket.IO contributors"
},
"enquirer@2.4.1": {
"licenses": "MIT",
Expand Down Expand Up @@ -1927,7 +1948,7 @@ Created on 14-08-2024 at 16:51:27
"licenseFile": "node_modules/qs/LICENSE.md",
"copyright": "Copyright (c) 2014, Nathan LaFreniere and other [contributors](https://github.com/ljharb/qs/graphs/contributors). All rights reserved."
},
"qs@6.12.0": {
"qs@6.13.0": {
"licenses": "BSD-3-Clause",
"repository": "https://github.com/ljharb/qs",
"licenseFile": "node_modules/url/node_modules/qs/LICENSE.md",
Expand Down Expand Up @@ -2014,6 +2035,13 @@ Created on 14-08-2024 at 16:51:27
"licenseFile": "node_modules/react-textarea-autosize/LICENSE",
"copyright": "Copyright (c) 2013 Andrey Popp"
},
"react-tooltip@5.28.0": {
"licenses": "MIT",
"repository": "https://github.com/ReactTooltip/react-tooltip",
"publisher": "ReactTooltip",
"licenseFile": "node_modules/react-tooltip/LICENSE",
"copyright": "Copyright (c) 2022 ReactTooltip Team Github"
},
"react-transition-group@4.4.5": {
"licenses": "BSD-3-Clause",
"repository": "https://github.com/reactjs/react-transition-group",
Expand Down Expand Up @@ -2260,7 +2288,7 @@ Created on 14-08-2024 at 16:51:27
"licenseFile": "node_modules/slide/LICENSE",
"copyright": "Copyright (c) Isaac Z. Schlueter"
},
"socket.io-client@4.7.2": {
"socket.io-client@4.7.5": {
"licenses": "MIT",
"repository": "https://github.com/socketio/socket.io-client",
"licenseFile": "node_modules/socket.io-client/LICENSE",
Expand Down Expand Up @@ -2656,14 +2684,14 @@ Created on 14-08-2024 at 16:51:27
"licenseFile": "node_modules/wrappy/LICENSE",
"copyright": "Copyright (c) Isaac Z. Schlueter and Contributors"
},
"ws@8.11.0": {
"ws@8.17.1": {
"licenses": "MIT",
"repository": "https://github.com/websockets/ws",
"publisher": "Einar Otto Stangvik",
"email": "einaros@gmail.com",
"url": "http://2x.io",
"licenseFile": "node_modules/ws/LICENSE",
"copyright": "Copyright (c) 2011 Einar Otto Stangvik <einaros@gmail.com>"
"copyright": "Copyright (c) 2011 Einar Otto Stangvik <einaros@gmail.com>. Copyright (c) 2013 Arnout Kazemier and contributors. Copyright (c) 2016 Luigi Pinca and contributors"
},
"xmlhttprequest-ssl@2.0.0": {
"licenses": "MIT",
Expand Down
8 changes: 4 additions & 4 deletions cypress/e2e/homeScreen.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ describe('Home Screen', () => {
{
type: "phone_number",
title: "Phone number starter",
payload: "123456789"
},
]
}
Expand All @@ -263,8 +264,8 @@ describe('Home Screen', () => {
});
cy.openWebchat();
cy.get('button').contains('Postback starter');
cy.get('button').contains('Web URL starter');
cy.get('button').contains('Phone number starter');
cy.get('a').contains('Web URL starter');
cy.get('a').contains('Phone number starter');
});

it('has postback buttons that starts a conversation when clicked', () => {
Expand All @@ -291,7 +292,7 @@ describe('Home Screen', () => {
cy.get('.webchat-message-row.user .chat-bubble', { timeout: 100 }).contains('Postback starter');
});

it('has web url button with correct role when configured', () => {
it('has web url button with correct aria-label when configured', () => {
cy.initMockWebchat({
settings: {
homeScreen: {
Expand All @@ -311,7 +312,6 @@ describe('Home Screen', () => {
}
});
cy.openWebchat();
cy.get('.webchat-homescreen-button').should('have.attr', 'role', 'link');
cy.get('.webchat-homescreen-button').should('have.attr', 'aria-label', 'Web URL starter. Opens in new tab');
});

Expand Down
10 changes: 0 additions & 10 deletions cypress/e2e/messages/audio.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,5 @@ describe("Message with Audio", () => {
cy.withMessageFixture('audio', () => {
cy.get(".webchat-message-row .webchat-media-template-audio");
})
})

it("should have sr-only default alternate text for audio", () => {
cy.withMessageFixture('audio', () => {
cy
.get(".webchat-message-row .webchat-media-template-audio span")
.contains("Attachment Audio")
.should("not.be.visible");
})
})

})
2 changes: 1 addition & 1 deletion cypress/e2e/messages/downloadableImage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe("Message with Downloadable Image", () => {
it("should render download button", () => {
cy.withMessageFixture('downloadableImage', () => {
cy
.get("button").contains("Download");
.get(".webchat-message-row a").contains("Download");
})
});
})
11 changes: 5 additions & 6 deletions cypress/e2e/messages/image.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe("Message with Image", { retries: 3 }, () => {

it("should render image", () => {
cy.withMessageFixture("image", () => {
cy.get(".webchat-message-row > div > img").should("be.visible");
cy.get(".webchat-message-row img").should("be.visible");
});
});

Expand All @@ -20,15 +20,14 @@ describe("Message with Image", { retries: 3 }, () => {

it("should have alt attibute", () => {
cy.withMessageFixture("image", () => {
cy.get(".webchat-message-row > div > img")
.should("have.attr", "alt")
.and("match", /Attachment Image/);
cy.get(".webchat-media-template-image img")
.should("have.attr", "alt", "Attachment Image")
});
});

it("should render the image in a fixed aspect ratio", () => {
cy.withMessageFixture("image", () => {
cy.get(".webchat-media-template-image > img")
cy.get(".webchat-media-template-image img")
.should("be.visible")
.then(element => {
const imageRatio = (element.innerWidth() / element.innerHeight()).toFixed(1);
Expand All @@ -51,7 +50,7 @@ describe("Message with Image", { retries: 3 }, () => {
cy.startConversation();

cy.withMessageFixture("image", () => {
cy.get(".webchat-media-template-image > img")
cy.get(".webchat-media-template-image img")
.should("be.visible")
.then(element => {
expect(element.innerHeight().toFixed()).to.equal(
Expand Down
8 changes: 0 additions & 8 deletions cypress/e2e/messages/video.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,4 @@ describe("Message with Video", () => {
cy.get(".webchat-message-row .webchat-media-template-video");
})
})

it("should have sr-only default alternate text for video", () => {
cy.withMessageFixture('video', () => {
cy.get(".webchat-message-row .webchat-media-template-video .sr-only")
.contains("Attachment Video")
.should("not.be.visible");
})
})
})
56 changes: 46 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cognigy/webchat",
"version": "3.1.0",
"version": "3.2.0",
"description": "Webchat Widget for Cognigy.AI",
"author": "Cognigy GmbH <info@cognigy.com>",
"contributors": [
Expand Down Expand Up @@ -29,8 +29,8 @@
},
"dependencies": {
"@braintree/sanitize-url": "^6.0.0",
"@cognigy/chat-components": "0.31.0",
"@cognigy/socket-client": "5.0.0-beta.18",
"@cognigy/chat-components": "0.32.1",
"@cognigy/socket-client": "5.0.0-beta.20",
"@emotion/cache": "^10.0.29",
"@emotion/react": "^11.7.1",
"@emotion/serialize": "1.1.3",
Expand Down