<commit_before>import {frameworks, url, setOptions, initSurvey, getSurveyResult} from "../settings";
import {Selector, ClientFunction} from 'testcafe';
const assert = require('assert');
const title = `saveSurveyResult`;

const json = {
    surveyId: '0edf84f9-14f7-4944-a857-e327e1dceebb',
    surveyPostId: '8c03f02b-0b55-4cda-96b8-d1bf7c87b05d'
};

frameworks.forEach( (framework) => {
    fixture `${framework} ${title}`
        .page `https://dxsurvey.com/Home/SurveyResults/0edf84f9-14f7-4944-a857-e327e1dceebb`;

    test(`correct loading`, async t => {
        const getResultsCount = ClientFunction(() =>
            +document.querySelectorAll("dd")[2].textContent.trim());
        let oldCount;

        await t
            .typeText(`#Email`, `<EMAIL>`)
            .typeText(`#Password`, `<PASSWORD>`)
            .click(`input[value="Log in"]`);

        oldCount = await getResultsCount();

        await t
            .navigateTo(url + framework);

        await initSurvey(framework, json);

        await t
            .click(`input[type=checkbox]`)
            .click(`input[value=Complete]`)
            .navigateTo(`https://dxsurvey.com/Home/SurveyResults/0edf84f9-14f7-4944-a857-e327e1dceebb`);

        assert.equal(oldCount + 1, await getResultsCount());
    });
});<commit_msg>testcafe: added timeout<commit_after>import {frameworks, url, setOptions, initSurvey, getSurveyResult} from "../settings";
import {Selector, ClientFunction} from 'testcafe';
const assert = require('assert');
const title = `saveSurveyResult`;

const json = {
    surveyId: '0edf84f9-14f7-4944-a857-e327e<PASSWORD>',
    surveyPostId: '8c03f02b-0b55-4cda-96b8-d1bf7c87b05d'
};

frameworks.forEach( (framework) => {
    fixture `${framework} ${title}`
        .page `https://dxsurvey.com/Home/SurveyResults/0edf84f9-14f7-4944-a857-e327e1dceebb`;

    test(`correct loading`, async t => {
        const getResultsCount = ClientFunction(() =>
            +document.querySelectorAll("dd")[2].textContent.trim());
        let oldCount;

        await t
            .typeText(`#Email`, `<EMAIL>`)
            .typeText(`#Password`, `<PASSWORD>`)
            .click(`input[value="Log in"]`);

        oldCount = await getResultsCount();

        await t
            .navigateTo(url + framework);

        await initSurvey(framework, json);

        await t
            .click(`input[type=checkbox]`)
            .click(`input[value=Complete]`)
            .wait(3000)
            .navigateTo(`https://dxsurvey.com/Home/SurveyResults/0edf84f9-14f7-4944-a857-e327e1dceebb`);

        assert.equal(oldCount + 1, await getResultsCount());
    });
});
{'fraction_non_alphanumeric': 0.1547212741751991, 'fraction_numerical': 0.05726204019719378, 'mean_word_length': 2.9550224887556222, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 14, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6704925', 'n_tokens_mistral': 954, 'n_tokens_neox': 899, 'n_words': 141}