mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-13 01:54:52 +08:00
To suppress the races, we mark these invocations with `void` per the instructions of `no-floating-promises`. This explicitly marks these statements as side-effect promises. Engineers can later analyze these void statements and determine whether the promise races are intentional or accidental. R=jacktfranklin@chromium.org Bug: 1239617 Change-Id: I6b7a24cf21029d6ff73b112b3e8255ebab8c60ec Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3366467 Reviewed-by: Jack Franklin <jacktfranklin@chromium.org> Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org> Auto-Submit: Tim Van der Lippe <tvanderlippe@chromium.org>
33 lines
1.4 KiB
TypeScript
33 lines
1.4 KiB
TypeScript
// Copyright 2021 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
import {click, goToResource, waitForAria, waitForElementWithTextContent} from '../../shared/helper.js';
|
|
import {describe, it} from '../../shared/mocha-extensions.js';
|
|
import {toggleAccessibilityPane} from '../helpers/elements-helpers.js';
|
|
|
|
describe('Accessibility Pane in the Elements Tab', async function() {
|
|
it('displays the partial accessibility tree', async () => {
|
|
await goToResource('elements/accessibility-simple-page.html');
|
|
await toggleAccessibilityPane();
|
|
void waitForAria('Accessibility Tree');
|
|
});
|
|
|
|
it('shows computed name from contents for title element', async () => {
|
|
await goToResource('elements/accessibility-simple-page.html');
|
|
await toggleAccessibilityPane();
|
|
const titleElement = await waitForAria('<h1>');
|
|
await click(titleElement);
|
|
await waitForAria('Contents:\xa0"Title"');
|
|
});
|
|
|
|
it('shows name from label for span element', async () => {
|
|
await goToResource('elements/accessibility-simple-page.html');
|
|
await toggleAccessibilityPane();
|
|
const a11yPane = await waitForAria('Accessibility panel');
|
|
const spanElement = await waitForElementWithTextContent('span-name');
|
|
await click(spanElement);
|
|
await waitForAria('Name:\xa0"span-name"', a11yPane);
|
|
});
|
|
});
|