提交 95a4e0f3 编写于 作者: Y yangbo

fixbug 3.0

Signed-off-by: Nyangbo <yangbo258@huawei.com>
上级 29b3d07a
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
* limitations under the License. * limitations under the License.
*/ */
// @ts-nocheck
import photoAccessHelper from '@ohos.file.photoAccessHelper'; import photoAccessHelper from '@ohos.file.photoAccessHelper';
import abilityAccessCtrl from '@ohos.abilityAccessCtrl'; import abilityAccessCtrl from '@ohos.abilityAccessCtrl';
import bundleManager from '@ohos.bundle.bundleManager'; import bundleManager from '@ohos.bundle.bundleManager';
......
...@@ -35,12 +35,12 @@ import assetGetLastObjectTest from './PhotoAssetFetchResult/getLastObject' ...@@ -35,12 +35,12 @@ import assetGetLastObjectTest from './PhotoAssetFetchResult/getLastObject'
import assetGetNextObjectTest from './PhotoAssetFetchResult/getNextObject' import assetGetNextObjectTest from './PhotoAssetFetchResult/getNextObject'
import assetGetPositionObjectTest from './PhotoAssetFetchResult/getObjectByPosition' import assetGetPositionObjectTest from './PhotoAssetFetchResult/getObjectByPosition'
import assetIsAfterLastTest from './PhotoAssetFetchResult/isAfterLast' import assetIsAfterLastTest from './PhotoAssetFetchResult/isAfterLast'
import createAssetTest from './UserFileManager/createAsset' import createAssetTest from './PhotoAccessHelper/createAsset'
import getAlbumsTest from './UserFileManager/getAlbums' import getAlbumsTest from './PhotoAccessHelper/getAlbums'
import getAssetsTest from './UserFileManager/getAssets' import getAssetsTest from './PhotoAccessHelper/getAssets'
import offTest from './UserFileManager/off' import unRegisterChangeTest from './PhotoAccessHelper/unRegisterChange'
import onTest from './UserFileManager/on' import registerChangeTest from './PhotoAccessHelper/registerChange'
import releaseTest from './UserFileManager/release' import releaseTest from './PhotoAccessHelper/release'
import checkAttrTest from './PhotoAsset/checkAttr' import checkAttrTest from './PhotoAsset/checkAttr'
import closeTest from './PhotoAsset/close' import closeTest from './PhotoAsset/close'
import commitModifyTest from './PhotoAsset/commitModify' import commitModifyTest from './PhotoAsset/commitModify'
...@@ -74,8 +74,8 @@ export default function testsuite () { ...@@ -74,8 +74,8 @@ export default function testsuite () {
createAssetTest() createAssetTest()
getAlbumsTest() getAlbumsTest()
getAssetsTest() getAssetsTest()
offTest() unRegisterChangeTest()
onTest() registerChangeTest()
releaseTest() releaseTest()
checkAttrTest() checkAttrTest()
closeTest() closeTest()
......
...@@ -133,9 +133,9 @@ export default function getAssetsTest () { ...@@ -133,9 +133,9 @@ export default function getAssetsTest () {
* @tc.desc : getAssets image * @tc.desc : getAssets image
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 2
*/ */
it('getAssets_callback_003', 0, async function (done) { it('getAssets_callback_003', 2, async function (done) {
const testNum = 'getAssets_callback_003'; const testNum = 'getAssets_callback_003';
await getAssetsAbnormalCallbackTest(done, testNum, undefined); await getAssetsAbnormalCallbackTest(done, testNum, undefined);
}); });
...@@ -177,9 +177,9 @@ export default function getAssetsTest () { ...@@ -177,9 +177,9 @@ export default function getAssetsTest () {
* @tc.desc : getAssets image * @tc.desc : getAssets image
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 2
*/ */
it('getAssets_promise_003', 0, async function (done) { it('getAssets_promise_003', 2, async function (done) {
const testNum = 'getAssets_promise_003'; const testNum = 'getAssets_promise_003';
await getAssetsAbnormalPromiseTest(done, testNum, undefined); await getAssetsAbnormalPromiseTest(done, testNum, undefined);
}); });
......
...@@ -25,8 +25,8 @@ import { ...@@ -25,8 +25,8 @@ import {
photoType, photoType,
} from '../../../../../../../common' } from '../../../../../../../common'
export default function onTest () { export default function registerChangeTest () {
describe('onTest', function () { describe('registerChangeTest', function () {
const helper = photoAccessHelper.getPhotoAccessHelper(globalThis.abilityContext) const helper = photoAccessHelper.getPhotoAccessHelper(globalThis.abilityContext)
const { NOTIFY_ADD, NOTIFY_UPDATE, NOTIFY_REMOVE, NOTIFY_ALBUM_ADD_ASSET, NOTIFY_ALBUM_REMOVE_ASSET } = const { NOTIFY_ADD, NOTIFY_UPDATE, NOTIFY_REMOVE, NOTIFY_ALBUM_ADD_ASSET, NOTIFY_ALBUM_REMOVE_ASSET } =
photoAccessHelper.NotifyType; photoAccessHelper.NotifyType;
...@@ -48,10 +48,10 @@ export default function onTest () { ...@@ -48,10 +48,10 @@ export default function onTest () {
const asset = await getFileAsset(testNum, fetchOps); const asset = await getFileAsset(testNum, fetchOps);
let count = 0; let count = 0;
await sleep(500); await sleep(500);
helper.on(asset.uri, false, async (changeData) => { helper.registerChange(asset.uri, false, async (changeData) => {
count++; count++;
console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`); console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`);
helper.off(asset.uri); helper.unRegisterChange(asset.uri);
expect(changeData.type).assertEqual(NOTIFY_UPDATE); expect(changeData.type).assertEqual(NOTIFY_UPDATE);
expect(changeData.uris[0]).assertEqual(asset.uri); expect(changeData.uris[0]).assertEqual(asset.uri);
}); });
...@@ -81,10 +81,10 @@ export default function onTest () { ...@@ -81,10 +81,10 @@ export default function onTest () {
try { try {
let changeDataUri = ''; let changeDataUri = '';
let listenCount = 0; let listenCount = 0;
helper.on(DEFAULT_ALBUM_URI, true, async (changeData) => { helper.registerChange(DEFAULT_ALBUM_URI, true, async (changeData) => {
listenCount++; listenCount++;
console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`); console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`);
helper.off(DEFAULT_ALBUM_URI); helper.unRegisterChange(DEFAULT_ALBUM_URI);
changeDataUri = changeData.uris[0]; changeDataUri = changeData.uris[0];
expect(changeData.type).assertEqual(NOTIFY_ADD); expect(changeData.type).assertEqual(NOTIFY_ADD);
}); });
...@@ -92,7 +92,7 @@ export default function onTest () { ...@@ -92,7 +92,7 @@ export default function onTest () {
let album = await helper.createAlbum(albumName); let album = await helper.createAlbum(albumName);
let creatAlbumUri = album.albumUri; let creatAlbumUri = album.albumUri;
await sleep(2000); await sleep(2000);
helper.off(DEFAULT_ALBUM_URI); helper.unRegisterChange(DEFAULT_ALBUM_URI);
expect(creatAlbumUri).assertEqual(changeDataUri); expect(creatAlbumUri).assertEqual(changeDataUri);
expect(listenCount).assertEqual(1); expect(listenCount).assertEqual(1);
done(); done();
...@@ -120,7 +120,7 @@ export default function onTest () { ...@@ -120,7 +120,7 @@ export default function onTest () {
let album = await helper.createAlbum(albumName); let album = await helper.createAlbum(albumName);
albumUri = album.albumUri; albumUri = album.albumUri;
await sleep(500); await sleep(500);
helper.on(albumUri, false, async (changeData) => { helper.registerChange(albumUri, false, async (changeData) => {
count++; count++;
console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`); console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`);
expect(changeData.type).assertEqual(NOTIFY_UPDATE); expect(changeData.type).assertEqual(NOTIFY_UPDATE);
...@@ -129,7 +129,7 @@ export default function onTest () { ...@@ -129,7 +129,7 @@ export default function onTest () {
album.albumName = Date.now() + album.albumName; album.albumName = Date.now() + album.albumName;
await album.commitModify(); await album.commitModify();
await sleep(1000); await sleep(1000);
helper.off(albumUri); helper.unRegisterChange(albumUri);
expect(count).assertEqual(1); expect(count).assertEqual(1);
done(); done();
} catch (error) { } catch (error) {
...@@ -156,16 +156,16 @@ export default function onTest () { ...@@ -156,16 +156,16 @@ export default function onTest () {
const asset = await getFileAsset(testNum, fetchOps); const asset = await getFileAsset(testNum, fetchOps);
let count = 0; let count = 0;
await sleep(500); await sleep(500);
helper.on(album.albumUri, false, async (changeData) => { helper.registerChange(album.albumUri, false, async (changeData) => {
count++; count++;
console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`); console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`);
expect(changeData.type).assertEqual(NOTIFY_ALBUM_ADD_ASSET); expect(changeData.type).assertEqual(NOTIFY_ALBUM_ADD_ASSET);
expect(changeData.uris[0]).assertEqual(album.albumUri); expect(changeData.uris[0]).assertEqual(album.albumUri);
// expect(changeData.extraUris[0]).assertEqual(asset.uri); expect(changeData.extraUris[0]).assertEqual(asset.uri);
}); });
await album.addAssets([asset]); await album.addAssets([asset]);
await sleep(1000); await sleep(1000);
helper.off(album.albumUri); helper.unRegisterChange(album.albumUri);
expect(count).assertEqual(1); expect(count).assertEqual(1);
done(); done();
} catch (error) { } catch (error) {
...@@ -193,16 +193,16 @@ export default function onTest () { ...@@ -193,16 +193,16 @@ export default function onTest () {
let count = 0; let count = 0;
await album.addAssets([asset]); await album.addAssets([asset]);
await sleep(500); await sleep(500);
helper.on(album.albumUri, false, async (changeData) => { helper.registerChange(album.albumUri, false, async (changeData) => {
count++; count++;
console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`); console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`);
expect(changeData.type).assertEqual(NOTIFY_ALBUM_REMOVE_ASSET); expect(changeData.type).assertEqual(NOTIFY_ALBUM_REMOVE_ASSET);
expect(changeData.uris[0]).assertEqual(album.albumUri); expect(changeData.uris[0]).assertEqual(album.albumUri);
// expect(changeData.extraUris[0]).assertEqual(asset.uri); expect(changeData.extraUris[0]).assertEqual(asset.uri);
}); });
await album.removeAssets([asset]); await album.removeAssets([asset]);
await sleep(1000); await sleep(1000);
helper.off(album.albumUri); helper.unRegisterChange(album.albumUri);
expect(count).assertEqual(1); expect(count).assertEqual(1);
done(); done();
} catch (error) { } catch (error) {
......
...@@ -27,8 +27,8 @@ import { ...@@ -27,8 +27,8 @@ import {
albumSubtype albumSubtype
} from '../../../../../../../common' } from '../../../../../../../common'
export default function offTest () { export default function unRegisterChangeTest () {
describe('offTest', function () { describe('unRegisterChangeTest', function () {
const helper = photoAccessHelper.getPhotoAccessHelper(globalThis.abilityContext) const helper = photoAccessHelper.getPhotoAccessHelper(globalThis.abilityContext)
const DEFAULT_PHOTO_URI = photoAccessHelper.DefaultChangeUri.DEFAULT_PHOTO_URI; const DEFAULT_PHOTO_URI = photoAccessHelper.DefaultChangeUri.DEFAULT_PHOTO_URI;
const DEFAULT_ALBUM_URI = photoAccessHelper.DefaultChangeUri.DEFAULT_ALBUM_URI; const DEFAULT_ALBUM_URI = photoAccessHelper.DefaultChangeUri.DEFAULT_ALBUM_URI;
...@@ -48,12 +48,12 @@ export default function offTest () { ...@@ -48,12 +48,12 @@ export default function offTest () {
const asset = await getFileAsset(testNum, fetchOps); const asset = await getFileAsset(testNum, fetchOps);
let count = 0; let count = 0;
await sleep(500); await sleep(500);
helper.on(asset.uri, false, async (changeData) => { helper.registerChange(asset.uri, false, async (changeData) => {
count++; count++;
console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`); console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`);
}); });
await sleep(100); await sleep(100);
helper.off(asset.uri); helper.unRegisterChange(asset.uri);
await sleep(100); await sleep(100);
const newTitle = testNum + asset.get(photoKeys.TITLE); const newTitle = testNum + asset.get(photoKeys.TITLE);
asset.set(photoKeys.TITLE, newTitle); asset.set(photoKeys.TITLE, newTitle);
...@@ -80,12 +80,12 @@ export default function offTest () { ...@@ -80,12 +80,12 @@ export default function offTest () {
const testNum = 'off_007'; const testNum = 'off_007';
try { try {
let count = 0; let count = 0;
helper.on(DEFAULT_ALBUM_URI, true, async (changeData) => { helper.registerChange(DEFAULT_ALBUM_URI, true, async (changeData) => {
count++; count++;
console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`); console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`);
}); });
await sleep(100); await sleep(100);
helper.off(DEFAULT_ALBUM_URI); helper.unRegisterChange(DEFAULT_ALBUM_URI);
await sleep(100); await sleep(100);
let albumName = testNum + Date.now(); let albumName = testNum + Date.now();
await helper.createAlbum(albumName); await helper.createAlbum(albumName);
...@@ -116,12 +116,12 @@ export default function offTest () { ...@@ -116,12 +116,12 @@ export default function offTest () {
let album = await helper.createAlbum(albumName); let album = await helper.createAlbum(albumName);
albumUri = album.albumUri; albumUri = album.albumUri;
await sleep(500); await sleep(500);
helper.on(albumUri, false, async (changeData) => { helper.registerChange(albumUri, false, async (changeData) => {
count++; count++;
console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`); console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`);
}); });
await sleep(100); await sleep(100);
helper.off(albumUri); helper.unRegisterChange(albumUri);
await sleep(100); await sleep(100);
album.albumName = Date.now() + album.albumName; album.albumName = Date.now() + album.albumName;
await album.commitModify(); await album.commitModify();
...@@ -155,12 +155,12 @@ export default function offTest () { ...@@ -155,12 +155,12 @@ export default function offTest () {
albumUri = album.albumUri; albumUri = album.albumUri;
await album.addAssets([asset]); await album.addAssets([asset]);
await sleep(500); await sleep(500);
helper.on(albumUri, false, async (changeData) => { helper.registerChange(albumUri, false, async (changeData) => {
count++; count++;
console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`); console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`);
}); });
await sleep(100); await sleep(100);
helper.off(albumUri); helper.unRegisterChange(albumUri);
await sleep(100); await sleep(100);
album.albumName = testNum + album.albumName; album.albumName = testNum + album.albumName;
await album.commitModify(); await album.commitModify();
...@@ -191,12 +191,12 @@ export default function offTest () { ...@@ -191,12 +191,12 @@ export default function offTest () {
const asset = await getFileAsset(testNum, fetchOps); const asset = await getFileAsset(testNum, fetchOps);
let count = 0; let count = 0;
await sleep(500); await sleep(500);
helper.on(album.albumUri, false, async (changeData) => { helper.registerChange(album.albumUri, false, async (changeData) => {
count++; count++;
console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`); console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`);
}); });
await sleep(100); await sleep(100);
helper.off(album.albumUri); helper.unRegisterChange(album.albumUri);
await sleep(100); await sleep(100);
await album.addAssets([asset]); await album.addAssets([asset]);
await sleep(1000); await sleep(1000);
...@@ -227,12 +227,12 @@ export default function offTest () { ...@@ -227,12 +227,12 @@ export default function offTest () {
let count = 0; let count = 0;
await album.addAssets([asset]); await album.addAssets([asset]);
await sleep(500); await sleep(500);
helper.on(album.albumUri, false, async (changeData) => { helper.registerChange(album.albumUri, false, async (changeData) => {
count++; count++;
console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`); console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`);
}); });
await sleep(100); await sleep(100);
helper.off(album.albumUri); helper.unRegisterChange(album.albumUri);
await sleep(100); await sleep(100);
await album.removeAssets([asset]); await album.removeAssets([asset]);
await sleep(1000); await sleep(1000);
...@@ -260,16 +260,16 @@ export default function offTest () { ...@@ -260,16 +260,16 @@ export default function offTest () {
const asset = await getFileAsset(testNum, fetchOps); const asset = await getFileAsset(testNum, fetchOps);
let listenCount = 0; let listenCount = 0;
await sleep(500); await sleep(500);
helper.on(asset.uri, false, async (changeData) => { helper.registerChange(asset.uri, false, async (changeData) => {
listenCount++; listenCount++;
console.info(`${testNum} changeData1: ${JSON.stringify(changeData)}`); console.info(`${testNum} changeData1: ${JSON.stringify(changeData)}`);
}); });
helper.on(asset.uri, false, async (changeData) => { helper.registerChange(asset.uri, false, async (changeData) => {
listenCount++; listenCount++;
console.info(`${testNum} changeData2: ${JSON.stringify(changeData)}`); console.info(`${testNum} changeData2: ${JSON.stringify(changeData)}`);
}); });
await sleep(100); await sleep(100);
helper.off(asset.uri); helper.unRegisterChange(asset.uri);
await sleep(100); await sleep(100);
const newTitle = testNum + asset.get(photoKeys.TITLE); const newTitle = testNum + asset.get(photoKeys.TITLE);
asset.set(photoKeys.TITLE, newTitle); asset.set(photoKeys.TITLE, newTitle);
...@@ -307,13 +307,13 @@ export default function offTest () { ...@@ -307,13 +307,13 @@ export default function offTest () {
const callback2 = async (changeData) => { const callback2 = async (changeData) => {
listenCount2++; listenCount2++;
console.info(`${testNum} callback2: ${JSON.stringify(changeData)}`); console.info(`${testNum} callback2: ${JSON.stringify(changeData)}`);
helper.off(asset.uri, callback2); helper.unRegisterChange(asset.uri, callback2);
}; };
helper.on(asset.uri, false, callback1); helper.registerChange(asset.uri, false, callback1);
helper.on(asset.uri, false, callback2); helper.registerChange(asset.uri, false, callback2);
await sleep(100); await sleep(100);
helper.off(asset.uri, callback1); helper.unRegisterChange(asset.uri, callback1);
await sleep(100); await sleep(100);
const newTitle = testNum + asset.get(photoKeys.TITLE); const newTitle = testNum + asset.get(photoKeys.TITLE);
asset.set(photoKeys.TITLE, newTitle); asset.set(photoKeys.TITLE, newTitle);
......
...@@ -117,14 +117,14 @@ export default function commitModifyTest () { ...@@ -117,14 +117,14 @@ export default function commitModifyTest () {
it('photoAsset_commitModify_callback_000', 0, async function (done) { it('photoAsset_commitModify_callback_000', 0, async function (done) {
const testNum = 'photoAsset_commitModify_callback_000'; const testNum = 'photoAsset_commitModify_callback_000';
const fetchOps = photoFetchOption(testNum, photoKeys.DISPLAY_NAME, 'modifyCb01.jpg'); const fetchOps = photoFetchOption(testNum, photoKeys.DISPLAY_NAME, 'modifyCb01.jpg');
const newTitle = new Date().getTime() + '.jpg'; const newTitle = new Date().getTime() + testNum;
await commitModifyCallback(done, testNum, fetchOps, newTitle); await commitModifyCallback(done, testNum, fetchOps, newTitle);
}); });
/** /**
* @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_FILE_ASSET_COMMITMODIFY_0100 * @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_FILE_ASSET_COMMITMODIFY_0100
* @tc.name : photoAsset_commitModify_callback_001 * @tc.name : photoAsset_commitModify_callback_001
* @tc.desc : modify image displayName '中中...' (83) * @tc.desc : modify image displayName '一...' (84)
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 2 * @tc.level : Level 2
...@@ -133,10 +133,9 @@ export default function commitModifyTest () { ...@@ -133,10 +133,9 @@ export default function commitModifyTest () {
const testNum = 'photoAsset_commitModify_callback_001'; const testNum = 'photoAsset_commitModify_callback_001';
const fetchOps = photoFetchOption(testNum, photoKeys.DISPLAY_NAME, 'modifyCb02.jpg'); const fetchOps = photoFetchOption(testNum, photoKeys.DISPLAY_NAME, 'modifyCb02.jpg');
let newTitle = ''; let newTitle = '';
for (let i = 0; i < 83; i++) { for (let i = 0; i < 84; i++) {
newTitle += ''; newTitle += '';
} }
newTitle += '.jpg';
await commitModifyCallback(done, testNum, fetchOps, newTitle); await commitModifyCallback(done, testNum, fetchOps, newTitle);
}); });
...@@ -155,7 +154,6 @@ export default function commitModifyTest () { ...@@ -155,7 +154,6 @@ export default function commitModifyTest () {
for (let i = 0; i < 251; i++) { for (let i = 0; i < 251; i++) {
newTitle += 'a'; newTitle += 'a';
} }
newTitle += '.jpg';
await commitModifyCallback(done, testNum, fetchOps, newTitle); await commitModifyCallback(done, testNum, fetchOps, newTitle);
}); });
...@@ -194,7 +192,7 @@ export default function commitModifyTest () { ...@@ -194,7 +192,7 @@ export default function commitModifyTest () {
/** /**
* @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_FILE_ASSET_COMMITMODIFY_0500 * @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_FILE_ASSET_COMMITMODIFY_0500
* @tc.name : photoAsset_commitModify_callback_005 * @tc.name : photoAsset_commitModify_callback_005
* @tc.desc : modify image displayName '中中....jpg' (84) * @tc.desc : modify image displayName '二二....jpg' (84)
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 2 * @tc.level : Level 2
...@@ -205,7 +203,7 @@ export default function commitModifyTest () { ...@@ -205,7 +203,7 @@ export default function commitModifyTest () {
const type = 'displayName'; const type = 'displayName';
let value = ''; let value = '';
for (let i = 0; i < 84; i++) { for (let i = 0; i < 84; i++) {
value += ''; value += '';
} }
value += '.jpg'; value += '.jpg';
await commitModifyAbnormalCallback(done, testNum, fetchOps, type, value); await commitModifyAbnormalCallback(done, testNum, fetchOps, type, value);
...@@ -214,7 +212,7 @@ export default function commitModifyTest () { ...@@ -214,7 +212,7 @@ export default function commitModifyTest () {
/** /**
* @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_FILE_ASSET_COMMITMODIFY_0600 * @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_FILE_ASSET_COMMITMODIFY_0600
* @tc.name : photoAsset_commitModify_callback_006 * @tc.name : photoAsset_commitModify_callback_006
* @tc.desc : modify image displayName 'aaaaaaa...' (252) * @tc.desc : modify image displayName 'bbbbbbb...' (252)
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 2 * @tc.level : Level 2
...@@ -225,7 +223,7 @@ export default function commitModifyTest () { ...@@ -225,7 +223,7 @@ export default function commitModifyTest () {
const type = 'displayName'; const type = 'displayName';
let value = ''; let value = '';
for (let i = 0; i < 252; i++) { for (let i = 0; i < 252; i++) {
value += 'a'; value += 'b';
} }
value += '.jpg'; value += '.jpg';
await commitModifyAbnormalCallback(done, testNum, fetchOps, type, value); await commitModifyAbnormalCallback(done, testNum, fetchOps, type, value);
...@@ -243,14 +241,14 @@ export default function commitModifyTest () { ...@@ -243,14 +241,14 @@ export default function commitModifyTest () {
it('photoAsset_commitModify_callback_007', 0, async function (done) { it('photoAsset_commitModify_callback_007', 0, async function (done) {
const testNum = 'photoAsset_commitModify_callback_007'; const testNum = 'photoAsset_commitModify_callback_007';
const fetchOps = photoFetchOption(testNum, photoKeys.DISPLAY_NAME, 'modifyCb01.mp4'); const fetchOps = photoFetchOption(testNum, photoKeys.DISPLAY_NAME, 'modifyCb01.mp4');
const newTitle = new Date().getTime() + '.mp4'; const newTitle = new Date().getTime() + testNum;
await commitModifyCallback(done, testNum, fetchOps, newTitle); await commitModifyCallback(done, testNum, fetchOps, newTitle);
}); });
/** /**
* @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_FILE_ASSET_COMMITMODIFY_0800 * @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_FILE_ASSET_COMMITMODIFY_0800
* @tc.name : photoAsset_commitModify_callback_008 * @tc.name : photoAsset_commitModify_callback_008
* @tc.desc : modify video displayName '中中...' (83) * @tc.desc : modify video displayName '三三...' (84)
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 2 * @tc.level : Level 2
...@@ -259,17 +257,16 @@ export default function commitModifyTest () { ...@@ -259,17 +257,16 @@ export default function commitModifyTest () {
const testNum = 'photoAsset_commitModify_callback_008'; const testNum = 'photoAsset_commitModify_callback_008';
const fetchOps = photoFetchOption(testNum, photoKeys.DISPLAY_NAME, 'modifyCb02.mp4'); const fetchOps = photoFetchOption(testNum, photoKeys.DISPLAY_NAME, 'modifyCb02.mp4');
let newTitle = ''; let newTitle = '';
for (let i = 0; i < 83; i++) { for (let i = 0; i < 84; i++) {
newTitle += ''; newTitle += '';
} }
newTitle += '.mp4';
await commitModifyCallback(done, testNum, fetchOps, newTitle); await commitModifyCallback(done, testNum, fetchOps, newTitle);
}); });
/** /**
* @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_FILE_ASSET_COMMITMODIFY_0900 * @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_FILE_ASSET_COMMITMODIFY_0900
* @tc.name : photoAsset_commitModify_callback_009 * @tc.name : photoAsset_commitModify_callback_009
* @tc.desc : modify image displayName 'aaaaaaa...' (251) * @tc.desc : modify image displayName 'ccccccc...' (251)
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 2 * @tc.level : Level 2
...@@ -279,9 +276,8 @@ export default function commitModifyTest () { ...@@ -279,9 +276,8 @@ export default function commitModifyTest () {
const fetchOps = photoFetchOption(testNum, photoKeys.DISPLAY_NAME, 'modifyCb03.mp4'); const fetchOps = photoFetchOption(testNum, photoKeys.DISPLAY_NAME, 'modifyCb03.mp4');
let newTitle = ''; let newTitle = '';
for (let i = 0; i < 251; i++) { for (let i = 0; i < 251; i++) {
newTitle += 'a'; newTitle += 'c';
} }
newTitle += '.mp4';
await commitModifyCallback(done, testNum, fetchOps, newTitle); await commitModifyCallback(done, testNum, fetchOps, newTitle);
}); });
...@@ -320,7 +316,7 @@ export default function commitModifyTest () { ...@@ -320,7 +316,7 @@ export default function commitModifyTest () {
/** /**
* @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_FILE_ASSET_COMMITMODIFY_1200 * @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_FILE_ASSET_COMMITMODIFY_1200
* @tc.name : photoAsset_commitModify_callback_012 * @tc.name : photoAsset_commitModify_callback_012
* @tc.desc : modify image displayName '中中...' (84) * @tc.desc : modify image displayName '四四...' (84)
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 2 * @tc.level : Level 2
...@@ -331,7 +327,7 @@ export default function commitModifyTest () { ...@@ -331,7 +327,7 @@ export default function commitModifyTest () {
const type = 'displayName'; const type = 'displayName';
let value = ''; let value = '';
for (let i = 0; i < 84; i++) { for (let i = 0; i < 84; i++) {
value += ''; value += '';
} }
value += '.mp4'; value += '.mp4';
await commitModifyAbnormalCallback(done, testNum, fetchOps, type, value); await commitModifyAbnormalCallback(done, testNum, fetchOps, type, value);
...@@ -340,7 +336,7 @@ export default function commitModifyTest () { ...@@ -340,7 +336,7 @@ export default function commitModifyTest () {
/** /**
* @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_FILE_ASSET_COMMITMODIFY_1300 * @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_FILE_ASSET_COMMITMODIFY_1300
* @tc.name : photoAsset_commitModify_callback_013 * @tc.name : photoAsset_commitModify_callback_013
* @tc.desc : modify image displayName 'aaaaaaa...' (252) * @tc.desc : modify image displayName 'ddddddd...' (252)
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 2 * @tc.level : Level 2
...@@ -351,7 +347,7 @@ export default function commitModifyTest () { ...@@ -351,7 +347,7 @@ export default function commitModifyTest () {
const type = 'displayName'; const type = 'displayName';
let value = ''; let value = '';
for (let i = 0; i < 252; i++) { for (let i = 0; i < 252; i++) {
value += 'a'; value += 'd';
} }
value += '.mp4'; value += '.mp4';
await commitModifyAbnormalCallback(done, testNum, fetchOps, type, value); await commitModifyAbnormalCallback(done, testNum, fetchOps, type, value);
...@@ -377,7 +373,7 @@ export default function commitModifyTest () { ...@@ -377,7 +373,7 @@ export default function commitModifyTest () {
/** /**
* @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_FILE_ASSET_COMMITMODIFY_0100 * @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_FILE_ASSET_COMMITMODIFY_0100
* @tc.name : photoAsset_commitModify_promise_001 * @tc.name : photoAsset_commitModify_promise_001
* @tc.desc : modify image displayName '中中...' (83) * @tc.desc : modify image displayName '五五...' (83)
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 2 * @tc.level : Level 2
...@@ -387,16 +383,15 @@ export default function commitModifyTest () { ...@@ -387,16 +383,15 @@ export default function commitModifyTest () {
const fetchOps = photoFetchOption(testNum, photoKeys.DISPLAY_NAME, 'modifyPro02.jpg'); const fetchOps = photoFetchOption(testNum, photoKeys.DISPLAY_NAME, 'modifyPro02.jpg');
let newTitle = ''; let newTitle = '';
for (let i = 0; i < 83; i++) { for (let i = 0; i < 83; i++) {
newTitle += ''; newTitle += '';
} }
newTitle += '.jpg';
await commitModifyPromise(done, testNum, fetchOps, newTitle); await commitModifyPromise(done, testNum, fetchOps, newTitle);
}); });
/** /**
* @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_FILE_ASSET_COMMITMODIFY_0200 * @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_FILE_ASSET_COMMITMODIFY_0200
* @tc.name : photoAsset_commitModify_promise_002 * @tc.name : photoAsset_commitModify_promise_002
* @tc.desc : modify image displayName 'aaaaaaa...' (251) * @tc.desc : modify image displayName 'eeeeeee...' (251)
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 2 * @tc.level : Level 2
...@@ -406,9 +401,8 @@ export default function commitModifyTest () { ...@@ -406,9 +401,8 @@ export default function commitModifyTest () {
const fetchOps = photoFetchOption(testNum, photoKeys.DISPLAY_NAME, 'modifyPro03.jpg'); const fetchOps = photoFetchOption(testNum, photoKeys.DISPLAY_NAME, 'modifyPro03.jpg');
let newTitle = ''; let newTitle = '';
for (let i = 0; i < 251; i++) { for (let i = 0; i < 251; i++) {
newTitle += 'a'; newTitle += 'e';
} }
newTitle += '.jpg';
await commitModifyPromise(done, testNum, fetchOps, newTitle); await commitModifyPromise(done, testNum, fetchOps, newTitle);
}); });
...@@ -447,7 +441,7 @@ export default function commitModifyTest () { ...@@ -447,7 +441,7 @@ export default function commitModifyTest () {
/** /**
* @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_FILE_ASSET_COMMITMODIFY_0500 * @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_FILE_ASSET_COMMITMODIFY_0500
* @tc.name : photoAsset_commitModify_promise_005 * @tc.name : photoAsset_commitModify_promise_005
* @tc.desc : modify image displayName '中中....jpg' (84) * @tc.desc : modify image displayName '六六....jpg' (84)
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 2 * @tc.level : Level 2
...@@ -458,7 +452,7 @@ export default function commitModifyTest () { ...@@ -458,7 +452,7 @@ export default function commitModifyTest () {
const type = 'displayName'; const type = 'displayName';
let value = ''; let value = '';
for (let i = 0; i < 84; i++) { for (let i = 0; i < 84; i++) {
value += ''; value += '';
} }
value += '.jpg'; value += '.jpg';
await commitModifyAbnormalPromise(done, testNum, fetchOps, type, value); await commitModifyAbnormalPromise(done, testNum, fetchOps, type, value);
...@@ -467,7 +461,7 @@ export default function commitModifyTest () { ...@@ -467,7 +461,7 @@ export default function commitModifyTest () {
/** /**
* @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_FILE_ASSET_COMMITMODIFY_0600 * @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_FILE_ASSET_COMMITMODIFY_0600
* @tc.name : photoAsset_commitModify_promise_006 * @tc.name : photoAsset_commitModify_promise_006
* @tc.desc : modify image displayName 'aaaaaaa...' (252) * @tc.desc : modify image displayName 'fffffff...' (252)
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 2 * @tc.level : Level 2
...@@ -478,7 +472,7 @@ export default function commitModifyTest () { ...@@ -478,7 +472,7 @@ export default function commitModifyTest () {
const type = 'displayName'; const type = 'displayName';
let value = ''; let value = '';
for (let i = 0; i < 252; i++) { for (let i = 0; i < 252; i++) {
value += 'a'; value += 'f';
} }
value += '.jpg'; value += '.jpg';
await commitModifyAbnormalPromise(done, testNum, fetchOps, type, value); await commitModifyAbnormalPromise(done, testNum, fetchOps, type, value);
...@@ -503,7 +497,7 @@ export default function commitModifyTest () { ...@@ -503,7 +497,7 @@ export default function commitModifyTest () {
/** /**
* @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_FILE_ASSET_COMMITMODIFY_0800 * @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_FILE_ASSET_COMMITMODIFY_0800
* @tc.name : photoAsset_commitModify_promise_008 * @tc.name : photoAsset_commitModify_promise_008
* @tc.desc : modify video displayName '中中...' (83) * @tc.desc : modify video displayName '七七...' (83)
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 2 * @tc.level : Level 2
...@@ -513,16 +507,15 @@ export default function commitModifyTest () { ...@@ -513,16 +507,15 @@ export default function commitModifyTest () {
const fetchOps = photoFetchOption(testNum, photoKeys.DISPLAY_NAME, 'modifyPro02.mp4'); const fetchOps = photoFetchOption(testNum, photoKeys.DISPLAY_NAME, 'modifyPro02.mp4');
let newTitle = ''; let newTitle = '';
for (let i = 0; i < 83; i++) { for (let i = 0; i < 83; i++) {
newTitle += ''; newTitle += '';
} }
newTitle += '.mp4';
await commitModifyPromise(done, testNum, fetchOps, newTitle); await commitModifyPromise(done, testNum, fetchOps, newTitle);
}); });
/** /**
* @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_FILE_ASSET_COMMITMODIFY_0900 * @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_FILE_ASSET_COMMITMODIFY_0900
* @tc.name : photoAsset_commitModify_promise_009 * @tc.name : photoAsset_commitModify_promise_009
* @tc.desc : modify image displayName 'aaaaaaa...' (251) * @tc.desc : modify image displayName 'ggggggg...' (251)
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 2 * @tc.level : Level 2
...@@ -532,9 +525,8 @@ export default function commitModifyTest () { ...@@ -532,9 +525,8 @@ export default function commitModifyTest () {
const fetchOps = photoFetchOption(testNum, photoKeys.DISPLAY_NAME, 'modifyPro03.mp4'); const fetchOps = photoFetchOption(testNum, photoKeys.DISPLAY_NAME, 'modifyPro03.mp4');
let newTitle = ''; let newTitle = '';
for (let i = 0; i < 251; i++) { for (let i = 0; i < 251; i++) {
newTitle += 'a'; newTitle += 'g';
} }
newTitle += '.mp4';
await commitModifyPromise(done, testNum, fetchOps, newTitle); await commitModifyPromise(done, testNum, fetchOps, newTitle);
}); });
...@@ -573,7 +565,7 @@ export default function commitModifyTest () { ...@@ -573,7 +565,7 @@ export default function commitModifyTest () {
/** /**
* @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_FILE_ASSET_COMMITMODIFY_1200 * @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_FILE_ASSET_COMMITMODIFY_1200
* @tc.name : photoAsset_commitModify_promise_012 * @tc.name : photoAsset_commitModify_promise_012
* @tc.desc : modify image displayName '中中...' (84) * @tc.desc : modify image displayName '八八...' (84)
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 2 * @tc.level : Level 2
...@@ -584,7 +576,7 @@ export default function commitModifyTest () { ...@@ -584,7 +576,7 @@ export default function commitModifyTest () {
const type = 'displayName'; const type = 'displayName';
let value = ''; let value = '';
for (let i = 0; i < 84; i++) { for (let i = 0; i < 84; i++) {
value += ''; value += '';
} }
value += '.mp4'; value += '.mp4';
await commitModifyAbnormalPromise(done, testNum, fetchOps, type, value); await commitModifyAbnormalPromise(done, testNum, fetchOps, type, value);
...@@ -593,7 +585,7 @@ export default function commitModifyTest () { ...@@ -593,7 +585,7 @@ export default function commitModifyTest () {
/** /**
* @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_FILE_ASSET_COMMITMODIFY_1300 * @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_FILE_ASSET_COMMITMODIFY_1300
* @tc.name : photoAsset_commitModify_promise_013 * @tc.name : photoAsset_commitModify_promise_013
* @tc.desc : modify image displayName 'aaaaaaa...' (252) * @tc.desc : modify image displayName 'hhhhhhh...' (252)
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 2 * @tc.level : Level 2
...@@ -604,7 +596,7 @@ export default function commitModifyTest () { ...@@ -604,7 +596,7 @@ export default function commitModifyTest () {
const type = 'displayName'; const type = 'displayName';
let value = ''; let value = '';
for (let i = 0; i < 252; i++) { for (let i = 0; i < 252; i++) {
value += 'a'; value += 'h';
} }
value += '.mp4'; value += '.mp4';
await commitModifyAbnormalPromise(done, testNum, fetchOps, type, value); await commitModifyAbnormalPromise(done, testNum, fetchOps, type, value);
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
*/ */
// @ts-nocheck // @ts-nocheck
import fileio from "@ohos.fileio";
import { describe, it, expect } from 'deccjsunit/index' import { describe, it, expect } from 'deccjsunit/index'
import { import {
photoKeys, photoKeys,
...@@ -34,7 +35,12 @@ export default function getReadOnlyFdTest () { ...@@ -34,7 +35,12 @@ export default function getReadOnlyFdTest () {
expect(false).assertTrue(); expect(false).assertTrue();
} else { } else {
console.info(`${testNum} fd: ${fd}`); console.info(`${testNum} fd: ${fd}`);
expect(isNum(fd)).assertTrue(); try {
await fileio.write(fd, testNum);
expect(false).assertTrue();
} catch (error) {
console.info(`${testNum} error: ${error}`);
}
} }
done(); done();
}) })
...@@ -50,11 +56,11 @@ export default function getReadOnlyFdTest () { ...@@ -50,11 +56,11 @@ export default function getReadOnlyFdTest () {
const asset = await getFileAsset(testNum, fetchOps); const asset = await getFileAsset(testNum, fetchOps);
const fd = await asset.getReadOnlyFd(); const fd = await asset.getReadOnlyFd();
console.info(`${testNum} fd: ${fd}`); console.info(`${testNum} fd: ${fd}`);
expect(isNum(fd)).assertTrue(); await fileio.write(fd, testNum);
expect(false).assertTrue();
done(); done();
} catch (error) { } catch (error) {
console.info(`${testNum} failed; error: ${error}`); console.info(`${testNum} failed; error: ${error}`);
expect(false).assertTrue();
done(); done();
} }
} }
......
...@@ -31,50 +31,58 @@ export default function assetCloseTest () { ...@@ -31,50 +31,58 @@ export default function assetCloseTest () {
let fetchResult = await helper.getAssets(fetchOps); let fetchResult = await helper.getAssets(fetchOps);
expect(fetchResult.getCount() > 0).assertTrue(); expect(fetchResult.getCount() > 0).assertTrue();
fetchResult.close(); fetchResult.close();
let testCount = 0;
let count = 0; let count = 0;
try { try {
testCount++;
fetchResult.getCount(); fetchResult.getCount();
} catch (error) { } catch (error) {
console.info(`${testNum} getCount failed; error: ${error}`); console.info(`${testNum} getCount failed; error: ${error}`);
count++; count++;
} }
try { try {
testCount++;
await fetchResult.getFirstObject(); await fetchResult.getFirstObject();
} catch (error) { } catch (error) {
console.info(`${testNum} getFirstObject failed; error: ${error}`); console.info(`${testNum} getFirstObject failed; error: ${error}`);
count++; count++;
} }
try { try {
testCount++;
await fetchResult.getNextObject(); await fetchResult.getNextObject();
} catch (error) { } catch (error) {
console.info(`${testNum} getNextObject failed; error: ${error}`); console.info(`${testNum} getNextObject failed; error: ${error}`);
count++; count++;
} }
try { try {
testCount++;
await fetchResult.getLastObject(); await fetchResult.getLastObject();
} catch (error) { } catch (error) {
console.info(`${testNum} getLastObject failed; error: ${error}`); console.info(`${testNum} getLastObject failed; error: ${error}`);
count++; count++;
} }
try { try {
testCount++;
await fetchResult.getObjectByPosition(0); await fetchResult.getObjectByPosition(0);
} catch (error) { } catch (error) {
console.info(`${testNum} getObjectByPosition failed; error: ${error}`); console.info(`${testNum} getObjectByPosition failed; error: ${error}`);
count++; count++;
} }
try { try {
testCount++;
await fetchResult.getAllObjects(); await fetchResult.getAllObjects();
} catch (error) { } catch (error) {
console.info(`${testNum} getAllObjects failed; error: ${error}`); console.info(`${testNum} getAllObjects failed; error: ${error}`);
count++; count++;
} }
try { try {
testCount++;
fetchResult.isAfterLast(); fetchResult.isAfterLast();
} catch (error) { } catch (error) {
console.info(`${testNum} isAfterLast failed; error: ${error}`); console.info(`${testNum} isAfterLast failed; error: ${error}`);
count++; count++;
} }
expect(count).assertEqual(7); expect(count).assertEqual(testCount);
done(); done();
} catch (error) { } catch (error) {
console.info(`${testNum} failed; error: ${error}`); console.info(`${testNum} failed; error: ${error}`);
......
...@@ -37,6 +37,8 @@ export default function assetGetLastObjectTest () { ...@@ -37,6 +37,8 @@ export default function assetGetLastObjectTest () {
expect(false).assertTrue(); expect(false).assertTrue();
} else { } else {
expect(asset !== undefined).assertTrue(); expect(asset !== undefined).assertTrue();
const ret = fetchResult.isAfterLast();
expect(ret).assertTrue();
} }
} catch (error) { } catch (error) {
console.info(`${testNum} getLastObject failed; error: ${error}`); console.info(`${testNum} getLastObject failed; error: ${error}`);
...@@ -56,8 +58,10 @@ export default function assetGetLastObjectTest () { ...@@ -56,8 +58,10 @@ export default function assetGetLastObjectTest () {
let fetchResult = await helper.getAssets(fetchOps); let fetchResult = await helper.getAssets(fetchOps);
expect(fetchResult.getCount() > 0).assertTrue(); expect(fetchResult.getCount() > 0).assertTrue();
const asset = await fetchResult.getLastObject(); const asset = await fetchResult.getLastObject();
fetchResult.close();
expect(asset !== undefined).assertTrue(); expect(asset !== undefined).assertTrue();
const ret = fetchResult.isAfterLast();
fetchResult.close();
expect(ret).assertTrue();
done(); done();
} catch (error) { } catch (error) {
console.info(`${testNum} failed; error: ${error}`); console.info(`${testNum} failed; error: ${error}`);
......
...@@ -30,13 +30,14 @@ export default function assetGetPositionObjectTest () { ...@@ -30,13 +30,14 @@ export default function assetGetPositionObjectTest () {
try { try {
let fetchResult = await helper.getAssets(fetchOps); let fetchResult = await helper.getAssets(fetchOps);
expect(fetchResult.getCount() > 0).assertTrue(); expect(fetchResult.getCount() > 0).assertTrue();
const firAsset = await fetchResult.getFirstObject();
fetchResult.getObjectByPosition(0, (err, asset) => { fetchResult.getObjectByPosition(0, (err, asset) => {
try { try {
if (err !== undefined) { if (err !== undefined) {
console.info(`${testNum} getObjectByPosition failed; err: ${err}`); console.info(`${testNum} getObjectByPosition failed; err: ${err}`);
expect(false).assertTrue(); expect(false).assertTrue();
} else { } else {
expect(asset !== undefined).assertTrue(); expect(asset.displayName).assertEqual(firAsset.displayName);
} }
} catch (error) { } catch (error) {
console.info(`${testNum} getObjectByPosition failed; error: ${error}`); console.info(`${testNum} getObjectByPosition failed; error: ${error}`);
...@@ -55,9 +56,10 @@ export default function assetGetPositionObjectTest () { ...@@ -55,9 +56,10 @@ export default function assetGetPositionObjectTest () {
try { try {
let fetchResult = await helper.getAssets(fetchOps); let fetchResult = await helper.getAssets(fetchOps);
expect(fetchResult.getCount() > 0).assertTrue(); expect(fetchResult.getCount() > 0).assertTrue();
const firAsset = await fetchResult.getFirstObject();
const asset = await fetchResult.getObjectByPosition(0); const asset = await fetchResult.getObjectByPosition(0);
fetchResult.close(); fetchResult.close();
expect(asset !== undefined).assertTrue(); expect(asset.displayName).assertEqual(firAsset.displayName);
done(); done();
} catch (error) { } catch (error) {
console.info(`${testNum} failed; error: ${error}`); console.info(`${testNum} failed; error: ${error}`);
......
...@@ -17,8 +17,8 @@ ohos_js_hap_suite("photoAccess_system_js_hap") { ...@@ -17,8 +17,8 @@ ohos_js_hap_suite("photoAccess_system_js_hap") {
hap_profile = "entry/src/main/module.json" hap_profile = "entry/src/main/module.json"
js_build_mode = "debug" js_build_mode = "debug"
deps = [ deps = [
":photoAccess_js_assets", ":photoAccessSystem_js_assets",
":photoAccess_resources", ":photoAccessSystem_resources",
] ]
ets2abc = true ets2abc = true
certificate_profile = "signature/openharmony_sx.p7b" certificate_profile = "signature/openharmony_sx.p7b"
...@@ -27,17 +27,17 @@ ohos_js_hap_suite("photoAccess_system_js_hap") { ...@@ -27,17 +27,17 @@ ohos_js_hap_suite("photoAccess_system_js_hap") {
subsystem_name = "multimedia" subsystem_name = "multimedia"
} }
ohos_app_scope("photoAccess_app_profile") { ohos_app_scope("photoAccessSystem_app_profile") {
app_profile = "AppScope/app.json" app_profile = "AppScope/app.json"
sources = [ "AppScope/resources" ] sources = [ "AppScope/resources" ]
} }
ohos_js_assets("photoAccess_js_assets") { ohos_js_assets("photoAccessSystem_js_assets") {
source_dir = "entry/src/main/ets" source_dir = "entry/src/main/ets"
} }
ohos_resources("photoAccess_resources") { ohos_resources("photoAccessSystem_resources") {
sources = [ "entry/src/main/resources" ] sources = [ "entry/src/main/resources" ]
deps = [ ":photoAccess_app_profile" ] deps = [ ":photoAccessSystem_app_profile" ]
hap_profile = "entry/src/main/module.json" hap_profile = "entry/src/main/module.json"
} }
...@@ -273,11 +273,11 @@ export default function publicApiTestWithSystemApiTest () { ...@@ -273,11 +273,11 @@ export default function publicApiTestWithSystemApiTest () {
await createAsset.close(fd); await createAsset.close(fd);
let count = 0; let count = 0;
await sleep(500); await sleep(500);
helper.on(createAsset.uri, false, async (changeData) => { helper.registerChange(createAsset.uri, false, async (changeData) => {
count++; count++;
console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`); console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`);
}); });
helper.off(createAsset.uri); helper.unRegisterChange(createAsset.uri);
await sleep(100); await sleep(100);
fd = await createAsset.getReadOnlyFd(); fd = await createAsset.getReadOnlyFd();
await createAsset.close(fd); await createAsset.close(fd);
...@@ -306,12 +306,12 @@ export default function publicApiTestWithSystemApiTest () { ...@@ -306,12 +306,12 @@ export default function publicApiTestWithSystemApiTest () {
const asset = await getFileAsset(testNum, fetchOps); const asset = await getFileAsset(testNum, fetchOps);
let count= 0; let count= 0;
await sleep(500); await sleep(500);
helper.on(asset.uri, false, async (changeData) => { helper.registerChange(asset.uri, false, async (changeData) => {
count++; count++;
console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`); console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`);
}); });
await sleep(100); await sleep(100);
helper.off(asset.uri); helper.unRegisterChange(asset.uri);
await sleep(100); await sleep(100);
await asset.setFavorite(true); await asset.setFavorite(true);
await sleep(1000); await sleep(1000);
...@@ -340,12 +340,12 @@ export default function publicApiTestWithSystemApiTest () { ...@@ -340,12 +340,12 @@ export default function publicApiTestWithSystemApiTest () {
await asset.setFavorite(true); await asset.setFavorite(true);
let count= 0; let count= 0;
await sleep(500); await sleep(500);
helper.on(asset.uri, false, async (changeData) => { helper.registerChange(asset.uri, false, async (changeData) => {
count++; count++;
console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`); console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`);
}); });
await sleep(100); await sleep(100);
helper.off(asset.uri); helper.unRegisterChange(asset.uri);
await sleep(100); await sleep(100);
await asset.setFavorite(false); await asset.setFavorite(false);
await sleep(1000); await sleep(1000);
...@@ -373,12 +373,12 @@ export default function publicApiTestWithSystemApiTest () { ...@@ -373,12 +373,12 @@ export default function publicApiTestWithSystemApiTest () {
const asset = await getFileAsset(testNum, fetchOps); const asset = await getFileAsset(testNum, fetchOps);
let count= 0; let count= 0;
await sleep(500); await sleep(500);
helper.on(asset.uri, false, async (changeData) => { helper.registerChange(asset.uri, false, async (changeData) => {
count++; count++;
console.info(`${testNum} asset changeData: ${JSON.stringify(changeData)}`); console.info(`${testNum} asset changeData: ${JSON.stringify(changeData)}`);
}); });
await sleep(100); await sleep(100);
helper.off(asset.uri); helper.unRegisterChange(asset.uri);
await sleep(100); await sleep(100);
await helper.deleteAssets([asset.uri]); await helper.deleteAssets([asset.uri]);
await sleep(2000); await sleep(2000);
...@@ -414,14 +414,14 @@ export default function publicApiTestWithSystemApiTest () { ...@@ -414,14 +414,14 @@ export default function publicApiTestWithSystemApiTest () {
const trashFileAsset = await trashFetchResult.getFirstObject(); const trashFileAsset = await trashFetchResult.getFirstObject();
let count= 0; let count= 0;
await sleep(500); await sleep(500);
helper.on(trashFileAsset.uri, false, async (changeData) => { helper.registerChange(trashFileAsset.uri, false, async (changeData) => {
count++; count++;
console.info(`off_005 changeData: ${JSON.stringify(changeData)}`); console.info(`off_005 changeData: ${JSON.stringify(changeData)}`);
expect(false).assertTrue(); expect(false).assertTrue();
done(); done();
}); });
await sleep(100); await sleep(100);
helper.off(trashFileAsset.uri); helper.unRegisterChange(trashFileAsset.uri);
await sleep(100); await sleep(100);
await trashAlbum.recoverAssets([trashFileAsset]); await trashAlbum.recoverAssets([trashFileAsset]);
await sleep(2000); await sleep(2000);
...@@ -457,12 +457,12 @@ export default function publicApiTestWithSystemApiTest () { ...@@ -457,12 +457,12 @@ export default function publicApiTestWithSystemApiTest () {
const trashFileAsset = await trashFetchResult.getFirstObject(); const trashFileAsset = await trashFetchResult.getFirstObject();
let count= 0; let count= 0;
await sleep(500); await sleep(500);
helper.on(trashAlbum.albumUri, false, async (changeData) => { helper.registerChange(trashAlbum.albumUri, false, async (changeData) => {
count++; count++;
console.info(`off_006 changeData: ${JSON.stringify(changeData)}`); console.info(`off_006 changeData: ${JSON.stringify(changeData)}`);
}); });
await sleep(100); await sleep(100);
helper.off(trashAlbum.albumUri); helper.unRegisterChange(trashAlbum.albumUri);
await sleep(100); await sleep(100);
await trashAlbum.deleteAssets([trashFileAsset]); await trashAlbum.deleteAssets([trashFileAsset]);
await sleep(1000); await sleep(1000);
...@@ -489,12 +489,12 @@ export default function publicApiTestWithSystemApiTest () { ...@@ -489,12 +489,12 @@ export default function publicApiTestWithSystemApiTest () {
let albumName = 'testAlbum' + Date.now(); let albumName = 'testAlbum' + Date.now();
let album = await helper.createAlbum(albumName); let album = await helper.createAlbum(albumName);
await sleep(500); await sleep(500);
helper.on(DEFAULT_ALBUM_URI, true, async (changeData) => { helper.registerChange(DEFAULT_ALBUM_URI, true, async (changeData) => {
count++; count++;
console.info(`off_009 changeData: ${JSON.stringify(changeData)}`); console.info(`off_009 changeData: ${JSON.stringify(changeData)}`);
}); });
await sleep(100); await sleep(100);
helper.off(DEFAULT_ALBUM_URI); helper.unRegisterChange(DEFAULT_ALBUM_URI);
await sleep(100); await sleep(100);
await helper.deleteAlbums([album]); await helper.deleteAlbums([album]);
await sleep(1000); await sleep(1000);
...@@ -527,12 +527,12 @@ export default function publicApiTestWithSystemApiTest () { ...@@ -527,12 +527,12 @@ export default function publicApiTestWithSystemApiTest () {
await helper.deleteAssets([fileAsset.uri]); await helper.deleteAssets([fileAsset.uri]);
await sleep(500); await sleep(500);
let listenCount = 0; let listenCount = 0;
helper.on(DEFAULT_ALBUM_URI, true, async (changeData) => { helper.registerChange(DEFAULT_ALBUM_URI, true, async (changeData) => {
listenCount++; listenCount++;
console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`); console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`);
}); });
await sleep(100); await sleep(100);
helper.off(DEFAULT_ALBUM_URI); helper.unRegisterChange(DEFAULT_ALBUM_URI);
await sleep(100); await sleep(100);
// 1 // 1
let albumName = 'testAlbum' + Date.now(); let albumName = 'testAlbum' + Date.now();
...@@ -581,12 +581,12 @@ export default function publicApiTestWithSystemApiTest () { ...@@ -581,12 +581,12 @@ export default function publicApiTestWithSystemApiTest () {
let listenCount = 0; let listenCount = 0;
let fetchOps = photoFetchOption(testNum, photoKeys.DISPLAY_NAME, 'off14.jpg'); let fetchOps = photoFetchOption(testNum, photoKeys.DISPLAY_NAME, 'off14.jpg');
const asset = await getFileAsset(testNum, fetchOps); const asset = await getFileAsset(testNum, fetchOps);
helper.on(DEFAULT_PHOTO_URI, true, async (changeData) => { helper.registerChange(DEFAULT_PHOTO_URI, true, async (changeData) => {
listenCount++; listenCount++;
console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`); console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`);
}); });
await sleep(100); await sleep(100);
helper.off(DEFAULT_PHOTO_URI); helper.unRegisterChange(DEFAULT_PHOTO_URI);
await sleep(100); await sleep(100);
// 1 // 1
let fd = await asset.open('rw'); let fd = await asset.open('rw');
...@@ -639,7 +639,7 @@ export default function publicApiTestWithSystemApiTest () { ...@@ -639,7 +639,7 @@ export default function publicApiTestWithSystemApiTest () {
await createAsset.close(fd); await createAsset.close(fd);
let count = 0; let count = 0;
await sleep(500); await sleep(500);
helper.on(createAsset.uri, false, async (changeData) => { helper.registerChange(createAsset.uri, false, async (changeData) => {
count++; count++;
console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`); console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`);
expect(changeData.type).assertEqual(NOTIFY_ADD); expect(changeData.type).assertEqual(NOTIFY_ADD);
...@@ -649,7 +649,7 @@ export default function publicApiTestWithSystemApiTest () { ...@@ -649,7 +649,7 @@ export default function publicApiTestWithSystemApiTest () {
fd = await createAsset.getReadOnlyFd(); fd = await createAsset.getReadOnlyFd();
await createAsset.close(fd); await createAsset.close(fd);
await sleep(1000); await sleep(1000);
helper.off(createAsset.uri); helper.unRegisterChange(createAsset.uri);
expect(count).assertEqual(0); expect(count).assertEqual(0);
done(); done();
} catch (error) { } catch (error) {
...@@ -674,7 +674,7 @@ export default function publicApiTestWithSystemApiTest () { ...@@ -674,7 +674,7 @@ export default function publicApiTestWithSystemApiTest () {
const asset = await getFileAsset(testNum, fetchOps); const asset = await getFileAsset(testNum, fetchOps);
let count= 0; let count= 0;
await sleep(500); await sleep(500);
helper.on(asset.uri, false, async (changeData) => { helper.registerChange(asset.uri, false, async (changeData) => {
count++; count++;
console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`); console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`);
expect(changeData.type).assertEqual(NOTIFY_UPDATE); expect(changeData.type).assertEqual(NOTIFY_UPDATE);
...@@ -682,7 +682,7 @@ export default function publicApiTestWithSystemApiTest () { ...@@ -682,7 +682,7 @@ export default function publicApiTestWithSystemApiTest () {
}); });
await asset.setFavorite(true); await asset.setFavorite(true);
await sleep(1000); await sleep(1000);
helper.off(asset.uri); helper.unRegisterChange(asset.uri);
expect(count).assertEqual(1); expect(count).assertEqual(1);
done(); done();
} catch (error) { } catch (error) {
...@@ -708,7 +708,7 @@ export default function publicApiTestWithSystemApiTest () { ...@@ -708,7 +708,7 @@ export default function publicApiTestWithSystemApiTest () {
await asset.setFavorite(true); await asset.setFavorite(true);
let count= 0; let count= 0;
await sleep(500); await sleep(500);
helper.on(asset.uri, false, async (changeData) => { helper.registerChange(asset.uri, false, async (changeData) => {
count++; count++;
console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`); console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`);
expect(changeData.type).assertEqual(NOTIFY_UPDATE); expect(changeData.type).assertEqual(NOTIFY_UPDATE);
...@@ -716,7 +716,7 @@ export default function publicApiTestWithSystemApiTest () { ...@@ -716,7 +716,7 @@ export default function publicApiTestWithSystemApiTest () {
}); });
await asset.setFavorite(false); await asset.setFavorite(false);
await sleep(1000); await sleep(1000);
helper.off(asset.uri); helper.unRegisterChange(asset.uri);
expect(count).assertEqual(1); expect(count).assertEqual(1);
done(); done();
} catch (error) { } catch (error) {
...@@ -749,7 +749,7 @@ export default function publicApiTestWithSystemApiTest () { ...@@ -749,7 +749,7 @@ export default function publicApiTestWithSystemApiTest () {
const trashFileAsset = await trashFetchResult.getFirstObject(); const trashFileAsset = await trashFetchResult.getFirstObject();
let count= 0; let count= 0;
await sleep(500); await sleep(500);
helper.on(trashFileAsset.uri, false, async (changeData) => { helper.registerChange(trashFileAsset.uri, false, async (changeData) => {
count++; count++;
console.info(`on_callback_005 changeData: ${JSON.stringify(changeData)}`); console.info(`on_callback_005 changeData: ${JSON.stringify(changeData)}`);
expect(changeData.type).assertEqual(NOTIFY_ADD); expect(changeData.type).assertEqual(NOTIFY_ADD);
...@@ -757,7 +757,7 @@ export default function publicApiTestWithSystemApiTest () { ...@@ -757,7 +757,7 @@ export default function publicApiTestWithSystemApiTest () {
}); });
await trashAlbum.recoverAssets([trashFileAsset]); await trashAlbum.recoverAssets([trashFileAsset]);
await sleep(2000); await sleep(2000);
helper.off(trashFileAsset.uri); helper.unRegisterChange(trashFileAsset.uri);
expect(count).assertEqual(1); expect(count).assertEqual(1);
done(); done();
} catch (error) { } catch (error) {
...@@ -790,15 +790,15 @@ export default function publicApiTestWithSystemApiTest () { ...@@ -790,15 +790,15 @@ export default function publicApiTestWithSystemApiTest () {
const trashFileAsset = await trashFetchResult.getFirstObject(); const trashFileAsset = await trashFetchResult.getFirstObject();
let count= 0; let count= 0;
await sleep(500); await sleep(500);
helper.on(trashAlbum.albumUri, false, async (changeData) => { helper.registerChange(trashAlbum.albumUri, false, async (changeData) => {
count++; count++;
console.info(`on_callback_006 changeData: ${JSON.stringify(changeData)}`); console.info(`on_callback_006 changeData: ${JSON.stringify(changeData)}`);
expect(changeData.type).assertEqual(NOTIFY_ALBUM_REMOVE_ASSET); expect(changeData.type).assertEqual(NOTIFY_ALBUM_REMOVE_ASSET);
// expect(changeData.extraUris[0]).assertEqual(trashFileAsset.uri); expect(changeData.extraUris[0]).assertEqual(trashFileAsset.uri);
}); });
await trashAlbum.deleteAssets([trashFileAsset]); await trashAlbum.deleteAssets([trashFileAsset]);
await sleep(1000); await sleep(1000);
helper.off(trashAlbum.albumUri); helper.unRegisterChange(trashAlbum.albumUri);
expect(count).assertEqual(1); expect(count).assertEqual(1);
done(); done();
} catch (error) { } catch (error) {
...@@ -824,7 +824,7 @@ export default function publicApiTestWithSystemApiTest () { ...@@ -824,7 +824,7 @@ export default function publicApiTestWithSystemApiTest () {
let album = await helper.createAlbum(albumName); let album = await helper.createAlbum(albumName);
albumUri = album.albumUri; albumUri = album.albumUri;
await sleep(500); await sleep(500);
helper.on(DEFAULT_ALBUM_URI, true, async (changeData) => { helper.registerChange(DEFAULT_ALBUM_URI, true, async (changeData) => {
listenCount++; listenCount++;
if (listenCount < 2) { if (listenCount < 2) {
console.info(`on_callback_009 changeData: ${JSON.stringify(changeData)}`); console.info(`on_callback_009 changeData: ${JSON.stringify(changeData)}`);
...@@ -836,7 +836,7 @@ export default function publicApiTestWithSystemApiTest () { ...@@ -836,7 +836,7 @@ export default function publicApiTestWithSystemApiTest () {
await helper.deleteAlbums([album]); await helper.deleteAlbums([album]);
await sleep(1000); await sleep(1000);
expect(listenCount).assertEqual(1); expect(listenCount).assertEqual(1);
helper.off(DEFAULT_ALBUM_URI); helper.unRegisterChange(DEFAULT_ALBUM_URI);
done(); done();
} catch (error) { } catch (error) {
console.log(`on_callback_009: tryError: $${error}`); console.log(`on_callback_009: tryError: $${error}`);
...@@ -860,7 +860,7 @@ export default function publicApiTestWithSystemApiTest () { ...@@ -860,7 +860,7 @@ export default function publicApiTestWithSystemApiTest () {
const fetchOps = photoFetchOption(testNum, photoKeys.DISPLAY_NAME, 'on14.jpg'); const fetchOps = photoFetchOption(testNum, photoKeys.DISPLAY_NAME, 'on14.jpg');
const asset = await getFileAsset(testNum, fetchOps); const asset = await getFileAsset(testNum, fetchOps);
let photoAssetUri = asset.uri; let photoAssetUri = asset.uri;
helper.on(DEFAULT_PHOTO_URI, true, async (changeData) => { helper.registerChange(DEFAULT_PHOTO_URI, true, async (changeData) => {
listenCount++; listenCount++;
switch (listenCount) { switch (listenCount) {
case 1: case 1:
...@@ -894,7 +894,7 @@ export default function publicApiTestWithSystemApiTest () { ...@@ -894,7 +894,7 @@ export default function publicApiTestWithSystemApiTest () {
await sleep(500); await sleep(500);
await asset.setFavorite(false); await asset.setFavorite(false);
await sleep(1000); await sleep(1000);
helper.off(DEFAULT_PHOTO_URI); helper.unRegisterChange(DEFAULT_PHOTO_URI);
expect(listenCount).assertEqual(3); expect(listenCount).assertEqual(3);
done(); done();
} catch (error) { } catch (error) {
...@@ -921,7 +921,7 @@ export default function publicApiTestWithSystemApiTest () { ...@@ -921,7 +921,7 @@ export default function publicApiTestWithSystemApiTest () {
await asset.close(fd); await asset.close(fd);
let listenCount = 0; let listenCount = 0;
await sleep(500); await sleep(500);
helper.on(asset.uri, false, async (changeData) => { helper.registerChange(asset.uri, false, async (changeData) => {
listenCount++; listenCount++;
console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`); console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`);
expect(changeData.type).assertEqual(NOTIFY_UPDATE); expect(changeData.type).assertEqual(NOTIFY_UPDATE);
...@@ -936,7 +936,7 @@ export default function publicApiTestWithSystemApiTest () { ...@@ -936,7 +936,7 @@ export default function publicApiTestWithSystemApiTest () {
await sleep(500); await sleep(500);
} }
await sleep(2000); await sleep(2000);
helper.off(asset.uri); helper.unRegisterChange(asset.uri);
expect(listenCount).assertEqual(10); expect(listenCount).assertEqual(10);
done(); done();
} catch (error) { } catch (error) {
...@@ -965,7 +965,7 @@ export default function publicApiTestWithSystemApiTest () { ...@@ -965,7 +965,7 @@ export default function publicApiTestWithSystemApiTest () {
await fileAsset.close(fd); await fileAsset.close(fd);
let count= 0; let count= 0;
await sleep(1000); await sleep(1000);
helper.on(fileAsset.uri, false, async (changeData) => { helper.registerChange(fileAsset.uri, false, async (changeData) => {
count++; count++;
console.info(`on_callback_017 changeData: ${JSON.stringify(changeData)}`); console.info(`on_callback_017 changeData: ${JSON.stringify(changeData)}`);
expect(changeData.type).assertEqual(NOTIFY_UPDATE); expect(changeData.type).assertEqual(NOTIFY_UPDATE);
...@@ -979,7 +979,7 @@ export default function publicApiTestWithSystemApiTest () { ...@@ -979,7 +979,7 @@ export default function publicApiTestWithSystemApiTest () {
await fileAsset.close(fd); await fileAsset.close(fd);
await sleep(1000); await sleep(1000);
expect(count).assertEqual(1); expect(count).assertEqual(1);
helper.off(fileAsset.uri); helper.unRegisterChange(fileAsset.uri);
done(); done();
} catch (error) { } catch (error) {
console.log(`on_callback_017: tryError: $${error}`); console.log(`on_callback_017: tryError: $${error}`);
......
...@@ -14,15 +14,15 @@ ...@@ -14,15 +14,15 @@
}, },
{ {
"name": "form_description", "name": "form_description",
"value": "photoAccess" "value": "photoAccessSystem"
}, },
{ {
"name": "serviceability_description", "name": "serviceability_description",
"value": "photoAccess" "value": "photoAccessSystem"
}, },
{ {
"name": "description_application", "name": "description_application",
"value": "photoAccess test" "value": "photoAccessSystem test"
}, },
{ {
"name": "app_name", "name": "app_name",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册