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

HTML tests: change subtle color for tests that customized background color #4686

Merged
merged 1 commit into from
Mar 28, 2023
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

- Fixes [#4557](https://github.com/microsoft/BotFramework-WebChat/issues/4557). Flipper buttons in carousels and suggested actions is now renamed to "next/previous" from "left/right", by [@compulim](https://github.com/compulim), in PR [#4646](https://github.com/microsoft/BotFramework-WebChat/pull/4646)
- Fixes [#4652](https://github.com/microsoft/BotFramework-WebChat/issues/4652). Keyboard help screen, activity focus traps, and chat history terminator should not be hidden behind `aria-hidden` because they are focusable, by [@compulim](https://github.com/compulim), in PR [#4659](https://github.com/microsoft/BotFramework-WebChat/pull/4659)
- Related to [#4650](https://github.com/microsoft/BotFramework-WebChat/issues/4650). Added automated accessibility check using [`axe-core`](https://npmjs.com/package/axe-core)
- HTML test: changed contrast ratio in tests that use different background colors, by [@compulim](https://github.com/compulim), in PR [#XXX](https://github.com/microsoft/BotFramework-WebChat/pull/XXX)

### Changed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
run(async function () {
const store = testHelpers.createStore();
const directLine = WebChat.createDirectLine({ token: await testHelpers.token.fetchDirectLineToken() });
const baseProps = { directLine, store };
const baseProps = { directLine, store, styleOptions: { subtle: '#666' } };
const webChatElement = document.getElementById('webchat');

WebChat.renderWebChat(baseProps, webChatElement);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
run(async function () {
const store = testHelpers.createStore();
const directLine = WebChat.createDirectLine({ token: await testHelpers.token.fetchDirectLineToken() });
const baseProps = { directLine, store };
const baseProps = { directLine, store, styleOptions: { subtle: '#666' } };
const webChatElement = document.getElementById('webchat');

WebChat.renderWebChat(baseProps, webChatElement);
Expand Down
3 changes: 2 additions & 1 deletion __tests__/html/adaptiveCards.tapAction.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
WebChat.renderWebChat(
{
directLine,
store: testHelpers.createStore()
store: testHelpers.createStore(),
styleOptions: { subtle: '#666' }
},
document.getElementById('webchat')
);
Expand Down
5 changes: 4 additions & 1 deletion __tests__/html/autoScroll.acknowledgement.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@
{
directLine,
store,
styleOptions: { autoScrollSnapOnPage: true }
styleOptions: {
autoScrollSnapOnPage: true,
subtle: '#666'
}
},
webChatElement
);
Expand Down
3 changes: 2 additions & 1 deletion __tests__/html/autoScroll.snap.activity.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@
store,
styleOptions: {
autoScrollSnapOnActivity: 2,
autoScrollSnapOnActivityOffset: 100
autoScrollSnapOnActivityOffset: 100,
subtle: '#666'
}
},
webChatElement
Expand Down
3 changes: 2 additions & 1 deletion __tests__/html/autoScroll.snap.activityAndPage.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@
styleOptions: {
autoScrollSnapOnActivity: true,
autoScrollSnapOnPage: true,
autoScrollSnapOnPageOffset: -100
autoScrollSnapOnPageOffset: -100,
subtle: '#666'
}
},
webChatElement
Expand Down
9 changes: 8 additions & 1 deletion __tests__/html/autoScroll.snap.default.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,14 @@
run(async function () {
const webChatElement = document.getElementById('webchat');

WebChat.renderWebChat({ directLine, store }, webChatElement);
WebChat.renderWebChat(
{
directLine,
store,
styleOptions: { subtle: '#666' }
},
webChatElement
);

await pageConditions.uiConnected();

Expand Down
5 changes: 4 additions & 1 deletion __tests__/html/autoScroll.snap.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@
{
directLine,
store,
styleOptions: { autoScrollSnapOnPage: 0.2 }
styleOptions: {
autoScrollSnapOnPage: 0.2,
subtle: '#666'
}
},
webChatElement
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
run(async function () {
const store = testHelpers.createStore();
const directLine = WebChat.createDirectLine({ token: await testHelpers.token.fetchDirectLineToken() });
const baseProps = { directLine, store };
const baseProps = { directLine, store, styleOptions: { subtle: '#666' } };
const webChatElement = document.getElementById('webchat');

WebChat.renderWebChat(baseProps, webChatElement);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
return next(...args);
},
directLine,
store
store,
styleOptions: { subtle: '#666' }
},
document.getElementById('webchat')
);
Expand Down
2 changes: 1 addition & 1 deletion __tests__/html/focusManagement.disableUI.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
run(async function () {
const store = testHelpers.createStore();
const directLine = WebChat.createDirectLine({ token: await testHelpers.token.fetchDirectLineToken() });
const baseProps = { directLine, store };
const baseProps = { directLine, store, styleOptions: { subtle: '#666' } };
const webChatElement = document.getElementById('webchat');

WebChat.renderWebChat(baseProps, webChatElement);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
WebChat.renderWebChat(
{
directLine,
store
store,
styleOptions: { subtle: '#666' }
},
document.getElementById('webchat')
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
WebChat.renderWebChat(
{
directLine,
store
store,
styleOptions: { subtle: '#666' }
},
document.getElementById('webchat')
);
Expand Down
3 changes: 2 additions & 1 deletion __tests__/html/focusManagement.sendBoxTextBoxSubmit.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
WebChat.renderWebChat(
{
directLine,
store
store,
styleOptions: { subtle: '#666' }
},
document.getElementById('webchat')
);
Expand Down
3 changes: 2 additions & 1 deletion __tests__/html/focusManagement.sendFailedRetry.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
window.WebChat.renderWebChat(
{
directLine: hackedDirectLine,
store
store,
styleOptions: { subtle: '#666' }
},
document.getElementById('webchat')
);
Expand Down
3 changes: 2 additions & 1 deletion __tests__/html/focusManagement.suggestedActions.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
WebChat.renderWebChat(
{
directLine,
store
store,
styleOptions: { subtle: '#666' }
},
document.getElementById('webchat')
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,14 @@
]);
const store = testHelpers.createStore();

WebChat.renderWebChat({ directLine, store }, document.getElementById('webchat'));
WebChat.renderWebChat(
{
directLine,
store,
styleOptions: { subtle: '#666' }
},
document.getElementById('webchat')
);

await pageConditions.uiConnected();
await pageConditions.numActivitiesShown(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,14 @@
]);
const store = testHelpers.createStore();

WebChat.renderWebChat({ directLine, store }, document.getElementById('webchat'));
WebChat.renderWebChat(
{
directLine,
store,
styleOptions: { subtle: '#666' }
},
document.getElementById('webchat')
);

await pageConditions.uiConnected();
await pageConditions.numActivitiesShown(3);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
WebChat.renderWebChat(
{
directLine,
store
store,
styleOptions: { subtle: '#666' }
},
document.getElementById('webchat')
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
WebChat.renderWebChat(
{
directLine,
store
store,
styleOptions: { subtle: '#666' }
},
document.getElementById('webchat')
);
Expand Down
3 changes: 2 additions & 1 deletion __tests__/html/useTextBoxSubmit.main.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
const renderWebChatWithHook = testHelpers.createRenderWebChatWithHook(
{
directLine: WebChat.createDirectLine({ token: await testHelpers.token.fetchDirectLineToken() }),
store: testHelpers.createStore()
store: testHelpers.createStore(),
styleOptions: { subtle: '#666' }
},
document.getElementById('webchat')
);
Expand Down
3 changes: 2 additions & 1 deletion __tests__/html/useTextBoxSubmit.sendBox.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
{
activityMiddleware: testHelpers.createRunHookActivityMiddleware(),
directLine,
store
store,
styleOptions: { subtle: '#666' }
},
document.getElementById('webchat')
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
{
activityMiddleware: testHelpers.createRunHookActivityMiddleware(),
directLine,
store
store,
styleOptions: { subtle: '#666' }
},
document.getElementById('webchat')
);
Expand Down