提交 152e4d28 编写于 作者: O openharmony_ci 提交者: Gitee

!1188 modify testcases on 20211126

Merge pull request !1188 from 杨清/0924
...@@ -186,6 +186,8 @@ describe('resMgrTest', function () { ...@@ -186,6 +186,8 @@ describe('resMgrTest', function () {
it('getConfiguration_test_001', 0, async function (done) { it('getConfiguration_test_001', 0, async function (done) {
resmgr.getResourceManager((error, mgr) => { resmgr.getResourceManager((error, mgr) => {
mgr.getConfiguration((error, cfg) => { mgr.getConfiguration((error, cfg) => {
cfg.direction = Direction.DIRECTION_VERTICAL;
cfg.locale = 'zh';
expect(cfg !== null).assertTrue(); expect(cfg !== null).assertTrue();
}) })
}) })
...@@ -200,6 +202,7 @@ describe('resMgrTest', function () { ...@@ -200,6 +202,7 @@ describe('resMgrTest', function () {
it('getConfiguration_test_002', 0, async function (done) { it('getConfiguration_test_002', 0, async function (done) {
resmgr.getResourceManager((error, mgr) => { resmgr.getResourceManager((error, mgr) => {
mgr.getConfiguration().then(cfg => { mgr.getConfiguration().then(cfg => {
cfg.direction = Direction.DIRECTION_HORIZONTAL;
expect(cfg !== null).assertTrue(); expect(cfg !== null).assertTrue();
}) })
}) })
...@@ -214,6 +217,12 @@ describe('resMgrTest', function () { ...@@ -214,6 +217,12 @@ describe('resMgrTest', function () {
it('getDeviceCapability_test_001', 0, async function (done) { it('getDeviceCapability_test_001', 0, async function (done) {
resmgr.getResourceManager((error, mgr) => { resmgr.getResourceManager((error, mgr) => {
mgr.getDeviceCapability((error, dc) => { mgr.getDeviceCapability((error, dc) => {
dc.screenDensity = ScreenDensity.SCREEN_SDPI;
dc.deviceType = DeviceType.DEVICE_TYPE_PHONE;
dc.screenDensity = ScreenDensity.SCREEN_MDPI;
dc.deviceType = DeviceType.DEVICE_TYPE_TABLET;
dc.screenDensity = ScreenDensity.SCREEN_LDPI;
dc.deviceType = DeviceType.DEVICE_TYPE_CAR;
expect(dc !== null).assertTrue(); expect(dc !== null).assertTrue();
}) })
}) })
...@@ -228,6 +237,12 @@ describe('resMgrTest', function () { ...@@ -228,6 +237,12 @@ describe('resMgrTest', function () {
it('getDeviceCapability_test_002', 0, async function (done) { it('getDeviceCapability_test_002', 0, async function (done) {
resmgr.getResourceManager((error, mgr) => { resmgr.getResourceManager((error, mgr) => {
mgr.getDeviceCapability().then(dc => { mgr.getDeviceCapability().then(dc => {
dc.screenDensity = ScreenDensity.SCREEN_XLDPI;
dc.deviceType = DeviceType.DEVICE_TYPE_PC;
dc.screenDensity = ScreenDensity.SCREEN_XXLDPI;
dc.deviceType = DeviceType.DEVICE_TYPE_TV;
dc.screenDensity = ScreenDensity.SCREEN_XXXLDPI;
dc.deviceType = DeviceType.DEVICE_TYPE_WEARABLE;
expect(dc !== null).assertTrue(); expect(dc !== null).assertTrue();
}) })
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册