Skip to content

Commit

Permalink
Fixed issue with tests not passing, appears to be due to settings con…
Browse files Browse the repository at this point in the history
…text
  • Loading branch information
golson-pdx committed Nov 11, 2024
1 parent d73abde commit a0de772
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 238 deletions.
45 changes: 20 additions & 25 deletions __tests__/components/ChatBotContainer.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jest.mock("../../src/viteconfig", () => ({
},
}));

describe.skip("ChatBotContainer Component", () => {
describe("ChatBotContainer Component", () => {
beforeEach(() => {
(useButtonInternal as jest.Mock).mockReturnValue({
headerButtons: [<button key="header-btn">Header Button</button>],
Expand Down Expand Up @@ -81,13 +81,12 @@ describe.skip("ChatBotContainer Component", () => {
(useSettingsContext as jest.Mock).mockReturnValue({
settings: {
general: {
showHeader: true,
showFooter: true,
showHeader: true,
showInputRow: true,
showFooter: true,
flowStartTrigger: "ON_CHATBOT_INTERACT",
desktopEnabled: true,
mobileEnabled: true,
},
device: { desktopEnabled: true, mobileEnabled: true },
},
});
render(<ChatBotContainer />);
Expand All @@ -105,13 +104,12 @@ describe.skip("ChatBotContainer Component", () => {
(useSettingsContext as jest.Mock).mockReturnValue({
settings: {
general: {
showHeader: true,
showFooter: false,
showHeader: true,
showInputRow: false,
showFooter: false,
flowStartTrigger: "ON_CHATBOT_INTERACT",
desktopEnabled: true,
mobileEnabled: true,
},
device: { desktopEnabled: true, mobileEnabled: true },
},
});
render(<ChatBotContainer />);
Expand All @@ -125,13 +123,12 @@ describe.skip("ChatBotContainer Component", () => {
(useSettingsContext as jest.Mock).mockReturnValue({
settings: {
general: {
showHeader: false,
showFooter: false,
showHeader: false,
showInputRow: true,
showFooter: false,
flowStartTrigger: "ON_CHATBOT_INTERACT",
desktopEnabled: true,
mobileEnabled: true,
},
device: { desktopEnabled: true, mobileEnabled: true },
},
});

Expand All @@ -146,13 +143,12 @@ describe.skip("ChatBotContainer Component", () => {
(useSettingsContext as jest.Mock).mockReturnValue({
settings: {
general: {
showHeader: false,
showFooter: true,
showHeader: false,
showInputRow: false,
showFooter: true,
flowStartTrigger: "ON_CHATBOT_INTERACT",
desktopEnabled: true,
mobileEnabled: true,
},
device: { desktopEnabled: true, mobileEnabled: true },
},
});

Expand All @@ -173,13 +169,12 @@ describe.skip("ChatBotContainer Component", () => {
(useSettingsContext as jest.Mock).mockReturnValue({
settings: {
general: {
showHeader: true,
showFooter: true,
showHeader: true,
showInputRow: true,
showFooter: true,
flowStartTrigger: "ON_CHATBOT_INTERACT",
desktopEnabled: true,
mobileEnabled: true,
},
device: { desktopEnabled: true, mobileEnabled: true },
},
});

Expand Down Expand Up @@ -208,12 +203,12 @@ describe.skip("ChatBotContainer Component", () => {
(useSettingsContext as jest.Mock).mockReturnValue({
settings: {
general: {
showHeader: false,
showFooter: false,
showHeader: false,
showInputRow: false,
embedded: false,
mobileEnabled: false, // Setting this to false
showFooter: false,
flowStartTrigger: "ON_CHATBOT_INTERACT",
},
device: { desktopEnabled: true, mobileEnabled: true },
},
});
render(<ChatBotContainer />);
Expand Down
213 changes: 0 additions & 213 deletions __tests__/components/ChatBotContainer/ChatBotContainer.test.tsx

This file was deleted.

0 comments on commit a0de772

Please sign in to comment.