All files / wdio-spec-reporter/tests/__fixtures__ testdata.js

100% Statements 10/10
100% Branches 0/0
100% Functions 0/0
100% Lines 10/10

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 1971x                   1x           1x                                                                                                                                 1x                                                                                             1x                   1x                                   1x                                                         1x       1x       1x      
export const RUNNER = {
    cid : '0-0',
    _duration : 5032,
    config: { hostname: 'localhost' },
    capabilities : {
        browserName : 'loremipsum',
    },
    specs : ['/foo/bar/baz.js'],
}
 
export const SUITE_UIDS = [
    'Foo test1',
    'Bar test2',
    'Baz test3',
]
 
export const SUITES = [
    {
        uid : SUITE_UIDS[0],
        title : SUITE_UIDS[0].slice(0, -1),
        hooks: [],
        tests : [
            {
                uid : 'foo1',
                title : 'foo',
                state : 'passed',
            },
            {
                uid : 'bar1',
                title : 'bar',
                state : 'passed',
            }
        ],
    },
    {
        uid : SUITE_UIDS[1],
        title : SUITE_UIDS[1].slice(0, -1),
        hooks: [],
        tests : [
            {
                uid : 'some test1',
                title : 'some test',
                state : 'passed',
            },
            {
                uid : 'a failed test2',
                title : 'a failed test',
                state : 'failed',
                error : {
                    message : 'expected foo to equal bar',
                    stack : 'Failed test stack trace'
                }
            },
            {
                uid : 'a failed test3',
                title : 'a failed test with no stack',
                state : 'failed',
                error : {
                    message : 'expected foo to equal bar'
                }
            }
        ],
    },
    {
        uid : SUITE_UIDS[2],
        title : SUITE_UIDS[2].slice(0, -1),
        hooks: [],
        tests : [
            {
                uid : 'foo bar baz1',
                title : 'foo bar baz',
                state : 'passed',
            },
            {
                uid : 'a skipped test2',
                title : 'a skipped test',
                state : 'skipped',
            }],
    }
]
 
export const SUITES_MULTIPLE_ERRORS = [
    {
        uid : SUITE_UIDS[0],
        title : SUITE_UIDS[0].slice(0, -1),
        hooks: [],
        tests : [
            {
                uid : 'foo1',
                title : 'foo',
                state : 'passed',
            },
            {
                uid : 'bar1',
                title : 'bar',
                state : 'passed',
            }
        ],
    },
    {
        uid : SUITE_UIDS[1],
        title : SUITE_UIDS[1].slice(0, -1),
        hooks: [],
        tests : [
            {
                uid : 'some test1',
                title : 'some test',
                state : 'passed',
            },
            {
                uid : 'a failed test',
                title : 'a test with two failures',
                state : 'failed',
                errors : [
                    {
                        message : 'expected the party on the first part to be the party on the first part',
                        stack : 'First failed stack trace'
                    },
                    {
                        message : 'expected the party on the second part to be the party on the second part',
                        stack : 'Second failed stack trace'
                    }
                ]
            }
        ],
    },
]
 
export const SUITES_NO_TESTS = [
    {
        uid: SUITE_UIDS[0],
        title: SUITE_UIDS[0].slice(0, -1),
        tests: [],
        suites: [],
        hooks: []
    },
]
 
export const SUITES_NO_TESTS_WITH_HOOK_ERROR = [
    {
        uid: SUITE_UIDS[0],
        title: SUITE_UIDS[0].slice(0, -1),
        tests: [],
        suites: [],
        hooks: [{
            uid : 'a failed hook2',
            title : 'a failed hook',
            state : 'failed',
            error : {
                message : 'expected foo to equal bar',
                stack : 'Failed test stack trace'
            }
        }]
    },
]
 
export const REPORT = `------------------------------------------------------------------
[loremipsum #0-0] Spec: /foo/bar/baz.js
[loremipsum #0-0] Running: loremipsum
[loremipsum #0-0]
[loremipsum #0-0] Foo test
[loremipsum #0-0]    green ✓ foo
[loremipsum #0-0]    green ✓ bar
[loremipsum #0-0]
[loremipsum #0-0] Bar test
[loremipsum #0-0]    green ✓ some test
[loremipsum #0-0]    red ✖ a failed test
[loremipsum #0-0]    red ✖ a failed test with no stack
[loremipsum #0-0]
[loremipsum #0-0] Baz test
[loremipsum #0-0]    green ✓ foo bar baz
[loremipsum #0-0]    cyan - a skipped test
[loremipsum #0-0]
[loremipsum #0-0] green 4 passing (5s)
[loremipsum #0-0] red 1 failing
[loremipsum #0-0] cyan 1 skipped
[loremipsum #0-0]
[loremipsum #0-0] 1) Bar test a failed test
[loremipsum #0-0] red expected foo to equal bar
[loremipsum #0-0] gray Failed test stack trace
[loremipsum #0-0]
[loremipsum #0-0] 2) Bar test a failed test with no stack
[loremipsum #0-0] red expected foo to equal bar
`
 
export const SAUCELABS_REPORT = REPORT + `[loremipsum #0-0]
[loremipsum #0-0] Check out job at https://app.saucelabs.com/tests/ba86cbcb70774ef8a0757c1702c3bdf9
`
 
export const SAUCELABS_EU_REPORT = REPORT + `[loremipsum #0-0]
[loremipsum #0-0] Check out job at https://app.eu-central-1.saucelabs.com/tests/ba86cbcb70774ef8a0757c1702c3bdf9
`
 
export const SAUCELABS_HEADLESS_REPORT = REPORT + `[loremipsum #0-0]
[loremipsum #0-0] Check out job at https://app.us-east-1.saucelabs.com/tests/ba86cbcb70774ef8a0757c1702c3bdf9
`