@sap/generator-fiori
Version:
Create an SAPUI5 application using SAP Fiori elements or a freestyle approach
35 lines (31 loc) • 1.08 kB
JavaScript
sap.ui.define([
"sap/ui/test/opaQunit",
"./pages/JourneyRunner"
], function (opaTest, runner) {
"use strict";
function journey() {
QUnit.module("First journey");
opaTest("Start application", function (Given, When, Then) {
Given.iStartMyApp();
<% if (startLR) { %>Then.onThe<%- startLR %>.iSeeThisPage();<%} %>
});
<% if (startLR) { %>
opaTest("Navigate to ObjectPage", function (Given, When, Then) {
// Note: this test will fail if the ListReport page doesn't show any data
<% if (!hideFilterBar) { %>
When.onThe<%- startLR%>.onFilterBar().iExecuteSearch();
<%} %>
Then.onThe<%- startLR%>.onTable().iCheckRows();
<% if (navigatedOP) { %>
When.onThe<%- startLR%>.onTable().iPressRow(0);
Then.onThe<%- navigatedOP%>.iSeeThisPage();
<%} %>
});
<%} %>
opaTest("Teardown", function (Given, When, Then) {
// Cleanup
Given.iTearDownMyApp();
});
}
runner.run([journey]);
});