Polymer / tools

Polymer Tools Monorepo
BSD 3-Clause "New" or "Revised" License
430 stars 200 forks source link

wct-local : test not run in headless mode #3375

Open osamamaruf opened 5 years ago

osamamaruf commented 5 years ago

Using the below configuration to run wct tests. The tests are not run in headless mode but the browser opens.

const { test } = require('web-component-tester/runner/test');

module.exports = () => {
    return test({
        plugins: {
            local: {
                browsers: [
                    'chrome'
                ],
                browsersOptions: {
                    chrome: [
                        'window-size=1920,1080',
                        'headless',
                        'disable-gpu',
                        'no-sandbox'
                    ]
                }
            },
            sauce: false
        }
    });
};

also the wct.conf.js config is shown below

const config = {
    suites: ['test'],
    plugins: {
        local: {
            disabled: false,
            browsers: [
                'chrome'
            ],
            browsersOptions: {
                chrome: [
                    'headless',
                    'disable-gpu',
                    'no-sandbox'
                ]
            }
        },
        istanbub: {
            dir: './coverage',
            reporters: ['text-summary', 'lcov'],
            include: [
                '**/*.html',
                '**/*.js'
            ],
            exclude: [
                '**/bower_components/**',
                '**/test/**'
            ]
        }
    }
};

module.exports = config;

Versions & Environment

hellokatili commented 5 years ago

@osamamaruf Hi, would you share your test setup with me? I try to set up tests for my Polymer elements on my Windows 10 machine. But nothing works...

armujahid commented 5 years ago

Use browserOptions to specify browser specific cli arguments in wct-local plugin settings. You are currently using browsersOptions :P

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.