@sap_oss/wdio-qmate-service
Version:
[](https://api.reuse.software/info/github.com/SAP/wdio-qmate-service)[](http
110 lines (109 loc) • 7.11 kB
TypeScript
/**
* @class navigation
* @memberof ui5
*/
export declare class Navigation {
private vlf;
private ErrorHandler;
errorText: string;
/**
* @function navigateToApplication
* @memberOf ui5.navigation
* @description Navigates to the application via the passed intent. The intent will be added to the baseUrl maintained in the config.
* @param {String} intent - The intent of the application.
* @param {Boolean} [preventPopups=false] - Specifies if random popup appearance should be prevented.
* @param {Boolean} [verify=false] - Specifies if the url should be asserted after the navigation.
* @param {Boolean} [refresh=false] - Refresh the page after navigation.
* @example await ui5.navigation.navigateToApplication("PurchaseOrder-manage");
*/
navigateToApplication(intent: string, preventPopups?: boolean, verify?: boolean, refresh?: boolean): Promise<void>;
/**
* @function navigateToApplicationAndRetry
* @memberOf ui5.navigation
* @description Navigates to the application via the passed intent, and retries in case it fails.
* @param {String} intent - The intent of the app.
* @param {Boolean} [preventPopups=false] - Specifies if random popup appearance should be prevented. Might not work for specific popups.
* @param {Boolean} [verify=false] - Specifies if the url should be asserted after the navigation.
* @param {Number} [retries=3] - The number of retries, can be set in config for all functions under params stepsRetries.
* @param {Number} [interval=5000] - The delay between the retries (ms). Can be set in config for all functions under params.stepRetriesIntervals.
* @example await ui5.navigation.navigateToApplicationAndRetry("PurchaseOrder-manage");
*/
navigateToApplicationAndRetry(intent: string, preventPopups?: boolean, verify?: boolean, retries?: number, interval?: number): Promise<void>;
/**
* @function navigateToSystemAndApplication
* @memberOf ui5.navigation
* @description Navigates within the passed system to the application via the passed intent.
* @param {String} system - The system url.
* @param {String} intent - The intent of the application.
* @param {Boolean} [closePopups=false] - Specifies if random popups should be closed after the navigation.
* @param {Boolean} [verify=false] - Specifies if the url should be asserted after the navigation.
* @example await ui5.navigation.navigateToSystemAndApplication("yourFioriLaunchpad.domain", "PurchaseOrder-manage");
*/
navigateToSystemAndApplication(system: string, intent: string, closePopups?: boolean, verify?: boolean): Promise<void>;
/**
* @function navigateToSystemAndApplicationAndRetry
* @memberOf ui5.navigation
* @description Navigates within the passed system to the application via the passed intent, and retries in case it fails.
* @param {String} system - The system url.
* @param {String} intent - The intent of the application.
* @param {Boolean} [closePopups=false] - Specifies if random popups should be closed after the navigation.
* @param {Boolean} [verify=false] - Specifies if the url should be asserted after the navigation.
* @param {Number} [retries=3] - The number of retries, can be set in config for all functions under params stepsRetries.
* @param {Number} [interval=5000] - The delay between the retries (ms). Can be set in config for all functions under params.stepRetriesIntervals.
* @example await ui5.navigation.navigateToSystemAndApplicationAndRetry("yourFioriLaunchpad.domain", "PurchaseOrder-manage");
*/
navigateToSystemAndApplicationAndRetry(system: string, intent: string, closePopups?: boolean, verify?: boolean, retries?: number, interval?: number): Promise<void>;
/**
* @function navigateToApplicationWithQueryParams
* @memberOf ui5.navigation
* @description Navigates to the application with the passed queryParams via the passed intent.
* @param {String} intent - The intent of the app.
* @param {String} queryParams - [OPTIONAL] Add url query params.
* @param {Boolean} [preventPopups=false] - Specifies if random popup appearance should be prevented.
* @param {Boolean} [verify=false] - Specifies if the url should be asserted after the navigation.
* @example const intent = "PurchaseOrder-manage"
* const queryParams = "?sap-language=EN&responderOn=true";
* await ui5.navigation.navigateToApplicationWithQueryParams(intent, queryParams);
*/
navigateToApplicationWithQueryParams(intent: string, queryParams?: string, closePopups?: boolean, verify?: boolean): Promise<void>;
/**
* @function navigateToApplicationWithQueryParamsAndRetry
* @memberOf ui5.navigation
* @description Navigates to the application via the passed intent, and retries in case it fails.
* @param {String} intent - The intent of the app.
* @param {String} queryParams - [OPTIONAL] Add url query params.
* @param {Boolean} [preventPopups=false] - Specifies if random popup appearance should be prevented.
* @param {Boolean} [verify=false] - Specifies if the url should be asserted after the navigation.
* @param {Number} [retries=3] - The number of retries, can be set in config for all functions under params stepsRetries.
* @param {Number} [interval=5000] - The delay between the retries (ms). Can be set in config for all functions under params.stepRetriesIntervals.
* @example const intent = "PurchaseOrder-manage"
* const queryParams = "?sap-language=EN&responderOn=true";
* await ui5.navigation.navigateToApplicationWithQueryParamsAndRetry(intent, queryParams);
*/
navigateToApplicationWithQueryParamsAndRetry(intent: string, queryParams: string, closePopups?: boolean, verify?: boolean, retries?: number, interval?: number): Promise<void>;
/**
* @function closePopups
* @memberOf ui5.navigation
* @description Closes all popups if they occur after navigating to a specific page.
* @param {Number} [timeout=30000] - The timeout to wait.
* @example await ui5.navigation.closePopups();
*/
closePopups(timeout?: number): Promise<void[]>;
/**
* @function expectUnsupportedNavigationPopup
* @memberOf ui5.navigation
* @description Expects navigation to an app that is not supported.
* This can be the case for Mocked tests when the application does not exist or when the app is not included in a role.
* @param {String} navigationTarget - The selector describing the element.
* @example await ui5.navigation.expectUnsupportedNavigationPopup("#SupplierInvoice-display?FiscalYear=1234&SupplierInvoice=1234567890");
*/
expectUnsupportedNavigationPopup(navigationTarget: string): Promise<void>;
private _extractQueryParams;
private _normalizeQueryString;
private _constructUrlParams;
private _getPreventPopupParams;
private _mapQueryParams;
private _closePopup;
}
declare const _default: Navigation;
export default _default;