Added ids to materials for squish tests

-Added a text property to MaterialsBrandSection
-Added ids to materials menu buttons
This commit is contained in:
Satish 2019-05-07 12:37:42 +02:00
parent 6708d9da64
commit 3b4e253e98
3 changed files with 9 additions and 1 deletions

View File

@ -13,7 +13,8 @@ import Cura 1.0 as Cura
Item Item
{ {
id: brand_section id: brand_section
property var text: ""
property var sectionName: "" property var sectionName: ""
property var elementsModel // This can be a MaterialTypesModel or GenericMaterialsModel or FavoriteMaterialsModel property var elementsModel // This can be a MaterialTypesModel or GenericMaterialsModel or FavoriteMaterialsModel
property var hasMaterialTypes: true // It indicates wheather it has material types or not property var hasMaterialTypes: true // It indicates wheather it has material types or not

View File

@ -159,6 +159,7 @@ Item
delegate: MaterialsBrandSection delegate: MaterialsBrandSection
{ {
id: brandSection id: brandSection
text: model.name
sectionName: model.name sectionName: model.name
elementsModel: model.material_types elementsModel: model.material_types
hasMaterialTypes: true hasMaterialTypes: true

View File

@ -81,6 +81,7 @@ Item
// Activate button // Activate button
Button Button
{ {
id: activateMenuButton
text: catalog.i18nc("@action:button", "Activate") text: catalog.i18nc("@action:button", "Activate")
iconName: "list-activate" iconName: "list-activate"
enabled: !isCurrentItemActivated && Cura.MachineManager.hasMaterials enabled: !isCurrentItemActivated && Cura.MachineManager.hasMaterials
@ -98,6 +99,7 @@ Item
// Create button // Create button
Button Button
{ {
id: createMenuButton
text: catalog.i18nc("@action:button", "Create") text: catalog.i18nc("@action:button", "Create")
iconName: "list-add" iconName: "list-add"
onClicked: onClicked:
@ -111,6 +113,7 @@ Item
// Duplicate button // Duplicate button
Button Button
{ {
id: duplicateMenuButton
text: catalog.i18nc("@action:button", "Duplicate"); text: catalog.i18nc("@action:button", "Duplicate");
iconName: "list-add" iconName: "list-add"
enabled: base.hasCurrentItem enabled: base.hasCurrentItem
@ -125,6 +128,7 @@ Item
// Remove button // Remove button
Button Button
{ {
id: removeMenuButton
text: catalog.i18nc("@action:button", "Remove") text: catalog.i18nc("@action:button", "Remove")
iconName: "list-remove" iconName: "list-remove"
enabled: base.hasCurrentItem && !base.currentItem.is_read_only && !base.isCurrentItemActivated && base.materialManager.canMaterialBeRemoved(base.currentItem.container_node) enabled: base.hasCurrentItem && !base.currentItem.is_read_only && !base.isCurrentItemActivated && base.materialManager.canMaterialBeRemoved(base.currentItem.container_node)
@ -138,6 +142,7 @@ Item
// Import button // Import button
Button Button
{ {
id: importMenuButton
text: catalog.i18nc("@action:button", "Import") text: catalog.i18nc("@action:button", "Import")
iconName: "document-import" iconName: "document-import"
onClicked: onClicked:
@ -151,6 +156,7 @@ Item
// Export button // Export button
Button Button
{ {
id: exportMenuButton
text: catalog.i18nc("@action:button", "Export") text: catalog.i18nc("@action:button", "Export")
iconName: "document-export" iconName: "document-export"
onClicked: onClicked: