From ce6e6153cbaad9bc2bc77f6de05620e2f2aaffbf Mon Sep 17 00:00:00 2001 From: zhang-junxi66 Date: Sat, 18 Jun 2022 17:38:04 +0800 Subject: [PATCH] =?UTF-8?q?Signed-off-by:=20zhang-junxi66=20=20fix:=20=E4=BF=AE=E6=94=B9setwallpaper=E7=94=A8?= =?UTF-8?q?=E4=BE=8B=E4=B8=AD=E5=8A=A0=E8=BD=BD=E7=9A=84=E5=A3=81=E7=BA=B8?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/js/Test/Wallpaper/WallpaperJsunit.test.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/miscservices/wallpaper_js/src/main/js/Test/Wallpaper/WallpaperJsunit.test.js b/miscservices/wallpaper_js/src/main/js/Test/Wallpaper/WallpaperJsunit.test.js index 977cb1da1..f843ff5b8 100644 --- a/miscservices/wallpaper_js/src/main/js/Test/Wallpaper/WallpaperJsunit.test.js +++ b/miscservices/wallpaper_js/src/main/js/Test/Wallpaper/WallpaperJsunit.test.js @@ -17,7 +17,8 @@ import wallpaper from '@ohos.wallpaper' const WALLPAPER_SYSTEM = 0; const WALLPAPER_LOCKSCREEN = 1; -var imageSource = '/data/accounts/account_0/appdata/com.test.testApp/wallpaper'; +var imageSource_system = '/data/service/el1/public/wallpaper/0/system/wallpaper'; +var imageSource_lockscreen = '/data/service/el1/public/wallpaper/0/lockscreen/wallpaper_lock'; describe('WallpaperJsunitTest', function () { beforeAll(async function () { @@ -479,7 +480,7 @@ describe('WallpaperJsunitTest', function () { * @tc.level 0 */ it('testSetWallpaperURLPromiseLock104', 0, async function (done) { - await wallpaper.setWallpaper(imageSource, WALLPAPER_LOCKSCREEN).then((data) => { + await wallpaper.setWallpaper(imageSource_lockscreen, WALLPAPER_LOCKSCREEN).then((data) => { console.info('wallpaperXTS ===> testSetWallpaperURLPromiseLock data : ' + JSON.stringify(data)); if ((data != undefined) && (data != null) && (data != '')) { expect(true).assertTrue(); @@ -500,7 +501,7 @@ describe('WallpaperJsunitTest', function () { * @tc.level 0 */ it('testSetWallpaperURLCallbackSystem103', 0, async function (done) { - await wallpaper.setWallpaper(imageSource, WALLPAPER_SYSTEM, function (err, data) { + await wallpaper.setWallpaper(imageSource_system, WALLPAPER_SYSTEM, function (err, data) { console.info('wallpaperXTS ===> testSetWallpaperURLCallbackSystem err : ' + JSON.stringify(err)); console.info('wallpaperXTS ===> testSetWallpaperURLCallbackSystem data : ' + JSON.stringify(data)); if (err) { @@ -526,7 +527,7 @@ describe('WallpaperJsunitTest', function () { done(); return; } - wallpaper.setWallpaper(imageSource, WALLPAPER_SYSTEM).then((data) => { + wallpaper.setWallpaper(imageSource_system, WALLPAPER_SYSTEM).then((data) => { console.info('wallpaperXTS ===> testSetWallpaperURLPromiseSystem data : ' + JSON.stringify(data)); if ((data != undefined) && (data != null) && (data != '')) { expect(true).assertTrue(); @@ -547,7 +548,7 @@ describe('WallpaperJsunitTest', function () { * @tc.level 0 */ it('testSetWallpaperURLCallbackLock104', 0, async function (done) { - await wallpaper.setWallpaper(imageSource, WALLPAPER_LOCKSCREEN, function (err, data) { + await wallpaper.setWallpaper(imageSource_lockscreen, WALLPAPER_LOCKSCREEN, function (err, data) { console.info('wallpaperXTS ===> testSetWallpaperURLCallbackLock err : ' + JSON.stringify(err)); console.info('wallpaperXTS ===> testSetWallpaperURLCallbackLock data : ' + JSON.stringify(data)); if (err) { -- GitLab