import { describe, it, expect } from "@normalized:N&&&@ohos/hypium/index&1.0.25";
import { TencentQianWebViewConfig } from "@normalized:N&&&tencentqianwebview/src/main/ets/model/TencentQianWebViewConfig&1.0.0";
/**
 * TencentQianWebViewConfig 默认值验证。
 *
 * 对应 spec.md TencentQianWebViewConfig Data Model 的"Default config values" Scenario。
 */
export default function configTest() {
    describe('TencentQianWebViewConfig', () => {
        it('default_injectUserAgent_isTrue', 0, () => {
            const c = new TencentQianWebViewConfig();
            expect(c.injectUserAgent).assertTrue();
        });
        it('default_userAgentExtra_isEmpty', 0, () => {
            const c = new TencentQianWebViewConfig();
            expect(c.userAgentExtra).assertEqual('');
        });
        it('default_allowMixedContent_isFalse', 0, () => {
            // 安全优先,默认不允许混合内容
            const c = new TencentQianWebViewConfig();
            expect(c.allowMixedContent).assertFalse();
        });
        it('default_showTopBar_isTrue', 0, () => {
            const c = new TencentQianWebViewConfig();
            expect(c.showTopBar).assertTrue();
        });
        it('default_topBarTitle_isEmpty', 0, () => {
            const c = new TencentQianWebViewConfig();
            expect(c.topBarTitle).assertEqual('');
        });
        it('default_topBarColors_areNull', 0, () => {
            const c = new TencentQianWebViewConfig();
            expect(c.topBarBackgroundColor === null).assertTrue();
            expect(c.topBarTextColor === null).assertTrue();
        });
        it('default_showCloseButton_isTrue', 0, () => {
            const c = new TencentQianWebViewConfig();
            expect(c.showCloseButton).assertTrue();
        });
        it('default_statusBarStyle_isDarkContent', 0, () => {
            const c = new TencentQianWebViewConfig();
            expect(c.statusBarStyle).assertEqual('DARK_CONTENT');
        });
        it('default_confirmBeforeClose_isFalse', 0, () => {
            const c = new TencentQianWebViewConfig();
            expect(c.confirmBeforeClose).assertFalse();
        });
        it('default_externalSchemes_containsWeixinAndAlipays', 0, () => {
            const c = new TencentQianWebViewConfig();
            expect(c.externalSchemes.length).assertEqual(2);
            expect(c.externalSchemes[0]).assertEqual('weixin');
            expect(c.externalSchemes[1]).assertEqual('alipays');
        });
        it('default_compatibilityTestUrl_isNull', 0, () => {
            const c = new TencentQianWebViewConfig();
            expect(c.compatibilityTestUrl === null).assertTrue();
        });
        it('default_downloadWithCookies_isFalse', 0, () => {
            const c = new TencentQianWebViewConfig();
            expect(c.downloadWithCookies).assertFalse();
        });
        it('custom_allowMixedContent_isRespected', 0, () => {
            const c = new TencentQianWebViewConfig();
            c.allowMixedContent = false;
            expect(c.allowMixedContent).assertFalse();
        });
        it('custom_externalSchemes_isReplaced', 0, () => {
            const c = new TencentQianWebViewConfig();
            c.externalSchemes = ['weixin'];
            expect(c.externalSchemes.length).assertEqual(1);
            expect(c.externalSchemes[0]).assertEqual('weixin');
        });
    });
}
