提交 d6f8b06b 编写于 作者: G GuoxYu

【medialibrary】【3.1_Release】用例优化

Signed-off-by: NGuoxYu <guoxiaoyu19@huawei.com>
Change-Id: I74087de65b7914db4cb4db05e9df5ae1794613f4
上级 ff046980
......@@ -639,8 +639,8 @@ describe('fileAssetTestCallback.test.js', async function() {
try {
let fileType = mediaLibrary.MediaType.VIDEO;
let fileFetchOp = {
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND relative_path = ?',
selectionArgs : [ fileType.toString(), 'Camera/' ],
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND ' + mediaLibrary.FileKey.DISPLAY_NAME + ' = ?',
selectionArgs : [ fileType.toString(), '01.mp4' ],
};
let fetchFileResult = await media.getFileAssets(fileFetchOp);
const dataList = await fetchFileResult.getAllObject();
......@@ -708,8 +708,8 @@ describe('fileAssetTestCallback.test.js', async function() {
try {
let type = mediaLibrary.MediaType.VIDEO;
let fetchOp = {
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND relative_path = ?',
selectionArgs : [ type.toString(), 'Camera/' ],
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND ' + mediaLibrary.FileKey.DISPLAY_NAME + ' = ?',
selectionArgs : [ type.toString(), '01.mp4' ],
};
let fetchFileResult = await media.getFileAssets(fetchOp);
const dataList = await fetchFileResult.getAllObject();
......@@ -773,8 +773,8 @@ describe('fileAssetTestCallback.test.js', async function() {
try {
let type = mediaLibrary.MediaType.VIDEO;
let fetchOp = {
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND relative_path = ?',
selectionArgs : [ type.toString(), 'Camera/' ],
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND ' + mediaLibrary.FileKey.DISPLAY_NAME + ' = ?',
selectionArgs : [ type.toString(), '01.mp4' ],
};
let fetchFileResult = await media.getFileAssets(fetchOp);
const dataList = await fetchFileResult.getAllObject();
......
......@@ -458,8 +458,8 @@ describe('fileAssetTestPromise.test.js', async function() {
try {
let fileType = mediaLibrary.MediaType.VIDEO;
let fileFetchOp = {
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND relative_path = ?',
selectionArgs : [ fileType.toString(), 'Camera/' ],
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND ' + mediaLibrary.FileKey.DISPLAY_NAME + ' = ?',
selectionArgs : [ fileType.toString(), '01.mp4' ],
};
let fetchFileResult = await media.getFileAssets(fileFetchOp);
const dataList = await fetchFileResult.getAllObject();
......@@ -517,8 +517,8 @@ describe('fileAssetTestPromise.test.js', async function() {
try {
let type = mediaLibrary.MediaType.VIDEO;
let fetchOp = {
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND relative_path = ?',
selectionArgs : [ fileType.toString(), 'Camera/' ],
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND ' + mediaLibrary.FileKey.DISPLAY_NAME + ' = ?',
selectionArgs : [ type.toString(), '01.mp4' ],
};
let fetchFileResult = await media.getFileAssets(fetchOp);
const dataList = await fetchFileResult.getAllObject();
......@@ -561,8 +561,8 @@ describe('fileAssetTestPromise.test.js', async function() {
try {
let type = mediaLibrary.MediaType.VIDEO;
let fetchOp = {
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND relative_path = ?',
selectionArgs : [ fileType.toString(), 'Camera/' ],
selections : mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND ' + mediaLibrary.FileKey.DISPLAY_NAME + ' = ?',
selectionArgs : [ type.toString(), '01.mp4' ],
};
let fetchFileResult = await media.getFileAssets(fetchOp);
const dataList = await fetchFileResult.getAllObject();
......
......@@ -29,8 +29,8 @@ let imagesfetchOp = {
selectionArgs: [imageType.toString()],
};
let videosfetchOp = {
selections: mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND relative_path = ?',
selectionArgs: [videoType.toString(), 'Camera/'],
selections: mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND ' + mediaLibrary.FileKey.DISPLAY_NAME + ' = ?',
selectionArgs: [videoType.toString(), '01.mp4'],
};
let audiosfetchOp = {
selections: mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND bucket_display_name = ?',
......
......@@ -40,8 +40,8 @@ let imagesfetchOp = {
selectionArgs: [imageType.toString()],
};
let videosfetchOp = {
selections: mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND relative_path = ?',
selectionArgs: [videoType.toString(), 'Camera/'],
selections: mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND ' + mediaLibrary.FileKey.DISPLAY_NAME + ' = ?',
selectionArgs: [videoType.toString(), '01.mp4'],
};
let audiosfetchOp = {
selections: mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND bucket_display_name = ?',
......
......@@ -40,8 +40,8 @@ let imagesfetchOp = {
selectionArgs: [imageType.toString()],
};
let videosfetchOp = {
selections: mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND relative_path = ?',
selectionArgs: [videoType.toString(), 'Camera/'],
selections: mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND ' + mediaLibrary.FileKey.DISPLAY_NAME + ' = ?',
selectionArgs: [videoType.toString(), '01.mp4'],
};
let audiosfetchOp = {
selections: mediaLibrary.FileKey.MEDIA_TYPE + '= ? AND bucket_display_name = ?',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册