Skip to content

Commit

Permalink
Fix: unit test cases for ChatBotContainer component (#265)
Browse files Browse the repository at this point in the history
Co-authored-by: George Olson <[email protected]>
  • Loading branch information
georgeolson92 and golson-pdx authored Nov 13, 2024
1 parent 155c7d7 commit 7255c06
Showing 1 changed file with 20 additions and 25 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

0 comments on commit 7255c06

Please sign in to comment.