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

Start browsers with clean profile by default #1792

Merged

Conversation

AndreyBelym
Copy link
Contributor

@AndreyBelym AndreyBelym commented Sep 18, 2017

Copy link
Contributor

@AlexanderMoskovkin AlexanderMoskovkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

allow to set a custom profile via --user-data-dir or -profile flags (testcafe "firefox -profile MyProfile" test.js). We've discussed it in private

Copy link
Contributor

@AlexanderMoskovkin AlexanderMoskovkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice job! a few minor remarks

if (config.path)
firefoxInfo = await browserTools.getBrowserInfo(config.path);
else
firefoxInfo = await browserTools.getBrowserInfo(browserName);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

firefoxInfo = await browserTools.getBrowserInfo(config.path || browserName);

return match && match !== '0' && match !== 'false';
}

export function useSystemProfile (array) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems this is redundant



const HEADLESS_DEFAULT_WIDTH = 1280;
const HEADLESS_DEFAULT_HEIGHT = 800;

const CONFIG_TERMINATOR_RE = /(\s+|^)-/;
const MODES_LIST = ['userProfile', 'headless', 'emulation'];
Copy link
Contributor

@AlexanderMoskovkin AlexanderMoskovkin Sep 21, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel MODE_LIST is more correctly.
But maybe it's more appropriate to use AVAILABLE_MODES here

return result;
}

export function getPathFromParsedModes (modesList, possibleModes = []) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to use modes, availableModes = [] here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

modes, availableModes = []



const CONFIG_TERMINATOR_RE = /(\s+|^)-/;
const SYSTEM_PROFILE_OPTION_RE = /^useSystemProfile=(.*)$/;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've changed it to userProfile? Am I right?

@testcafe-build-bot
Copy link
Collaborator

❌ Tests for the commit 7ca7b33 have failed. See details:

@testcafe-build-bot
Copy link
Collaborator

❌ Tests for the commit 031e55a have failed. See details:

Copy link
Contributor

@AlexanderMoskovkin AlexanderMoskovkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebase to the upsteram to fix the client tests

return result;
}

export function getPathFromParsedModes (modesList, possibleModes = []) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

modes, availableModes = []

return path;
}

export function getModes (modesList, availableModes = []) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

modes, availableModes = []

@testcafe-build-bot
Copy link
Collaborator

❌ Tests for the commit 031e55a have failed. See details:

@AlexanderMoskovkin AlexanderMoskovkin merged commit 4d66894 into DevExpress:master Sep 26, 2017
kirovboris pushed a commit to kirovboris/testcafe-phoenix that referenced this pull request Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Start browser in a clean/empty profile when running locally
3 participants