From 5167021f5ff6595558a67018cb7696b24f9ff5cb Mon Sep 17 00:00:00 2001 From: chen828 Date: Wed, 6 Aug 2025 08:23:07 +0000 Subject: [PATCH 1/3] update api/@ohos.UiTest.d.ts. Signed-off-by: chen828 --- api/@ohos.UiTest.d.ts | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/api/@ohos.UiTest.d.ts b/api/@ohos.UiTest.d.ts index 5d8b1069b0..82074565f3 100755 --- a/api/@ohos.UiTest.d.ts +++ b/api/@ohos.UiTest.d.ts @@ -1540,9 +1540,8 @@ declare interface UIEventObserver { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.Test.UiTest * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} + * @since 11 * @test - * @arkts 1.1&1.2 */ once(type: 'toastShow', callback: Callback): void; @@ -1564,11 +1563,39 @@ declare interface UIEventObserver { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.Test.UiTest * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} + * @since 11 * @test - * @arkts 1.1&1.2 */ once(type: 'dialogShow', callback: Callback): void; + + overload once { onceToastShow, onceDialogShow }; + /** + * Listen for toast show once + * + * @param { 'toastShow' } type -'toastShow'. + * @param { Callback } callback - function, returns the monitored UIElementInfo. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Test.UiTest + * @atomicservice + * @since 20 + * @test + * @arkts 1.2 + */ + onceToastShow(type: 'toastShow', callback: Callback): void; + + /** + * Listen for dialog show once + * + * @param { 'dialogShow' } type - 'dialogShow'. + * @param { Callback } callback - function, returns the monitored UIElementInfo. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.Test.UiTest + * @atomicservice + * @since 20 + * @test + * @arkts 1.2 + */ + onceDialogShow(type: 'dialogShow', callback: Callback): void; } /** -- Gitee From 26f626dd71e349735244c3d27ffd6d20c5b3aabd Mon Sep 17 00:00:00 2001 From: chen828 Date: Wed, 6 Aug 2025 09:20:48 +0000 Subject: [PATCH 2/3] update api/@ohos.UiTest.d.ts. Signed-off-by: chen828 --- api/@ohos.UiTest.d.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/@ohos.UiTest.d.ts b/api/@ohos.UiTest.d.ts index 82074565f3..918834a03e 100755 --- a/api/@ohos.UiTest.d.ts +++ b/api/@ohos.UiTest.d.ts @@ -1568,6 +1568,9 @@ declare interface UIEventObserver { */ once(type: 'dialogShow', callback: Callback): void; + /** + * @arkts 1.2 + */ overload once { onceToastShow, onceDialogShow }; /** * Listen for toast show once -- Gitee From 7c58ef2ab175ced9789382e20bd707dae3ccb302 Mon Sep 17 00:00:00 2001 From: chen828 Date: Wed, 6 Aug 2025 09:21:45 +0000 Subject: [PATCH 3/3] update api/@ohos.UiTest.d.ts. Signed-off-by: chen828 --- api/@ohos.UiTest.d.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/api/@ohos.UiTest.d.ts b/api/@ohos.UiTest.d.ts index 918834a03e..6c9d35fd9c 100755 --- a/api/@ohos.UiTest.d.ts +++ b/api/@ohos.UiTest.d.ts @@ -1579,7 +1579,6 @@ declare interface UIEventObserver { * @param { Callback } callback - function, returns the monitored UIElementInfo. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.Test.UiTest - * @atomicservice * @since 20 * @test * @arkts 1.2 @@ -1593,7 +1592,6 @@ declare interface UIEventObserver { * @param { Callback } callback - function, returns the monitored UIElementInfo. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.Test.UiTest - * @atomicservice * @since 20 * @test * @arkts 1.2 -- Gitee