Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The reportTestStart method called before the reportFixtureStart #4787

Closed
aleks-pro opened this issue Feb 19, 2020 · 4 comments
Closed

The reportTestStart method called before the reportFixtureStart #4787

aleks-pro opened this issue Feb 19, 2020 · 4 comments
Assignees
Labels
STATE: Auto-locked An issue has been automatically locked by the Lock bot. TYPE: bug The described behavior is considered as wrong (bug).
Milestone

Comments

@aleks-pro
Copy link
Contributor

aleks-pro commented Feb 19, 2020

The following reporter highlights the issue:

async function sleep() {
    return new Promise(resolve => {
        setTimeout(() =>{
            resolve();
        }, 100);
    });
}
module.exports = function plaginFactory (): ReporterPluginObject {
    return {
        async reportTaskStart (startTime, userAgents, testCount) {
            
        },
        async reportFixtureStart (name, path, meta) {
            console.log(`reportFixtureStart: ${name}`);
            await sleep();
        },
        async reportTestStart (name, meta) {
            console.log(`reportTestStart: ${name}`);
            await sleep();
        },
        async reportTestActionDone (apiActionName, actionInfo) {
            
        },
        async reportTestDone (name, testRunInfo, meta) {
            console.log(`reportTestDone: ${name}`);
            await sleep();
        },
        async reportTaskDone (endTime, passed, warnings, result) {
        }
    };
}
@aleks-pro aleks-pro added the TYPE: bug The described behavior is considered as wrong (bug). label Feb 19, 2020
@aleks-pro
Copy link
Contributor Author

test1.js:

import { Selector } from 'testcafe';

fixture `Fixture 1`
    .page `https://devexpress.github.io/testcafe/example`;

test('Test 1', async t => {
    await t
        .click(Selector('#developer-name'), { speed: 0.5, modifiers: { ctrl: true } })
        .typeText(Selector('#developer-name'), 'Peter')
        .click(Selector('#tried-test-cafe'))
        .drag(Selector('.ui-slider-handle.ui-corner-all.ui-state-default'), 94, -2, {
            offsetX: 8,
            offsetY: 12
        })
        .expect(Selector('#developer-name').value).eql('Peter1');
});

@aleks-pro
Copy link
Contributor Author

test2.js:

import { Selector } from 'testcafe';

fixture `Fixture 2`
    .page `https://devexpress.github.io/testcafe/example`;

test('Test 2', async t => {
});

@AndreyBelym AndreyBelym added this to the Sprint #52 milestone Feb 25, 2020
@AlexKamaev AlexKamaev self-assigned this Feb 27, 2020
AlexKamaev added a commit to AlexKamaev/testcafe that referenced this issue Feb 27, 2020
AlexKamaev added a commit to AlexKamaev/testcafe that referenced this issue Feb 28, 2020
@lock
Copy link

lock bot commented Mar 17, 2020

This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests. We recommend you ask TestCafe API, usage and configuration inquiries on StackOverflow.

@lock lock bot added the STATE: Auto-locked An issue has been automatically locked by the Lock bot. label Mar 17, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Mar 17, 2020
@AlexKamaev
Copy link
Contributor

#4951

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
STATE: Auto-locked An issue has been automatically locked by the Lock bot. TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

No branches or pull requests

3 participants