Skip to content

Commit

Permalink
HTML tests: use <main> for container (#4684)
Browse files Browse the repository at this point in the history
* Using <main> for container

* Update PR number

* Update PR number
  • Loading branch information
compulim authored Mar 28, 2023
1 parent 573cfb7 commit 2c853c8
Show file tree
Hide file tree
Showing 268 changed files with 270 additions and 268 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Added

- Resolved [#4643](https://github.com/microsoft/BotFramework-WebChat/issues/4643). Decoupling `botframework-directlinejs` from business logic of Web Chat for better tree-shaking, by [@compulim](https://github.com/compulim), in PR [#4645](https://github.com/microsoft/BotFramework-WebChat/pull/4645) and PR [#4648](https://github.com/microsoft/BotFramework-WebChat/pull/4648)
- 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: using `<main>` for the root container, by [@compulim](https://github.com/compulim), in PR [#4684](https://github.com/microsoft/BotFramework-WebChat/pull/4684)

### Fixed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(
async function () {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/html/accessibility.accessibleName.simple.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(
async function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const store = testHelpers.createStore();
Expand Down
2 changes: 1 addition & 1 deletion __tests__/html/accessibility.adaptiveCard.ariaPushed.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
function createActivity(text) {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<script crossorigin="anonymous" src="https://unpkg.com/react@18.1.0/umd/react.production.min.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<script crossorigin="anonymous" src="https://unpkg.com/react@18.1.0/umd/react.production.min.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
const store = testHelpers.createStore();
let directLine;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const store = testHelpers.createStore();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const store = testHelpers.createStore();
Expand Down
2 changes: 1 addition & 1 deletion __tests__/html/accessibility.aria-roledescription.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const store = testHelpers.createStore();
Expand Down
2 changes: 1 addition & 1 deletion __tests__/html/accessibility.attachment.aria.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const store = testHelpers.createStore();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const store = testHelpers.createStore();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const store = testHelpers.createStore();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
// This test is to make sure we don't regress issue #3431, a race condition:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
WebChat.renderWebChat(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const clock = lolex.install();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const clock = lolex.install();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const clock = lolex.install();
Expand Down
2 changes: 1 addition & 1 deletion __tests__/html/accessibility.heroCard.heading.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const store = testHelpers.createStore();
Expand Down
2 changes: 1 addition & 1 deletion __tests__/html/accessibility.keyboardHelp.ariaLabel.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const store = testHelpers.createStore();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const store = testHelpers.createStore();
Expand Down
2 changes: 1 addition & 1 deletion __tests__/html/accessibility.keyboardHelp.clickThru.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const store = testHelpers.createStore();
Expand Down
2 changes: 1 addition & 1 deletion __tests__/html/accessibility.keyboardHelp.darkTheme.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const store = testHelpers.createStore();
Expand Down
2 changes: 1 addition & 1 deletion __tests__/html/accessibility.keyboardHelp.escapeKey.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const store = testHelpers.createStore();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const store = testHelpers.createStore();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
// SETUP: Browser window size with height of 480px.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
// SETUP: Browser window size with height of 480px.
Expand Down
2 changes: 1 addition & 1 deletion __tests__/html/accessibility.keyboardHelp.tabKey.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const store = testHelpers.createStore();
Expand Down
2 changes: 1 addition & 1 deletion __tests__/html/accessibility.keyboardHelp.zeroHeight.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
// SETUP: Browser window size with height of 42px.
Expand Down
2 changes: 1 addition & 1 deletion __tests__/html/accessibility.landmarkRole.invalid.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(
async function () {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/html/accessibility.landmarkRole.valid.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
WebChat.renderWebChat(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(
async function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(
async function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(
async function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(
async function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<script crossorigin="anonymous" src="https://unpkg.com/markdown-it@12.0.6/dist/markdown-it.min.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const baseActivity = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<script crossorigin="anonymous" src="https://unpkg.com/react-dom@16.8.6/umd/react-dom.production.min.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const baseActivity = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
const timestamp = new Date(2000, 0, 1, 12, 34, 56, 789).toISOString();
Expand Down
2 changes: 1 addition & 1 deletion __tests__/html/accessibility.liveRegionActivity.text.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script>
run(async function () {
await host.windowSize(360, 800, document.getElementById('webchat'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script type="text/babel" data-presets="env,stage-3,react">
const {
React: { useEffect },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script type="text/babel" data-presets="env,stage-3,react">
const {
React: { useEffect },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script type="text/babel" data-presets="env,stage-3,react">
const {
React: { useEffect },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<script crossorigin="anonymous" src="/__dist__/webchat-es5.js"></script>
</head>
<body>
<div id="webchat"></div>
<main id="webchat"></main>
<script type="text/babel" data-presets="env,stage-3,react">
const {
React: { useEffect },
Expand Down
Loading

0 comments on commit 2c853c8

Please sign in to comment.