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

Fix: remove unused single letter class in carousel #5325

Merged
merged 4 commits into from
Oct 10, 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ Notes: web developers are advised to use [`~` (tilde range)](https://github.com/
- Fixes [#5147](https://github.com/microsoft/BotFramework-WebChat/issues/5147). Added `punycode` to our dependencies as `markdown-it` requires it but did not have it in their `package.json`, in PR [#5301](https://github.com/microsoft/BotFramework-WebChat/pull/5301), by [@compulim](https://github.com/compulim)
- Fixes [#5306](https://github.com/microsoft/BotFramework-WebChat/issues/5306). Title and subtitle in pre-chat message activity should wrap, in PR [#5307](https://github.com/microsoft/BotFramework-WebChat/pull/5307), by [@compulim](https://github.com/compulim)
- Fixes [#5319](https://github.com/microsoft/BotFramework-WebChat/issues/5319). Some Markdown text are not rendered after HTML tags, in PR [#5320](https://github.com/microsoft/BotFramework-WebChat/pull/5320), by [@compulim](https://github.com/compulim)
- Fixes [#5323](https://github.com/microsoft/BotFramework-WebChat/issues/5323). Removed unused CSS class from carousel component, eliminating unintended styling, in PR [#5325](https://github.com/microsoft/BotFramework-WebChat/pull/5325), by [@OEvgeny](https://github.com/OEvgeny)

# Removed

Expand Down
76 changes: 76 additions & 0 deletions __tests__/html2/fluentTheme/carousel.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<!DOCTYPE html>
<html lang="en-US">

<head>
<link href="/assets/index.css" rel="stylesheet" type="text/css" />
<script crossorigin="anonymous" src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
<script crossorigin="anonymous" src="https://unpkg.com/react@16.8.6/umd/react.production.min.js"></script>
<script crossorigin="anonymous" src="https://unpkg.com/react-dom@16.8.6/umd/react-dom.production.min.js"></script>
<script crossorigin="anonymous" src="/test-harness.js"></script>
<script crossorigin="anonymous" src="/test-page-object.js"></script>
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
<script crossorigin="anonymous" src="/__dist__/botframework-webchat-fluent-theme.production.min.js"></script>
</head>

<body>
<main id="webchat"></main>
<script type="text/babel">
run(async function () {
const {
React,
ReactDOM: { render },
WebChat: { createDirectLine, FluentThemeProvider, ReactWebChat, testIds }
} = window;

const directLine = createDirectLine({
token: await testHelpers.token.fetchDirectLineToken()
});

const store = testHelpers.createStore();

const App = () => <ReactWebChat directLine={directLine} store={store} />;

render(
<FluentThemeProvider>
<App />
</FluentThemeProvider>,
document.getElementById('webchat')
);

await pageConditions.uiConnected();

// Test sending a message
document.querySelector(`[data-testid="${testIds.sendBoxTextBox}"]`).focus();
await host.sendKeys('carousel');

await host.click(document.querySelector(`[data-testid="${testIds.sendBoxSendButton}"]`));

// Verify the sent message
await pageConditions.numActivitiesShown(1);
await pageConditions.allOutgoingActivitiesSent();
await host.snapshot('local');

// Wait for and verify bot response
await pageConditions.numActivitiesShown(2);

// WHEN: Right flipper is clicked.
const carouselLayout = document.querySelector('.webchat__carousel-layout');
const carouselFilmstrip = carouselLayout.querySelector('.webchat__carousel-filmstrip');
const rightFlipper = carouselLayout.querySelector('[aria-label="Next"]');

// Improve test reliability by hover before click on flipper button.
await host.hover(rightFlipper);
await testHelpers.sleep(500);
await host.click(rightFlipper);

// THEN: It should scroll right.
await pageConditions.became('Carousel should scroll right', () => carouselFilmstrip.scrollLeft > 100, 1000);

await testHelpers.sleep(500); // Wait for right flipper to fade away.

await host.snapshot('local');
});
</script>
</body>

</html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/component/src/Activity/CarouselFilmStrip.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ const CarouselFilmStrip = ({
)}
<div className="webchat__carousel-filmstrip__complimentary">
<div className="webchat__carousel-filmstrip__nub-pad" />
<div className="webchat__carousel-filmstrip__complimentary-content c">
<div className="webchat__carousel-filmstrip__complimentary-content">
<ul
className="webchat__carousel-filmstrip__attachments react-film__filmstrip__list"
ref={itemContainerCallbackRef}
Expand Down
Loading