DevExpress / testcafe-examples

Ready-to-run examples for TestCafe
https://testcafe.io
MIT License
50 stars 53 forks source link

Example suggestions #2

Closed AndreyBelym closed 3 years ago

AndreyBelym commented 5 years ago

Mocks

Actions

Download & Upload

Request Mocks

Selectors (DONE: https://github.com/DevExpress/testcafe-examples/pull/28)

ClientFunction (DONE: https://github.com/DevExpress/testcafe-examples/pull/22)

ClientScripts

Runner & CLI

Uncategorized Scenarios

AlexKamaev commented 4 years ago

[Done - https://github.com/DevExpress/testcafe-examples/tree/master/examples/wait-for-element-property-value]

How about this one? https://stackoverflow.com/questions/58373482/wait-for-css-property/58380117#58380117

miherlosev commented 4 years ago

It's good example. But I suggest renaming it to Wait for a built-in page object property value or simplified variant Wait for ....

kirovboris commented 4 years ago

[Won't do. This question is deleted. So it's impossible to know the task details.]

Test an email sent via a test case https://stackoverflow.com/questions/60179445/testcafe-any-recipes-available-for-email-integration

AlexKamaev commented 4 years ago

[Done - https://github.com/DevExpress/testcafe-examples/tree/master/examples/set-a-custom-referrer]

What about this one https://stackoverflow.com/questions/61116376/set-referrer-for-firefox-on-test-cafe

import { RequestHook } from 'testcafe';

fixture `fixture`
    .page `http://example.com`;

export class MyRequestHook extends RequestHook {
    constructor (requestFilterRules, responseEventConfigureOpts) {
        super(requestFilterRules, responseEventConfigureOpts);
    }
    async onRequest (event) {
        event.requestOptions.headers['Referer'] = 'http://my-modified-referer.com';
    }
    async onResponse (event) {
    }
}

const hook = new MyRequestHook();

test.requestHooks(hook)('referer', async t => {
    await t.navigateTo('https://www.whatismyreferer.com/');

    await t.debug();
});
Farfurix commented 4 years ago

[Won't do. The task is not clear]

Progress bar testing example: https://stackoverflow.com/questions/61614885/how-to-test-dymamic-progress-bar-using-testcafe

AlexSkorkin commented 4 years ago

+ https://stackoverflow.com/questions/1349404/generate-random-string-characters-in-javascript + https://stackoverflow.com/questions/1527803/generating-random-whole-numbers-in-javascript-in-a-specific-range

miherlosev commented 4 years ago

Moved to https://github.com/DevExpress/testcafe-examples/issues/41

QR Code from programmatic API - https://github.com/DevExpress/testcafe/issues/5528#issuecomment-690929810