63 lines
3.1 KiB
JavaScript
63 lines
3.1 KiB
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("IncidentsListListReport journey");
|
|
|
|
opaTest("Start application", function (Given, When, Then) {
|
|
Given.iStartMyApp();
|
|
|
|
Then.onTheIncidentsListGenerated.iSeeThisPage();
|
|
});
|
|
|
|
|
|
// Note: this test will only work if the ListReport page has a search field and shows data that matches the search term. Please ensure that the test data and search term are set up accordingly.
|
|
// opaTest("Perform a global search and check the result", function (Given, When, Then) {
|
|
// When.onTheIncidentsListGenerated.onFilterBar().iChangeSearchField("Search Term");
|
|
// When.onTheIncidentsListGenerated.onFilterBar().iExecuteSearch();
|
|
// Then.onTheIncidentsListGenerated.onTable().iCheckRows();
|
|
// });
|
|
|
|
|
|
|
|
|
|
opaTest("Navigate to ObjectPage", function (Given, When, Then) {
|
|
// Note: this test will fail if the ListReport page doesn't show any data
|
|
|
|
When.onTheIncidentsListGenerated.onFilterBar().iExecuteSearch();
|
|
|
|
Then.onTheIncidentsListGenerated.onTable().iCheckRows();
|
|
|
|
When.onTheIncidentsListGenerated.onTable().iPressRow(0);
|
|
Then.onTheIncidentsObjectPageGenerated.iSeeThisPage();
|
|
|
|
});
|
|
|
|
opaTest("Teardown", function (Given, When, Then) {
|
|
// Cleanup
|
|
Given.iTearDownMyApp();
|
|
});
|
|
}
|
|
|
|
runner.run([journey]);
|
|
}); |