import { newE2EPage } from "@stencil/core/testing";
describe("[gx-ide-new-kb][basic]", () => {
    let page;
    let newKBRef;
    beforeEach(async () => {
        page = await newE2EPage({
            failOnConsoleError: true,
            html: `<gx-ide-new-kb></gx-ide-new-kb>`
        });
        // Try to set the callback properties before the connectedCallback method
        // is executed
        await page.evaluate(() => {
            const newKBComponent = document.querySelector("gx-ide-new-kb");
            const netFrontEnds = [
                {
                    id: "web-net",
                    label: "Web (.NET)",
                    // iconName: null,
                    disabled: true
                },
                {
                    id: "android",
                    label: "Android",
                    // iconName: "general/android",
                    checked: true
                },
                {
                    id: "apple",
                    label: "Apple"
                    // iconName: "general/apple"
                }
            ];
            const javaFrontEnds = [
                {
                    id: "web-angular",
                    label: "Web (Angular)",
                    iconName: "general/angular"
                },
                {
                    id: "we-chat-mini-program",
                    label: "We Chat Mini Program",
                    iconName: null
                }
            ];
            newKBComponent.getFrontEndsCallback = selectedPrototypingEnvironmentId => new Promise(resolve => {
                resolve(selectedPrototypingEnvironmentId === ".net"
                    ? netFrontEnds
                    : javaFrontEnds);
            });
            newKBComponent.authenticationTypes = [
                {
                    id: "username-and-password",
                    label: "Username and Password"
                },
                {
                    id: "two-factor-authentication",
                    label: "Two-Factor Authentication"
                },
                {
                    id: "biometric-authentication",
                    label: "Biometric Authentication"
                },
                {
                    id: "oauth-authentication",
                    label: "OAuth Authentication"
                },
                {
                    id: "windows-authentication",
                    label: "Windows Authentication"
                }
            ];
            newKBComponent.collations = [
                {
                    id: "cs",
                    label: "Case-sensitive (_CS)"
                },
                {
                    id: "as",
                    label: "Accent-sensitive (_AS)"
                },
                {
                    id: "ks",
                    label: "Kana-sensitive (_KS)",
                    selected: true
                },
                {
                    id: "ws",
                    label: "Width-sensitive (_WS)"
                },
                {
                    id: "vss",
                    label: "Variation-selector-sensitive (_VSS)"
                }
            ];
            newKBComponent.defaultDataSources = [
                { id: "sql-server", label: "SQL Server" },
                { id: "mysql", label: "MySQL" },
                { id: "postgre-sql", label: "PostgreSQL", selected: true }
            ];
            newKBComponent.defaultPrototypingEnvironments = [
                { id: ".net", label: ".NET" },
                { id: ".net-framework", label: ".NET Framework" },
                { id: "java", label: "Java" }
            ];
            newKBComponent.getPrototypingEnvironmentsCallback = async (id) => {
                const options = [
                    { id: ".net", label: ".NET" },
                    { id: ".net-framework", label: ".NET Framework" }
                ];
                if (id !== "cloud")
                    options.push({ id: "java", label: "Java" });
                return options;
            };
            newKBComponent.prototypingTargets = [
                {
                    id: "local",
                    label: "Local"
                },
                {
                    id: "cloud",
                    label: "Cloud",
                    selected: true
                }
            ];
            newKBComponent.serverNames = [
                {
                    id: "server1",
                    label: "Server Name 1",
                    selected: true
                },
                {
                    id: "server2",
                    label: "Server Name 2"
                },
                {
                    id: "server3",
                    label: "Server Name 3"
                }
            ];
            newKBComponent.userInterfaceLanguages = [
                { id: "es", label: "Spanish", selected: true },
                { id: "de", label: "German" },
                { id: "en", label: "English" },
                { id: "it", label: "Italian" },
                { id: "pt", label: "Portuguese" },
                { id: "zh-CN", label: "Simplified Chinese" },
                { id: "zh-TW", label: "Traditional Chinese" },
                { id: "ja", label: "Japanese" },
                { id: "ar", label: "Arabic" }
            ];
        });
        await page.waitForChanges();
        newKBRef = await page.find("gx-ide-new-kb");
    });
    it("should have a shadowRoot", () => {
        expect(newKBRef.shadowRoot).toBeTruthy();
    });
    it('should have the "widget" class', () => {
        expect(newKBRef.getAttribute("class")).toContain("widget");
    });
});
//# sourceMappingURL=new-kb.e2e.js.map
