@sap/generator-fiori
Version:
Create an SAPUI5 application using SAP Fiori elements or a freestyle approach
49 lines (44 loc) • 2.75 kB
JavaScript
/******************************************************************************
* ╔═══════════════════════════════════════════════════════════════════════╗ *
* ║ ║ *
* ║ WARNING: AUTO-GENERATED FILE ║ *
* ║ ║ *
* ║ This file is automatically generated by SAP Fiori tools and is ║ *
* ║ overwritten when you run the OPA test generator again. ║ *
* ║ ║ *
* ║ To add your own custom tests: ║ *
* ║ - Create a new journey test file in this directory. ║ *
* ║ - Follow the same pattern as this file. ║ *
* ║ - Add the new file to the opaTests.qunit.js config file. ║ *
* ║ - Custom journey files are not overwritten. ║ *
* ║ ║ *
* ╚═══════════════════════════════════════════════════════════════════════╝ *
******************************************************************************/
sap.ui.define([
"sap/ui/test/opaQunit",
"./pages/JourneyRunner"
], function (opaTest, runner) {
"use strict";
function journey() {
QUnit.module("FPM journey");
opaTest("Start application", function (Given, When, Then) {
Given.iStartMyApp();
<%_ startPages.forEach(function(pageName) { %>
Then.onThe<%- pageName %>Generated.iSeeThisPage();
<%_ if (filterBarItems && filterBarItems.length > 0) { -%>
<%_ filterBarItems.forEach(function(item) { _%>
Then.onThe<%- pageName%>Generated.onFilterBar().iCheckFilterField("<%- item %>");
<%_ }); -%>
<%_ } -%>
<%_ if (tableColumns && Object.keys(tableColumns).length > 0) { _%>
Then.onThe<%- pageName %>Generated.onTable().iCheckColumns(<%- Object.keys(tableColumns).length %>, <%- JSON.stringify(tableColumns) %>);
<%_ } %>
<%_ }); -%>
});
opaTest("Teardown", function (Given, When, Then) {
// Cleanup
Given.iTearDownMyApp();
});
}
runner.run([journey]);
});