Skip to content

Commit

Permalink
test: update test
Browse files Browse the repository at this point in the history
  • Loading branch information
KazuCocoa committed Jan 9, 2024
1 parent 983caf2 commit 2b4a79e
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions test/unit/android-helper-specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ describe('Android Helpers', function () {
it('should fail if avd name is not specified', async function () {
await helpers.prepareEmulator(adb, {}).should.eventually.be.rejected;
});
}),
})
);
describe(
'prepareAvdArgs',
Expand All @@ -143,7 +143,7 @@ describe('Android Helpers', function () {
let args = prepareAvdArgs(adb, {isHeadless: true, avdArgs});
args.should.eql(['-no-window']);
});
}),
})
);
describe('ensureNetworkSpeed', function () {
it('should return value if network speed is valid', function () {
Expand Down Expand Up @@ -206,7 +206,7 @@ describe('Android Helpers', function () {
.should.be.rejectedWith(Error, `Failed to set language: fr and country: FR`);
mocks.adb.verify();
});
}),
})
);

describe('getDeviceInfoFromCaps', function () {
Expand Down Expand Up @@ -493,9 +493,9 @@ describe('Android Helpers', function () {
};
(await helpers.getLaunchInfo(adb, inOpts)).should.deep.equal(outOpts);
mocks.adb.verify();
},
}
);
}),
})
);
describe(
'resetApp',
Expand Down Expand Up @@ -535,7 +535,7 @@ describe('Android Helpers', function () {
await helpers.resetApp(adb, {app: localApkPath, appPackage: pkg, fastReset: true});
mocks.adb.verify();
});
}),
})
);

describe(
Expand Down Expand Up @@ -590,7 +590,7 @@ describe('Android Helpers', function () {
mocks.adb.verify();
mocks.helpers.verify();
});
}),
})
);
describe(
'installOtherApks',
Expand Down Expand Up @@ -628,7 +628,7 @@ describe('Android Helpers', function () {
await helpers.installOtherApks([fakeApk, otherFakeApk], adb, opts);
mocks.adb.verify();
});
}),
})
);
describe(
'pushSettingsApp',
Expand Down Expand Up @@ -674,7 +674,7 @@ describe('Android Helpers', function () {
await helpers.pushSettingsApp(adb);
mocks.adb.verify();
});
}),
})
);
describe(
'setMockLocationApp',
Expand All @@ -701,7 +701,7 @@ describe('Android Helpers', function () {
await helpers.setMockLocationApp(adb, 'io.appium.settings');
mocks.adb.verify();
});
}),
})
);
describe(
'pushStrings',
Expand Down Expand Up @@ -751,7 +751,7 @@ describe('Android Helpers', function () {
mocks.adb.verify();
mocks.fs.verify();
});
}),
})
);
describe(
'unlock',
Expand Down Expand Up @@ -848,7 +848,7 @@ describe('Android Helpers', function () {
.should.be.rejectedWith('Fingerprint');
mocks.helpers.verify();
});
}),
})
);
describe(
'initDevice',
Expand Down Expand Up @@ -910,7 +910,10 @@ describe('Android Helpers', function () {
mocks.helpers.expects('pushSettingsApp').once();
mocks.helpers.expects('ensureDeviceLocale').never();
mocks.helpers.expects('setMockLocationApp').once();
mocks.helpers.expects('hideKeyboard').withExactArgs(adb).once();
mocks.helpers
.expects('hideKeyboard')
.withExactArgs(adb)
.once();
await helpers.initDevice(adb, opts);
mocks.helpers.verify();
mocks.adb.verify();
Expand Down Expand Up @@ -966,7 +969,7 @@ describe('Android Helpers', function () {
mocks.helpers.verify();
mocks.adb.verify();
});
}),
})
);
describe('removeNullProperties', function () {
it('should ignore null properties', function () {
Expand Down

0 comments on commit 2b4a79e

Please sign in to comment.