{
    "description": {
        "author": "Salesforce",
        "text": [
            "Represents the Service Appointment list and allows interacting with or opening Service Appointment records."
        ]
    },
    "implements": "utam-sfsmobileapp/pageObjects/record/serviceAppointmentObject",
    "platform": "native",
    "beforeLoad": [
        {
            "apply": "waitFor",
            "args": [
                {
                    "type": "function",
                    "predicate": [
                        {
                            "element": "root",
                            "apply": "isPresent"
                        }
                    ]
                }
            ]
        }
    ],
    "profile": [
        {
            "platform": [
                "ios_phone"
            ]
        }
    ],
    "root": true,
    "selector": {
        "accessid": "ScheduleListView"
    },
    "type": [
        "touchable"
    ],
    "elements": [
        {
            "name": "calendarIcon",
            "public": true,
            "type": [
                "clickable"
            ],
            "selector": {
                "classchain": "**/XCUIElementTypeButton[`label == 'Calendar'`]"
            }
        },
        {
            "name": "serviceAppointmentLabel",
            "type": [
                "clickable"
            ],
            "selector": {
                "classchain": "**/XCUIElementTypeStaticText[`label == 'Title. %s'`]",
                "args": [
                    {
                        "name": "label",
                        "type": "string"
                    }
                ]
            }
        },
        {
            "name": "serviceAppointmentFirstItem",
            "type": [
                "clickable"
            ],
            "selector": {
                "accessid": "ScheduleListItemView.titleLabel"
            }
        },
        {
            "name": "serviceAppointmentTitle",
            "type": [
                "clickable"
            ],
            "selector": {
                "classchain": "**/XCUIElementTypeStaticText[`label == 'Schedule'`]"
            }
        }
    ],
    "methods": [
        {
            "name": "clickCalendarIcon",
            "compose": [
                {
                    "element": "calendarIcon",
                    "apply": "click"
                }
            ]
        },
        {
            "name": "hasCalendarIcon",
            "compose": [
                {
                    "element": "calendarIcon",
                    "apply": "isPresent"
                }
            ]
        },
        {
            "name": "openServiceAppointment",
            "compose": [
                {
                    "element": "serviceAppointmentLabel",
                    "apply": "click"
                }
            ]
        },
        {
            "name": "openFirstServiceAppointment",
            "compose": [
                {
                    "element": "serviceAppointmentFirstItem",
                    "apply": "click"
                }
            ]
        },
        {
            "name": "clickServiceAppointmentTitle",
            "compose": [
                {
                    "element": "serviceAppointmentTitle",
                    "apply": "click"
                }
            ]
        },
        {
            "name": "pullToRefresh",
            "compose": [
                {
                    "element": "root",
                    "apply": "flick",
                    "args": [
                        {
                            "value": 0
                        },
                        {
                            "value": 400
                        }
                    ]
                }
            ]
        }
    ]
}