-
Notifications
You must be signed in to change notification settings - Fork 310
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(a11y): narrate person list position in mgt-agenda (#3221)
* fix person in list narration * fix list item arrow interaction * fix overflow * add tests, bump test helpers * fix narrator
- Loading branch information
Showing
6 changed files
with
104 additions
and
14 deletions.
There are no files selected for viewing
Binary file added
BIN
+32.6 KB
.yarn/cache/@open-wc-testing-helpers-npm-3.0.1-690f0e1b0d-8fc42574b2.zip
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
packages/mgt-components/src/components/mgt-people/mgt-people.tests.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/** | ||
* ------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. | ||
* See License in the project root for license information. | ||
* ------------------------------------------------------------------------------------------- | ||
*/ | ||
|
||
import { fixture, html, expect, oneEvent } from '@open-wc/testing'; | ||
import { MockProvider, Providers } from '@microsoft/mgt-element'; | ||
import { MgtPeople, registerMgtPeopleComponent } from './mgt-people'; | ||
|
||
describe('mgt-people - tests', () => { | ||
registerMgtPeopleComponent(); | ||
Providers.globalProvider = new MockProvider(true); | ||
|
||
it('should render with overflow', async () => { | ||
const mgtPeople = await fixture(html`<mgt-people | ||
people-queries="Lidia, Megan, Lynne, Brian, Joni"> | ||
</mgt-people> | ||
`); | ||
// @ts-expect-error TS2554 expects 3 arguments got 2 https://github.com/open-wc/open-wc/issues/2746 | ||
await oneEvent(mgtPeople, 'people-rendered'); | ||
// eslint-disable-next-line @typescript-eslint/no-unused-expressions | ||
expect(mgtPeople.shadowRoot.querySelector('.overflow')).to.not.be.null; | ||
await expect(mgtPeople).shadowDom.to.be.accessible(); | ||
}); | ||
|
||
it('has required scopes', () => { | ||
expect(MgtPeople.requiredScopes).to.have.members([ | ||
'user.readbasic.all', | ||
'user.read.all', | ||
'user.read', | ||
'people.read', | ||
'presence.read.all', | ||
'presence.read', | ||
'contacts.read' | ||
]); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters