Set branch also in manual testing

This commit is contained in:
Fredrik Wollsén 2019-02-21 15:56:33 +02:00
Родитель 51e6e38284
Коммит 164058e350
1 изменённых файлов: 9 добавлений и 0 удалений

Просмотреть файл

@ -10,6 +10,7 @@ const STUDY_TYPE = process.env.STUDY_TYPE || "shield";
const LOG_LEVEL = process.env.LOG_LEVEL || "info";
const EXPIRE_SECONDS = process.env.EXPIRE_SECONDS || false;
const EXPIRED = process.env.EXPIRED || false;
const BRANCH = process.env.BRANCH || "treatment";
const run = async studyType => {
const driver = await utils.setupWebdriver.promiseSetupDriver(
@ -46,6 +47,14 @@ const run = async studyType => {
true,
);
}
if (BRANCH) {
// Set preference that forces the selection of a specific branch
await utils.preferences.set(
driver,
`extensions.${widgetId}.test.variationName`,
BRANCH,
);
}
await utils.preferences.set(driver, `shieldStudy.logLevel`, LOG_LEVEL);
await utils.preferences.set(
driver,