mirror of
https://gitee.com/openharmony/applications_app_samples
synced 2024-11-24 00:50:03 +00:00
modify testcase
Signed-off-by: zhaojunxia <zhaojunxia@kaihong.com>
This commit is contained in:
parent
b23aa97591
commit
bb43396cd5
@ -186,7 +186,7 @@ struct Index {
|
||||
this.selectedFilesInfos.pop();
|
||||
}
|
||||
this.selectedFilesInfos = [];
|
||||
logger.info(TAG, 'selectText: ' + this.text)
|
||||
logger.info(TAG, 'selectText: ' + this.text);
|
||||
for (let i = 0; i < this.fileNames.length; i++) {
|
||||
let fileName = this.fileNames[i];
|
||||
let index = fileName.lastIndexOf('.');
|
||||
@ -345,7 +345,6 @@ struct Index {
|
||||
})
|
||||
.allowDrop([UTD.UniformDataType.PLAIN_TEXT, UTD.UniformDataType.FILE])
|
||||
.onDrop((dragEvent?: DragEvent) => {
|
||||
this.textContentTarget = '';
|
||||
logger.info(TAG, `textContentTarget onDrop this.textContentTarget:` + this.textContentTarget);
|
||||
this.getDataFromUdmf((dragEvent as DragEvent), (event: DragEvent) => {
|
||||
let records: Array<UDC.UnifiedRecord> = event.getData().getRecords();
|
||||
@ -380,7 +379,8 @@ struct Index {
|
||||
|
||||
saveAsFileContent(fileTestDirPathNew, plainText.textContent);
|
||||
this.UpdateSelectedFiles();
|
||||
this.textContentTarget = 'Content save as ' + 'new_' + name;
|
||||
plainText.textContent = 'Content save as ' + 'new_' + name;
|
||||
this.textContentTarget = plainText.textContent;
|
||||
logger.info(TAG, `textContentTarget onDrop this.textContentTarget:` + this.textContentTarget);
|
||||
}
|
||||
})
|
||||
@ -529,7 +529,7 @@ struct Index {
|
||||
this.backGroundColor = Color.Transparent;
|
||||
let data: UDC.PlainText = new UDC.PlainText();
|
||||
data.abstract = 'this is abstract';
|
||||
data.textContent = this.textContent; //'Content save as ' + 'new_'
|
||||
data.textContent = this.textContent;
|
||||
(event as DragEvent).setData(new UDC.UnifiedData(data));
|
||||
})
|
||||
.height('45%')
|
||||
|
@ -77,7 +77,7 @@ export default function abilityTest() {
|
||||
let textContent = await driver.findComponent(ON.id('textContent'));
|
||||
let inputString = await textContent.getText();
|
||||
logger.info(TAG, 'UDMF_Select_001 inputString: ' + inputString);
|
||||
//
|
||||
|
||||
expect(inputString.includes('test content 1 test content 2')).assertTrue();
|
||||
|
||||
await driver.assertComponentExist(ON.id('SelectTypeList'));
|
||||
@ -139,7 +139,6 @@ export default function abilityTest() {
|
||||
|
||||
await driver.assertComponentExist(ON.id('targetText'));
|
||||
let textTarget = await driver.findComponent(ON.id('targetText'));
|
||||
await textTarget.click();
|
||||
await driver.delayMs(500);
|
||||
|
||||
await driver.drag(100, 320, 430, 180);
|
||||
@ -169,7 +168,6 @@ export default function abilityTest() {
|
||||
let textTarget = await driver.findComponent(ON.id('targetText'));
|
||||
|
||||
logger.info(TAG, 'UDMF_Drag_002 bb');
|
||||
await textTarget.click();
|
||||
await driver.delayMs(500);
|
||||
|
||||
await driver.click(100, 320);
|
||||
|
Loading…
Reference in New Issue
Block a user