@sap_oss/wdio-qmate-service
Version:
[](https://api.reuse.software/info/github.com/SAP/wdio-qmate-service)[](http
46 lines (39 loc) • 1.4 kB
JavaScript
;
const {
handleCookiesConsent
} = require("../../../helper/utils");
describe("element - waitForAll", function () {
const selector = {
"elementProperties": {
"viewName": "sap.tnt.sample.NavigationList.V",
"metadata": "sap.tnt.NavigationListItem"
}
};
it("Preparation", async function () {
await common.navigation.navigateToUrl("https://sapui5.hana.ondemand.com/1.96.27/#/entity/sap.tnt.NavigationList/sample/sap.tnt.sample.NavigationList");
await handleCookiesConsent();
});
it("Execution", async function () {
await ui5.element.waitForAll(selector, 30000);
});
it("Verification", async function () {
await ui5.assertion.expectToBeVisible(selector);
});
});
describe("element - waitForAll - error case", function () {
const selector = {
"elementProperties": {
"viewName": "sap.tnt.sample.NavigationList.V",
"metadata": "sap.tnt.NavigationListItem",
"text": "No such element"
}
};
it("Preparation", async function () {
await common.navigation.navigateToUrl("https://sapui5.hana.ondemand.com/1.96.27/#/entity/sap.tnt.NavigationList/sample/sap.tnt.sample.NavigationList");
await handleCookiesConsent();
});
it("Execution and Verification", async function () {
await expect(ui5.element.waitForAll(selector, 4000))
.rejects.toThrow("Function 'waitForAll' failed with:");
});
});