{
    "selector": {
        "css": ".oneHeader"
    },
    "root": true,
    "description": {
        "text": [
            "Selector: .oneHeader.",
            "Represents the one:header Aura component.",
            "Access the system message, global actions list, trailhead trigger, notifications button, notifications count, favorites list, add to favorites button, profile link, setup menu, search, or back button."
        ],
        "author": "Salesforce"
    },
    "elements": [
        {
            "name": "systemMessage",
            "public": true,
            "type": "utam-global/pageObjects/systemMessage",
            "selector": {
                "css": ".oneSystemMessage"
            }
        },
        {
            "name": "globalActions",
            "type": [
                "clickable"
            ],
            "selector": {
                "css": ".globalCreateTrigger"
            }
        },
        {
            "name": "trailHeadTrigger",
            "public": true,
            "type": [
                "clickable"
            ],
            "selector": {
                "css": ".slds-dropdown-trigger.trailheadTrigger"
            }
        },
        {
            "name": "notifications",
            "type": [
                "clickable",
                "actionable"
            ],
            "selector": {
                "css": ".unsNotificationsCounter"
            }
        },
        {
            "name": "notificationCount",
            "type": [
                "clickable"
            ],
            "selector": {
                "css": ".unsNotificationsCounter span.counterLabel"
            }
        },
        {
            "name": "addFavoriteButton",
            "type": [
                "clickable"
            ],
            "selector": {
                "css": ".slds-global-actions__item button:first-child"
            }
        },
        {
            "name": "favoritesList",
            "type": [
                "clickable"
            ],
            "selector": {
                "css": ".slds-global-actions__item button:last-child"
            }
        },
        {
            "name": "profile",
            "type": "utam-global/pageObjects/userProfileCardTrigger",
            "selector": {
                "css": ".userProfileCardTriggerRoot"
            },
            "public": true
        },
        {
            "name": "setupMenu",
            "type": [
                "clickable"
            ],
            "selector": {
                "css": ".slds-global-actions__item .menuTriggerLink"
            }
        },
        {
            "name": "searchIcon",
            "type": [
                "clickable",
                "actionable"
            ],
            "selector": {
                "css": "[data-key=search].forceHeaderButtonDeprecated"
            }
        },
        {
            "name": "searchInput",
            "type": [
                "clickable",
                "actionable",
                "editable"
            ],
            "selector": {
                "css": ".bBody .forceSearchInputMobile input"
            }
        },
        {
            "name": "backButton",
            "type": [
                "clickable",
                "actionable"
            ],
            "selector": {
                "css": "a.oneAppNavBackButton"
            }
        },
        {
            "name": "stageLeftToggle",
            "type": [
                "clickable"
            ],
            "selector": {
                "css": ".bLeft .oneAppNavToggle a.toggleNav"
            }
        },
        {
            "name": "setupMenuList",
            "public": true,
            "type": "utam-aura/pageObjects/menuList",
            "selector": {
                "css": ".setupGear .uiMenuList"
            }
        },
        {
            "name": "copilot",
            "public": true,
            "nullable": true,
            "selector": {
                "css": ".slds-dropdown-trigger.einsteinAssistant lightning-button-icon-stateful"
            },
            "type": [
                "clickable",
                "actionable",
                "editable"
            ]
        },
        {
            "name": "AgentExplorer",
            "public": true,
            "nullable": true,
            "selector": {
                "css": "devops_center-base-component"
            },
            "type": [
                "clickable",
                "actionable",
                "editable"
            ]
        },
        {
            "name": "lightningButtonIconStateful",
            "public": true,
            "nullable": true,
            "selector": {
                "css": "lightning-button-icon-stateful",
                "returnAll": true
            },
            "type": [
                "clickable",
                "actionable",
                "editable"
            ]
        },
        {
            "name": "allTooltipTriggers",
            "public": true,
            "nullable": true,
            "selector": {
                "css": "div.tooltipTrigger.tooltip-trigger.uiTooltip",
                "returnAll": true
            },
            "type": [
                "clickable",
                "actionable",
                "editable"
            ]
        }
    ],
    "methods": [
        {
            "description": {
                "text": [
                    "Click the add to favorite button"
                ],
                "return": "none"
            },
            "name": "addToFavorites",
            "compose": [
                {
                    "element": "addFavoriteButton",
                    "apply": "click"
                }
            ]
        },
        {
            "description": {
                "text": [
                    "Click the favorites list button"
                ],
                "return": "none"
            },
            "name": "getFavoriteList",
            "compose": [
                {
                    "element": "favoritesList",
                    "apply": "click"
                }
            ]
        },
        {
            "description": {
                "text": [
                    "Click the notifications button"
                ],
                "return": "none"
            },
            "name": "showNotifications",
            "compose": [
                {
                    "element": "notifications",
                    "apply": "click"
                }
            ]
        },
        {
            "description": {
                "text": [
                    "Click the setup menu button"
                ],
                "return": "none"
            },
            "name": "showSetupMenu",
            "compose": [
                {
                    "element": "setupMenu",
                    "apply": "click"
                }
            ]
        },
        {
            "description": {
                "text": [
                    "Click to open the global actions list"
                ],
                "return": "none"
            },
            "name": "getGlobalActionsList",
            "compose": [
                {
                    "element": "globalActions",
                    "apply": "click"
                }
            ]
        },
        {
            "description": {
                "text": [
                    "Get the notification count"
                ],
                "return": "the notification count"
            },
            "name": "getNotificationCount",
            "compose": [
                {
                    "element": "notificationCount",
                    "apply": "getText"
                }
            ]
        },
        {
            "description": {
                "text": [
                    "Checks if there is a new notification"
                ],
                "return": "none"
            },
            "name": "hasNewNotification",
            "compose": [
                {
                    "element": "notificationCount",
                    "apply": "isVisible"
                }
            ]
        },
        {
            "description": {
                "text": [
                    "Selects the search bar enters text to search and searches for the text"
                ],
                "return": "none"
            },
            "name": "getSearch",
            "compose": [
                {
                    "element": "searchIcon",
                    "apply": "click"
                },
                {
                    "element": "searchInput",
                    "apply": "setText",
                    "args": [
                        {
                            "name": "searchTerm",
                            "type": "string"
                        }
                    ]
                },
                {
                    "element": "searchInput",
                    "apply": "click"
                }
            ]
        },
        {
            "name": "waitAndClickCoPilot",
            "compose": [
                {
                    "element": "copilot",
                    "apply": "waitForVisible"
                },
                {
                    "element": "copilot",
                    "apply": "click"
                }
            ]
        }
    ]
}