upload current sources
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
/******************************************************************************
|
||||
* ╔═══════════════════════════════════════════════════════════════════════╗ *
|
||||
* ║ ║ *
|
||||
* ║ 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. ║ *
|
||||
* ║ ║ *
|
||||
* ╚═══════════════════════════════════════════════════════════════════════╝ *
|
||||
******************************************************************************/
|
||||
|
||||
import opaTest from "sap/ui/test/opaQunit";
|
||||
import type { Given, When, Then } from "./types/OpaJourneyTypes.gen";
|
||||
import runner from "./pages/JourneyRunner";
|
||||
|
||||
function journey() {
|
||||
QUnit.module("ChangeApprovalsListListReport journey");
|
||||
|
||||
const defaultTableId = "";
|
||||
|
||||
opaTest("Start application", function (Given: Given, _When: When, Then: Then) {
|
||||
Given.iStartMyApp();
|
||||
|
||||
Then.onTheChangeApprovalsListGenerated.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: Given, When: When, Then: Then) {
|
||||
// When.onTheChangeApprovalsListGenerated.onFilterBar().iChangeSearchField("Search Term");
|
||||
// When.onTheChangeApprovalsListGenerated.onFilterBar().iExecuteSearch();
|
||||
// Then.onTheChangeApprovalsListGenerated.onTable(defaultTableId).iCheckRows();
|
||||
// When.onTheChangeApprovalsListGenerated.onFilterBar().iChangeSearchField(undefined);
|
||||
// Then.onTheChangeApprovalsListGenerated.onFilterBar().iCheckSearchField(undefined);
|
||||
// });
|
||||
|
||||
opaTest("Check table columns and actions", function (_Given: Given, _When: When, Then: Then) {
|
||||
Then.onTheChangeApprovalsListGenerated.onTable(defaultTableId).iCheckColumns(undefined, {"ItemNumber":{"header":"ItemNumber"},"ItemName":{"header":"ItemName"},"ChangeType":{"header":"ChangeType"},"Status":{"header":"Status"},"StatusCriticality":{"header":"StatusCriticality"}});
|
||||
});
|
||||
|
||||
opaTest("Navigate to ObjectPage", function (_Given: Given, When: When, Then: Then) {
|
||||
// Note: this test will fail if the ListReport page doesn't show any data
|
||||
When.onTheChangeApprovalsListGenerated.onFilterBar().iExecuteSearch();
|
||||
Then.onTheChangeApprovalsListGenerated.onTable(defaultTableId).iCheckRows();
|
||||
When.onTheChangeApprovalsListGenerated.onTable(defaultTableId).iPressRow(0);
|
||||
Then.onTheChangeApprovalsObjectPageGenerated.iSeeThisPage();
|
||||
});
|
||||
|
||||
opaTest("Teardown", function (Given: Given) {
|
||||
// Cleanup
|
||||
Given.iTearDownMyApp();
|
||||
});
|
||||
}
|
||||
|
||||
runner.run([journey]);
|
||||
@@ -0,0 +1,71 @@
|
||||
/******************************************************************************
|
||||
* ╔═══════════════════════════════════════════════════════════════════════╗ *
|
||||
* ║ ║ *
|
||||
* ║ 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. ║ *
|
||||
* ║ ║ *
|
||||
* ╚═══════════════════════════════════════════════════════════════════════╝ *
|
||||
******************************************************************************/
|
||||
|
||||
import opaTest from "sap/ui/test/opaQunit";
|
||||
import type { Given, When, Then } from "./types/OpaJourneyTypes.gen";
|
||||
import runner from "./pages/JourneyRunner";
|
||||
|
||||
function journey() {
|
||||
QUnit.module("ChangeApprovalsObjectPageObjectPage journey");
|
||||
|
||||
opaTest("Navigate to ChangeApprovalsObjectPageObjectPage", function (Given: Given, When: When, Then: Then) {
|
||||
Given.iStartMyApp();
|
||||
When.onTheChangeApprovalsListGenerated.onFilterBar().iExecuteSearch();
|
||||
Then.onTheChangeApprovalsListGenerated.onTable("").iCheckRows();
|
||||
When.onTheChangeApprovalsListGenerated.onTable("").iPressRow(0);
|
||||
|
||||
Then.onTheChangeApprovalsObjectPageGenerated.iSeeThisPage();
|
||||
});
|
||||
|
||||
|
||||
|
||||
opaTest("Check the ChangeFacet section of the Object Page", function (_Given: Given, _When: When, Then: Then) {
|
||||
Then.onTheChangeApprovalsObjectPageGenerated.iCheckSection({ section: "ChangeFacet" }, {});
|
||||
Then.onTheChangeApprovalsObjectPageGenerated.onForm({ section: "ChangeFacet" }).iCheckField({ property: "ItemNumber" });
|
||||
Then.onTheChangeApprovalsObjectPageGenerated.onForm({ section: "ChangeFacet" }).iCheckField({ property: "ItemName" });
|
||||
Then.onTheChangeApprovalsObjectPageGenerated.onForm({ section: "ChangeFacet" }).iCheckField({ property: "ChangeType" });
|
||||
Then.onTheChangeApprovalsObjectPageGenerated.onForm({ section: "ChangeFacet" }).iCheckField({ property: "ArenaEcoId" });
|
||||
});
|
||||
|
||||
opaTest("Check the ApprovalFacet section of the Object Page", function (_Given: Given, _When: When, Then: Then) {
|
||||
Then.onTheChangeApprovalsObjectPageGenerated.iCheckSection({ section: "ApprovalFacet" }, {});
|
||||
Then.onTheChangeApprovalsObjectPageGenerated.onForm({ section: "ApprovalFacet" }).iCheckField({ property: "Status" });
|
||||
Then.onTheChangeApprovalsObjectPageGenerated.onForm({ section: "ApprovalFacet" }).iCheckField({ property: "RequestedBy" });
|
||||
Then.onTheChangeApprovalsObjectPageGenerated.onForm({ section: "ApprovalFacet" }).iCheckField({ property: "RequestedOn" });
|
||||
Then.onTheChangeApprovalsObjectPageGenerated.onForm({ section: "ApprovalFacet" }).iCheckField({ property: "DecidedBy" });
|
||||
Then.onTheChangeApprovalsObjectPageGenerated.onForm({ section: "ApprovalFacet" }).iCheckField({ property: "DecidedOn" });
|
||||
Then.onTheChangeApprovalsObjectPageGenerated.onForm({ section: "ApprovalFacet" }).iCheckField({ property: "RejectReason" });
|
||||
});
|
||||
|
||||
opaTest("Check the ExecutionFacet section of the Object Page", function (_Given: Given, _When: When, Then: Then) {
|
||||
Then.onTheChangeApprovalsObjectPageGenerated.iCheckSection({ section: "ExecutionFacet" }, {});
|
||||
Then.onTheChangeApprovalsObjectPageGenerated.onForm({ section: "ExecutionFacet" }).iCheckField({ property: "SapChangeNumber" });
|
||||
Then.onTheChangeApprovalsObjectPageGenerated.onForm({ section: "ExecutionFacet" }).iCheckField({ property: "ErrorMessage" });
|
||||
});
|
||||
|
||||
opaTest("Check the PayloadFacet section of the Object Page", function (_Given: Given, _When: When, Then: Then) {
|
||||
Then.onTheChangeApprovalsObjectPageGenerated.iCheckSection({ section: "PayloadFacet" }, {});
|
||||
Then.onTheChangeApprovalsObjectPageGenerated.onForm({ section: "PayloadFacet" }).iCheckField({ property: "SapPreview" });
|
||||
});
|
||||
|
||||
opaTest("Teardown", function (Given: Given) {
|
||||
// Cleanup
|
||||
Given.iTearDownMyApp();
|
||||
});
|
||||
}
|
||||
|
||||
runner.run([journey]);
|
||||
@@ -0,0 +1,25 @@
|
||||
/******************************************************************************
|
||||
* ╔═══════════════════════════════════════════════════════════════════════╗ *
|
||||
* ║ ║ *
|
||||
* ║ 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. ║ *
|
||||
* ║ ║ *
|
||||
* ╚═══════════════════════════════════════════════════════════════════════╝ *
|
||||
******************************************************************************/
|
||||
|
||||
export const actions = {};
|
||||
|
||||
export const assertions = {};
|
||||
|
||||
export default class ListReport {
|
||||
actions = actions;
|
||||
assertions = assertions;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
/******************************************************************************
|
||||
* ╔═══════════════════════════════════════════════════════════════════════╗ *
|
||||
* ║ ║ *
|
||||
* ║ 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. ║ *
|
||||
* ║ ║ *
|
||||
* ╚═══════════════════════════════════════════════════════════════════════╝ *
|
||||
******************************************************************************/
|
||||
|
||||
export const actions = {};
|
||||
|
||||
export const assertions = {};
|
||||
|
||||
export default class ObjectPage {
|
||||
actions = actions;
|
||||
assertions = assertions;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
import JourneyRunner from "sap/fe/test/JourneyRunner";
|
||||
import ListReport from "sap/fe/test/ListReport";
|
||||
import ObjectPage from "sap/fe/test/ObjectPage";
|
||||
import CustomChangeApprovalsListGenerated from "./ChangeApprovalsList.gen";
|
||||
import CustomChangeApprovalsObjectPageGenerated from "./ChangeApprovalsObjectPage.gen";
|
||||
|
||||
const runner = new JourneyRunner({
|
||||
launchUrl: sap.ui.require.toUrl("com/minicircuits/arenaplm") + "/test/flp.html#app-preview",
|
||||
pages: {
|
||||
onTheChangeApprovalsListGenerated: new ListReport(
|
||||
{
|
||||
appId: "com.minicircuits.arenaplm",
|
||||
componentId: "ChangeApprovalList",
|
||||
entitySet: "",
|
||||
contextPath: "/ChangeApproval"
|
||||
},
|
||||
CustomChangeApprovalsListGenerated
|
||||
),
|
||||
onTheChangeApprovalsObjectPageGenerated: new ObjectPage(
|
||||
{
|
||||
appId: "com.minicircuits.arenaplm",
|
||||
componentId: "ChangeApprovalObjectPage",
|
||||
entitySet: "",
|
||||
contextPath: "/ChangeApproval"
|
||||
},
|
||||
CustomChangeApprovalsObjectPageGenerated
|
||||
)
|
||||
},
|
||||
async: true
|
||||
});
|
||||
|
||||
export default runner;
|
||||
@@ -0,0 +1,56 @@
|
||||
/******************************************************************************
|
||||
* ╔═══════════════════════════════════════════════════════════════════════╗ *
|
||||
* ║ ║ *
|
||||
* ║ WARNING: AUTO-GENERATED FILE ║ *
|
||||
* ║ ║ *
|
||||
* ║ This file is automatically generated by SAP Fiori tools and is ║ *
|
||||
* ║ overwritten when you run the OPA test generator again. ║ *
|
||||
* ║ ║ *
|
||||
* ║ Do not edit this file directly. Any changes will be lost. ║ *
|
||||
* ║ ║ *
|
||||
* ╚═══════════════════════════════════════════════════════════════════════╝ *
|
||||
******************************************************************************/
|
||||
|
||||
import type Opa5 from "sap/ui/test/Opa5";
|
||||
import type { actions as ListReportActions, assertions as ListReportAssertions } from "sap/fe/test/ListReport";
|
||||
import type { actions as ObjectPageActions, assertions as ObjectPageAssertions } from "sap/fe/test/ObjectPage";
|
||||
import type { actions as TemplatePageActions, assertions as TemplatePageAssertions } from "sap/fe/test/TemplatePage";
|
||||
import type Shell from "sap/fe/test/Shell";
|
||||
import type BaseArrangements from "sap/fe/test/BaseArrangements";
|
||||
import type { actions as ChangeApprovalsListGeneratedCustomActions, assertions as ChangeApprovalsListGeneratedCustomAssertions } from "../pages/ChangeApprovalsList.gen";
|
||||
import type { actions as ChangeApprovalsObjectPageGeneratedCustomActions, assertions as ChangeApprovalsObjectPageGeneratedCustomAssertions } from "../pages/ChangeApprovalsObjectPage.gen";
|
||||
|
||||
/**
|
||||
* Enables OPA5 fluent `.and` chaining on page objects and their sub-objects.
|
||||
*
|
||||
* @example
|
||||
* Then.onTheObjectPageGenerated.iCheckSection({ section: "A" }).and.iCheckSection({ section: "B" });
|
||||
* When.onTheListReportGenerated.onFilterBar().iExecuteSearch().and.iClearFilterBar();
|
||||
*/
|
||||
type WithAnd<T> = {
|
||||
[K in keyof T | 'and']: K extends 'and'
|
||||
? WithAnd<T>
|
||||
: K extends keyof T
|
||||
? T[K] extends (...args: infer A) => infer R
|
||||
? (...args: A) => (R extends Opa5 | object ? (keyof R extends never ? WithAnd<T> : [R] extends [Opa5] ? WithAnd<T> : WithAnd<R>) : WithAnd<T>)
|
||||
: T[K]
|
||||
: never;
|
||||
};
|
||||
|
||||
export type Given = Opa5 & BaseArrangements & {
|
||||
iTearDownMyApp: () => Given;
|
||||
iStartMyApp: (sAppHash?: string, mInUrlParameters?: object) => Given;
|
||||
and: Given;
|
||||
};
|
||||
|
||||
export type When = Opa5 & BaseArrangements & {
|
||||
onTheChangeApprovalsListGenerated: WithAnd<Opa5 & ListReportActions & TemplatePageActions & typeof ChangeApprovalsListGeneratedCustomActions>;
|
||||
onTheChangeApprovalsObjectPageGenerated: WithAnd<Opa5 & ObjectPageActions & TemplatePageActions & typeof ChangeApprovalsObjectPageGeneratedCustomActions>;
|
||||
onTheShell: Shell;
|
||||
};
|
||||
|
||||
export type Then = Opa5 & BaseArrangements & {
|
||||
onTheChangeApprovalsListGenerated: WithAnd<Opa5 & ListReportAssertions & TemplatePageAssertions & typeof ChangeApprovalsListGeneratedCustomAssertions>;
|
||||
onTheChangeApprovalsObjectPageGenerated: WithAnd<Opa5 & ObjectPageAssertions & TemplatePageAssertions & typeof ChangeApprovalsObjectPageGeneratedCustomAssertions>;
|
||||
onTheShell: Shell;
|
||||
};
|
||||
Reference in New Issue
Block a user