name: "navigationButtonPanel",
classes: "xv-buttons",
components: [
- {kind: "onyx.Button", name: "newButton", onclick: "newItem", classes: "icon-plus"},
- {kind: "font.TextIcon", name: "exportButton", onclick: "exportAttr", icon: "share", content: "_export".loc()} // TODO: classes?
+ {kind: "onyx.Button", name: "newButton", ontap: "newItem", classes: "icon-plus"},
+ {kind: "font.TextIcon", name: "exportButton", ontap: "exportAttr", icon: "share", content: "_export".loc()} // TODO: classes?
]
});
_.each(XV, function (value, key) {
var list,
kinds = ['SalesOrderList', 'QuoteList', 'InvoiceList', 'ReturnList', 'ProjectList'];
- // loop through lists with grid boxes
- if (XV.inheritsFrom(value.prototype, "XV.List") && _.contains(kinds, key)) {
+ // lists with grid boxes; TODO: find candidates automatically
+ if (_.contains(kinds, key)) {
describe('Create Workspace for XV.' + key, function () {
it('Create a Workspace', function () {
smoke.navigateToNewWorkspace(XT.app, list, function (workspaceContainer) {
var workspace = workspaceContainer.$.workspace;
_.each(workspace.$, function (component) {
- if (XV.inheritsFrom(component, 'XV.GridBox') && XV.inheritsFrom(component, 'XV.WorkflowGridBox')) {
+ if (XV.inheritsFrom(component, 'XV.GridBox')) {
describe('Test creating line items for ' + component, function () {
it('Create line items', function () {
// verify again that a row has been added
assert.equal(gridBox.liveModels().length, startingRows += 1);
});
+
+ it('Check export', function() {
+ function getExportButton(obj) {
+ var result = null;
+ if ("$" in obj) {
+ result = obj.$.exportButton
+ || _.find(obj.$, getExportButton);
+ }
+ return result;
+ }
+
+ var gridBox = component
+ , exportButton = getExportButton(gridBox);
+ assert.ok(exportButton);
+ // TODO: need to populate before we can export
+ // assert.doesNotThrow(exportButton.doTap());
+ // TODO: find the generated file & check contents
+ });
});
}
});