提交 3eb2b782 编写于 作者: B bayanxing

code check

Signed-off-by: Nbayanxing <bayanxing@kaihong.com>
上级 907952ea
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="826b3f1a-35ec-44f5-a0fa-738bb4ba4c7b" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/arkui/ace_js_attribute_api/src/main/js/test/basicabilityapi.test.js" beforeDir="false" afterPath="$PROJECT_DIR$/arkui/ace_js_attribute_api/src/main/js/test/basicabilityapi.test.js" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="ProjectId" id="2DnUukPXey3C1GO4vnHmus2YbmX" />
<component name="ProjectLevelVcsManager">
<ConfirmationsSetting value="2" id="Add" />
</component>
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/arkui" />
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="C:\Users\Administrator\Desktop\xts824\xts_acts_0824\arkui" />
</key>
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
</project>
\ No newline at end of file
......@@ -55,55 +55,6 @@ describe('basicabilityapi', function () {
});
}
/**
* @tc.number SUB_ACE_BASICABILITY_JS_API_0100
* @tc.name testClearInterval
* @tc.desc Cancel the repetitive timing tasks previously set by setInterval.
*/
it('testClearInterval', 0, async function(done) {
console.info('testClearInterval START');
let res = 0;
let intervalID = -1;
let promise1 = new Promise((resolve, reject) => {
intervalID = setInterval(function () {
res++;
console.info('testClearInterval res = ' + res);
resolve();
}, 100);
});
let promise2 = new Promise((resolve, reject) => {
setTimeout(function () {
console.info('[clearInterval] start');
clearInterval(intervalID);
console.info('[clearInterval] end');
resolve();
}, 600);
});
Promise.all([promise1, promise2]).then(() => {
console.info('testClearInterval finally');
expect(5).assertEqual(res);
console.info('testClearInterval END');
done();
});
});
/**
* @tc.number SUB_ACE_BASICABILITY_JS_API_0200
* @tc.name testConsole
* @tc.desc Print a text message.
*/
it('testConsole', 0, function () {
console.info('testConsole START');
const versionCode = 1.1;
console.info('[console.info] versionCode: ' + versionCode);
console.debug('[console.debug] versionCode: ' + versionCode);
console.log('[console.log] versionCode: ' + versionCode);
console.warn('[console.warn] versionCode: ' + versionCode);
console.error('[console.error] versionCode: ' + versionCode);
expect(test).assertEqual('success');
console.info('testConsole END');
});
/**
* @tc.number SUB_ACE_BASICABILITY_JS_API_0300
* @tc.name testRouterPush
......@@ -343,55 +294,6 @@ describe('basicabilityapi', function () {
}, 500);
});
/**
* @tc.number SUB_ACE_BASICABILITY_JS_API_0900
* @tc.name testPromptShowToast
* @tc.desc Show text pop-up window.
*/
it('testPromptShowToast', 0, function () {
console.info('testPromptShowToast START');
const delay = 5000;
prompt.showToast({
message: 'message',
duration: delay,
});
expect(test).assertEqual('success');
console.info('[prompt.showToast] success');
console.info('testPromptShowToast END');
});
/**
* @tc.number SUB_ACE_BASICABILITY_JS_API_1000
* @tc.name testPromptDialog
* @tc.desc Display the dialog box in the page.
*/
it('testPromptDialog', 0, function () {
console.info('testPromptDialog START')
prompt.showDialog({
title: 'dialog showDialog test',
message: 'message of dialog',
buttons: [
{
text: 'OK',
color: '#0000ff',
index: 0
}
],
success: function (ret) {
console.info("[prompt.showDialog] ret.index " + ret.index);
expect(testResult).toBeTrue();
},
cancel: function () {
console.log('[prompt.showDialog] dialog cancel callback');
expect(testResultFail).toBeTrue();
},
complete: function () {
console.log('[prompt.showDialog] complete');
}
});
console.info('testPromptDialog END');
});
/**
* @tc.number SUB_ACE_BASICABILITY_JS_API_1100
* @tc.name testConfigurationGetLocale
......@@ -433,29 +335,6 @@ describe('basicabilityapi', function () {
}, delay, 'test', 'message');
});
/**
* @tc.number SUB_ACE_BASICABILITY_JS_API_1300
* @tc.name testClearTimeout
* @tc.desc The timer previously established by calling setTimeout() is cancelled.
*/
it('testClearTimeout', 0, async function (done) {
console.info('testClearTimeout START');
let res = 0;
let timeoutID = setTimeout(function () {
res++;
}, 700);
await setTimeout(function () {
console.info('testClearTimeout delay 0.5s')
clearTimeout(timeoutID);
console.info("[clearTimeout] success");
}, 500);
await setTimeout(function () {
expect(0).assertEqual(res);
console.info('testClearTimeout END');
done();
}, 1000);
});
/**
* @tc.number SUB_ACE_BASICABILITY_JS_API_1400
* @tc.name testSetInterval
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册