forked from floraachy/ImageKnife
!32 1.XTS整改 2.维护页面用例demo整改
Merge pull request !32 from zhoulisheng1/master
This commit is contained in:
commit
b16da28c48
|
@ -22,7 +22,8 @@ struct basicTestFileIOPage {
|
||||||
@State filePath: string = '查看featureAbility路径';
|
@State filePath: string = '查看featureAbility路径';
|
||||||
appFilePath = '';
|
appFilePath = '';
|
||||||
appCachePath = '';
|
appCachePath = '';
|
||||||
@State imageFile: string = ''
|
@State imageHint: string = ''
|
||||||
|
@State imageFile: string = '文字提醒'
|
||||||
@State imageRes: Resource = $r('app.media.pngSample')
|
@State imageRes: Resource = $r('app.media.pngSample')
|
||||||
@State imagePixelMap: PixelMap = undefined
|
@State imagePixelMap: PixelMap = undefined
|
||||||
@State normalPixelMap: boolean = false;
|
@State normalPixelMap: boolean = false;
|
||||||
|
@ -56,9 +57,14 @@ struct basicTestFileIOPage {
|
||||||
this.appFilePath = data;
|
this.appFilePath = data;
|
||||||
|
|
||||||
})
|
})
|
||||||
|
Text(this.imageHint)
|
||||||
Button('files目录创建Folder1和Folder2 验证statSync mkdirSync')
|
Button('files目录创建Folder1和Folder2 验证statSync mkdirSync')
|
||||||
.margin({ top: 10 })
|
.margin({ top: 10 })
|
||||||
.onClick(() => {
|
.onClick(() => {
|
||||||
|
if(this.appFilePath == '' || this.appFilePath == null){
|
||||||
|
this.appFilePath = 'appFilePath未取到值,请按顺序从上往下,从左往右依次测试'
|
||||||
|
return
|
||||||
|
}
|
||||||
console.log('files目录创建Folder1和Folder2 验证statSync mkdirSync')
|
console.log('files目录创建Folder1和Folder2 验证statSync mkdirSync')
|
||||||
FileUtils.getInstance()
|
FileUtils.getInstance()
|
||||||
.createFolder(this.appFilePath + '/Folder1');
|
.createFolder(this.appFilePath + '/Folder1');
|
||||||
|
@ -69,6 +75,10 @@ struct basicTestFileIOPage {
|
||||||
.margin({ top: 10 })
|
.margin({ top: 10 })
|
||||||
.onClick(() => {
|
.onClick(() => {
|
||||||
console.log('将media资源存入Folder1 验证writeSync mkdirSync createStreamSync')
|
console.log('将media资源存入Folder1 验证writeSync mkdirSync createStreamSync')
|
||||||
|
if(this.appFilePath == '' || this.appFilePath == null){
|
||||||
|
this.appFilePath = 'appFilePath未取到值,请按顺序从上往下,从左往右依次测试'
|
||||||
|
return
|
||||||
|
}
|
||||||
globalThis.ImageKnife.getImageKnifeContext().resourceManager
|
globalThis.ImageKnife.getImageKnifeContext().resourceManager
|
||||||
.getMedia($r('app.media.gifSample').id)
|
.getMedia($r('app.media.gifSample').id)
|
||||||
.then(data => {
|
.then(data => {
|
||||||
|
@ -87,6 +97,10 @@ struct basicTestFileIOPage {
|
||||||
.margin({ top: 10 })
|
.margin({ top: 10 })
|
||||||
.onClick(() => {
|
.onClick(() => {
|
||||||
console.log('copy:Folder1至Folder2, 验证copyFileSync')
|
console.log('copy:Folder1至Folder2, 验证copyFileSync')
|
||||||
|
if(this.appFilePath == '' || this.appFilePath == null){
|
||||||
|
this.appFilePath = 'appFilePath未取到值,请按顺序从上往下,从左往右依次测试'
|
||||||
|
return
|
||||||
|
}
|
||||||
let filePath1 = this.appFilePath + '/Folder1/jpgSample.gif';
|
let filePath1 = this.appFilePath + '/Folder1/jpgSample.gif';
|
||||||
let filePath2 = this.appFilePath + '/Folder2/jpgSample.gif';
|
let filePath2 = this.appFilePath + '/Folder2/jpgSample.gif';
|
||||||
FileUtils.getInstance().createFolder(this.appFilePath + '/Folder1')
|
FileUtils.getInstance().createFolder(this.appFilePath + '/Folder1')
|
||||||
|
|
|
@ -40,7 +40,6 @@ export default function ImageKnifeTest() {
|
||||||
|
|
||||||
|
|
||||||
it('TestGlobalImageKnife',0, function () {
|
it('TestGlobalImageKnife',0, function () {
|
||||||
expect(globalThis.ImageKnife).assertEqual(undefined)
|
|
||||||
globalThis.ImageKnife = ImageKnife.with(getContext())
|
globalThis.ImageKnife = ImageKnife.with(getContext())
|
||||||
expect(globalThis.ImageKnife).not().assertUndefined()
|
expect(globalThis.ImageKnife).not().assertUndefined()
|
||||||
})
|
})
|
||||||
|
|
|
@ -58,17 +58,17 @@ export default function RequestOptionTest() {
|
||||||
let option = new RequestOption();
|
let option = new RequestOption();
|
||||||
expect(option.strategy.getName()).assertEqual('AUTOMATIC')
|
expect(option.strategy.getName()).assertEqual('AUTOMATIC')
|
||||||
|
|
||||||
expect(option.dontAnimateFlag).assertFail()
|
expect(option.dontAnimateFlag).assertFalse()
|
||||||
|
|
||||||
expect(option.onlyRetrieveFromCache).assertFail()
|
expect(option.onlyRetrieveFromCache).assertFalse()
|
||||||
|
|
||||||
expect(option.isCacheable).assertTrue()
|
expect(option.isCacheable).assertTrue()
|
||||||
|
|
||||||
expect(option.gpuEnabled).assertFail()
|
expect(option.gpuEnabled).assertFalse()
|
||||||
expect(option.loadMainReady).assertFail()
|
expect(option.loadMainReady).assertFalse()
|
||||||
expect(option.loadErrorReady).assertFail()
|
expect(option.loadErrorReady).assertFalse()
|
||||||
expect(option.loadRetryReady).assertFail()
|
expect(option.loadRetryReady).assertFalse()
|
||||||
expect(option.loadThumbnailReady).assertFail()
|
expect(option.loadThumbnailReady).assertFalse()
|
||||||
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -120,11 +120,7 @@ export default function Transform() {
|
||||||
+ ";mBottom_left:" + 5
|
+ ";mBottom_left:" + 5
|
||||||
+ ";mBottom_right:" + 5)
|
+ ";mBottom_right:" + 5)
|
||||||
})
|
})
|
||||||
it('TestRoundedCornersTransformation', 12, function () {
|
it('TestSepiaFilterTransformation', 12, function () {
|
||||||
let speia = new SepiaFilterTransformation();
|
|
||||||
expect(speia.getName()).assertContain("SepiaFilterTransformation")
|
|
||||||
})
|
|
||||||
it('TestSepiaFilterTransformation', 13, function () {
|
|
||||||
let speia = new SepiaFilterTransformation();
|
let speia = new SepiaFilterTransformation();
|
||||||
expect(speia.getName()).assertContain("SepiaFilterTransformation")
|
expect(speia.getName()).assertContain("SepiaFilterTransformation")
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue