FIORI App gegenereerd
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
/******************************************************************************
|
||||
* ╔═══════════════════════════════════════════════════════════════════════╗ *
|
||||
* ║ ║ *
|
||||
* ║ 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]);
|
||||
});
|
||||
@@ -0,0 +1,46 @@
|
||||
/******************************************************************************
|
||||
* ╔═══════════════════════════════════════════════════════════════════════╗ *
|
||||
* ║ ║ *
|
||||
* ║ 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("IncidentsObjectPageObjectPage journey");
|
||||
|
||||
opaTest("Navigate to IncidentsObjectPageObjectPage", function (Given, When, Then) {
|
||||
Given.iStartMyApp();
|
||||
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]);
|
||||
});
|
||||
@@ -0,0 +1,34 @@
|
||||
/******************************************************************************
|
||||
* ╔═══════════════════════════════════════════════════════════════════════╗ *
|
||||
* ║ ║ *
|
||||
* ║ 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 pages: ║ *
|
||||
* ║ - Create a new page file in this directory. ║ *
|
||||
* ║ - Follow the same pattern as this file. ║ *
|
||||
* ║ - Add the new file to the JourneyRunner. ║ *
|
||||
* ║ - Custom page files are not overwritten. ║ *
|
||||
* ║ ║ *
|
||||
* ╚═══════════════════════════════════════════════════════════════════════╝ *
|
||||
******************************************************************************/
|
||||
|
||||
sap.ui.define(['sap/fe/test/ListReport'], function(ListReport) {
|
||||
'use strict';
|
||||
|
||||
const CustomPageDefinitions = {
|
||||
actions: {},
|
||||
assertions: {}
|
||||
};
|
||||
|
||||
return new ListReport(
|
||||
{
|
||||
appId: 'ns.incidents',
|
||||
componentId: 'IncidentsList',
|
||||
contextPath: '/Incidents'
|
||||
},
|
||||
CustomPageDefinitions
|
||||
);
|
||||
});
|
||||
@@ -0,0 +1,41 @@
|
||||
/******************************************************************************
|
||||
* ╔═══════════════════════════════════════════════════════════════════════╗ *
|
||||
* ║ ║ *
|
||||
* ║ 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 pages: ║ *
|
||||
* ║ - Create a new page file in this directory. ║ *
|
||||
* ║ - Follow the same pattern as this file. ║ *
|
||||
* ║ - Add the new file to the JourneyRunner. ║ *
|
||||
* ║ - Custom page files are not overwritten. ║ *
|
||||
* ║ ║ *
|
||||
* ╚═══════════════════════════════════════════════════════════════════════╝ *
|
||||
******************************************************************************/
|
||||
|
||||
sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) {
|
||||
'use strict';
|
||||
|
||||
const CustomPageDefinitions = {
|
||||
actions: {
|
||||
iPressSectionIconTabFilterButton: function (section) {
|
||||
return this.waitFor({
|
||||
id: new RegExp(`.*--fe::FacetSection::${section}-anchor$`),
|
||||
actions: new Press()
|
||||
});
|
||||
}
|
||||
},
|
||||
assertions: {}
|
||||
};
|
||||
|
||||
return new ObjectPage(
|
||||
{
|
||||
appId: 'ns.incidents',
|
||||
componentId: 'IncidentsObjectPage',
|
||||
contextPath: '/Incidents'
|
||||
},
|
||||
CustomPageDefinitions
|
||||
);
|
||||
});
|
||||
19
app/incidents/webapp/test/integration/pages/JourneyRunner.js
Normal file
19
app/incidents/webapp/test/integration/pages/JourneyRunner.js
Normal file
@@ -0,0 +1,19 @@
|
||||
sap.ui.define([
|
||||
"sap/fe/test/JourneyRunner",
|
||||
"ns/incidents/test/integration/pages/IncidentsList.gen",
|
||||
"ns/incidents/test/integration/pages/IncidentsObjectPage.gen"
|
||||
], function (JourneyRunner, IncidentsListGenerated, IncidentsObjectPageGenerated) {
|
||||
'use strict';
|
||||
|
||||
const runner = new JourneyRunner({
|
||||
launchUrl: sap.ui.require.toUrl('ns/incidents') + '/test/flp.html#app-preview',
|
||||
pages: {
|
||||
onTheIncidentsListGenerated: IncidentsListGenerated,
|
||||
onTheIncidentsObjectPageGenerated: IncidentsObjectPageGenerated
|
||||
},
|
||||
async: true
|
||||
});
|
||||
|
||||
return runner;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user