/*
 * Copyright (C) 2013 salesforce.com, inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
({
    // TODO(W-3674741): FF browser versions in autobuilds is too far behind
    // TODO W-4363273: Bug in BrowserCompatibilityServiceImpl, serving compat version of aura fw js in Safari 11
    browsers: ["-IE8", "-IE9", "-IE10", "-IE11", "-FIREFOX", "-IPHONE", "-IPAD"],
    setUp: function (cmp) {
        cmp.set("v.testUtils", $A.test);
    },

    // begin Secure Aura to Secure LWC Communication tests
    testAura2SLWCCustomEventSend: {
        test: function (cmp, event, helper) {
            cmp.testAura2SLWCCustomEventSend();
        }
    },
    // TODO: Uncomment once issues after LWC 0.24.1 are fixed
    _testAura2SLWCCustomEventReceive: {
        test: function (cmp, event, helper) {
            cmp.testAura2SLWCCustomEventReceive();
        }
    },
    testAura2SLWCCustomEventCNReceive: {
        test: function(cmp) {
            return cmp.testAura2SLWCCustomEventCNReceive();
        }
    },
    // TODO: Uncomment once issues after LWC 0.24.1 are fixed
    _testAura2SLWCApiMethodSend: {
        test: function (cmp, event, helper) {
            cmp.testAura2SLWCApiMethodSend();
        }
    },
    testAura2SLWCApiMethodReceive: {
        test: function (cmp, event, helper) {
            cmp.testAura2SLWCApiMethodReceive();
        }
    },
    testAura2SLWCApiMethodCNSend: {
        test: function(cmp) {
            cmp.testAura2SLWCApiMethodCNSend();
        }
    },
    testAura2SLWCApiMethodCNReceive: {
        test: function(cmp) {
            cmp.testAura2SLWCApiMethodCNReceive();
        }
    },
    // TODO: Due to a bug in how LWC engine patches target and currentTarget properties on event
    _testAura2SLWCDomEventOnHostElement: {
        test: function (cmp) {
            cmp.testAura2SLWCDomEventOnHostElement();
        }
    },
    // end Secure Aura to Secure LWC Communication tests

    // begin Secure Aura to Unsecure LWC Communication tests
    testAura2ULWCCustomEventReceive: {
        test: function(cmp) {
            cmp.testAura2ULWCCustomEventReceive();
        }
    },
    // end Secure Aura to Unsecure LWC Communication tests

    // TODO: Uncomment once issues after LWC 0.24.1 are fixed
    _testTemplateQuerySelectorReturnsSecureElement: {
        test: function (cmp, event, helper) {
            cmp.testTemplateQuerySelectorReturnsSecureElement();
        }
    },
    // TODO: Uncomment once issues after LWC 0.24.1 are fixed
    _testLWCCustomEventOnSelf: {
        test: function (cmp, event, helper) {
            cmp.testLWCCustomEventOnSelf();
        }
    },
    // TODO: Uncomment once issues after LWC 0.24.1 are fixed
    _testSecureLWC2SecureLWCCustomEvent: {
        test: function (cmp) {
            return cmp.testSecureLWC2SecureLWCCustomEvent();
        }
    },
    // TODO: Due to a bug in how LWC engine patches target and currentTarget properties on event
    _testSecureLWC2SecureLWCDomEvent: {
        test: function (cmp) {
            return cmp.testSecureLWC2SecureLWCDomEvent();
        }
    },
    // User Story: W-5058590
    // TODO: Uncomment once issues after LWC 0.24.1 are fixed
    _testSecureLWC2UnsecureLWCCustomEvent: {
        test: function (cmp) {
            return cmp.testSecureLWC2UnsecureLWCCustomEvent()
        }
    },
    // User Story: W-4808252
    _testSecureLWC2UnsecureLWCDOMEvent: {
        test: function (cmp) {
            cmp.testSecureLWC2UnsecureLWCDOMEvent();
        }
    },
    // TODO: Uncomment once issues after LWC 0.24.1 are fixed
    _testSecureLWC2SecureLWCCustomEventCrossNamespace: {
        test: function (cmp) {
            return cmp.testSecureLWC2SecureLWCCustomEventCrossNamespace();
        }
    },
    testUnsecureLWC2SecureLWCCustomEventCrossNamespace: {
        test: function (cmp) {
            return cmp.testUnsecureLWC2SecureLWCCustomEventCrossNamespace();
        }
    },
    testUnsecureLWC2SecureLWCCustomEvent: {
        test: function (cmp) {
            return cmp.testUnsecureLWC2SecureLWCCustomEvent();
        }
    },
    // TODO: Uncomment once issues after LWC 0.24.1 are fixed
    _testSLWC2SWLCParentCanCallAPIProp: {
        test: function (cmp) {
            return cmp.testSLWC2SWLCParentCanCallAPIProp();
        }
    },
    testAura2SLWCApiMethodCNSend: {
        test: function(cmp) {
            return cmp.testAura2SLWCApiMethodCNSend();
        }
    },
    testAuraUnsecureLWCApiMethodOnHostElement: {
        test: function(cmp) {
            return cmp.testAuraUnsecureLWCApiMethodOnHostElement();
        }
    }
})