Skip to content
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

[ACT-122] Remove view component support / ably-ui gem #304

Merged
merged 8 commits into from
Mar 13, 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
3 changes: 1 addition & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ executors:
- YARN_VERSION: 1.22.10

caches:
- &bundle_cache ably-ui-preview-bundle-v1-{{ checksum "Gemfile.lock" }}-{{ checksum "preview/Gemfile.lock" }}
- &bundle_cache ably-ui-preview-bundle-v1-{{ checksum "preview/Gemfile.lock" }}
- &yarn_cache ably-ui-preview-yarn-v1-{{ checksum "yarn.lock" }}-{{ checksum "preview/yarn.lock" }}

commands:
Expand Down Expand Up @@ -77,7 +77,6 @@ commands:
steps:
- restore_bundle_cache
- install_bundler
- run: bundle install --path vendor/bundle
- run: |
cd preview
bundle config set --local path 'vendor/bundle'
Expand Down
5 changes: 0 additions & 5 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
.babelrc
.bundle
.bundle
.DS_Store
.editorconfig
.eslintrc.js
.pretterrc.json
.prettierignore
*.html.rb
*.rb
ably-ui-*.gem
ably-ui.gemspec
Gemfile
Gemfile.lock
lib
modules-config.js
node_modules
Expand Down
8 changes: 0 additions & 8 deletions Gemfile

This file was deleted.

34 changes: 0 additions & 34 deletions Gemfile.lock

This file was deleted.

2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
**_Note:_** some features are still in development and their documentation might be incomplete. Lookout for the ⚠️ icon.

# ably-ui

`ably-ui` is the of home of the Ably design system library ([https://ably-ui.herokuapp.com/](https://ably-ui.herokuapp.com/)). It provides a showcase, development/test environment and a publishing pipeline for different distributables.
Expand Down
25 changes: 0 additions & 25 deletions ably-ui.gemspec

This file was deleted.

10 changes: 0 additions & 10 deletions cypress/e2e/core/code/parity.cy.js

This file was deleted.

111 changes: 0 additions & 111 deletions cypress/e2e/core/company_autocomplete/behaviour.cy.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
exports[`Chat button state > react > the button is inactive without Hubspot widget #0`] = `
<button
type="button"
class="ui-btn-secondary self-start mt-16"
disabled=""
data-id="open-chat-widget"
data-enabled-label="Start a live chat"
data-disabled-label="Live chat unavailable"
>
Live chat unavailable
</button>
`;

exports[`Chat button state > vw > the button is inactive without Hubspot widget #0`] = `
exports[`Chat button state > the button is inactive without Hubspot widget #0`] = `
<button
type="button"
class="ui-btn-secondary self-start mt-16"
Expand Down
83 changes: 38 additions & 45 deletions cypress/e2e/core/contact_footer/behaviour.cy.js
Original file line number Diff line number Diff line change
@@ -1,58 +1,51 @@
describe("Live Chat button", () => {
const url = "/components/contact-footer";
const sharedExample = (url) => {
it("should be active when hubspot widget is defined and widget is present", () => {
cy.visit(url, {
onBeforeLoad(window) {
window.HubSpotConversations = { widget: { open: () => {} } };
cy.spy(window.HubSpotConversations.widget, "open").as("widgetOpen");
},
});

cy.document().then((document) => {
const fakeChat = document.createElement("div");
fakeChat.id = "hubspot-messages-iframe-container";
document.body.append(fakeChat);
});

cy.get("[data-id='open-chat-widget']").contains("Start a live chat");
cy.get("[data-id='open-chat-widget']").trigger("click");
cy.get("@widgetOpen").should("be.called");
beforeEach(() => {
cy.visit("/components/contact-footer");
});

it("should be active when hubspot widget is defined and widget is present", () => {
cy.visit("/components/contact-footer", {
onBeforeLoad(window) {
window.HubSpotConversations = { widget: { open: () => {} } };
cy.spy(window.HubSpotConversations.widget, "open").as("widgetOpen");
},
});

it("should be inactive when hubspot widget is undefined", () => {
cy.visit(url, {
onBeforeLoad(window) {
window.HubSpotConversations = { widget: undefined };
},
});
cy.document().then((document) => {
const fakeChat = document.createElement("div");
fakeChat.id = "hubspot-messages-iframe-container";
document.body.append(fakeChat);
});

cy.document().then((document) => {
const fakeChat = document.createElement("div");
fakeChat.id = "hubspot-messages-iframe-container";
document.body.append(fakeChat);
});
cy.get("[data-id='open-chat-widget']").contains("Start a live chat");
cy.get("[data-id='open-chat-widget']").trigger("click");
cy.get("@widgetOpen").should("be.called");
});

cy.get("[data-id='open-chat-widget']").contains("Live chat unavailable");
it("should be inactive when hubspot widget is undefined", () => {
cy.visit("/components/contact-footer", {
onBeforeLoad(window) {
window.HubSpotConversations = { widget: undefined };
},
});

it("should be inactive when hubspot widget is not on the page", () => {
cy.visit(url, {
onBeforeLoad(window) {
window.HubSpotConversations = { widget: { open: () => {} } };
cy.spy(window.HubSpotConversations.widget, "open").as("widgetOpen");
},
});

cy.get("[data-id='open-chat-widget']").contains("Live chat unavailable");
cy.document().then((document) => {
const fakeChat = document.createElement("div");
fakeChat.id = "hubspot-messages-iframe-container";
document.body.append(fakeChat);
});
};

describe("react", () => {
sharedExample(url);
cy.get("[data-id='open-chat-widget']").contains("Live chat unavailable");
});

describe("vw", () => {
sharedExample(`${url}?framework=vw`);
it("should be inactive when hubspot widget is not on the page", () => {
cy.visit("/components/contact-footer", {
onBeforeLoad(window) {
window.HubSpotConversations = { widget: { open: () => {} } };
cy.spy(window.HubSpotConversations.widget, "open").as("widgetOpen");
},
});

cy.get("[data-id='open-chat-widget']").contains("Live chat unavailable");
});
});
28 changes: 0 additions & 28 deletions cypress/e2e/core/contact_footer/parity.cy.js

This file was deleted.

Loading