fix: fix and enable accessibilitySupportEnabled
tests (36-x-y) (#47196)
fix: fix and enable `accessibilitySupportEnabled` tests (#46825) * test: enable accessibilitySupportEnabled tests * test: check both getters after calling each setter * fix: do not assume the default initial value of accessibilitySupportEnabled * chore: remove redundant test case * chore: disable accessibilitySupportEnabled tests on Linux
This commit is contained in:
parent
9b624e143e
commit
1c132a3fdb
1 changed files with 16 additions and 16 deletions
|
@ -979,22 +979,22 @@ describe('app module', () => {
|
|||
});
|
||||
|
||||
ifdescribe(process.platform !== 'linux')('accessibilitySupportEnabled property', () => {
|
||||
it('with properties', () => {
|
||||
it('can set accessibility support enabled', () => {
|
||||
expect(app.accessibilitySupportEnabled).to.eql(false);
|
||||
|
||||
app.accessibilitySupportEnabled = true;
|
||||
expect(app.accessibilitySupportEnabled).to.eql(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('with functions', () => {
|
||||
it('can set accessibility support enabled', () => {
|
||||
expect(app.isAccessibilitySupportEnabled()).to.eql(false);
|
||||
|
||||
app.setAccessibilitySupportEnabled(true);
|
||||
expect(app.isAccessibilitySupportEnabled()).to.eql(true);
|
||||
});
|
||||
it('is mutable', () => {
|
||||
const values = [false, true, false];
|
||||
const setters: Array<(arg: boolean) => void> = [
|
||||
(value) => { app.accessibilitySupportEnabled = value; },
|
||||
(value) => app.setAccessibilitySupportEnabled(value)
|
||||
];
|
||||
const getters: Array<() => boolean> = [
|
||||
() => app.accessibilitySupportEnabled,
|
||||
() => app.isAccessibilitySupportEnabled()
|
||||
];
|
||||
for (const value of values) {
|
||||
for (const set of setters) {
|
||||
set(value);
|
||||
for (const get of getters) expect(get()).to.eql(value);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue