Skip to content

Commit

Permalink
modify-compile-task-method
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafa committed Oct 22, 2024
1 parent 82ad27e commit 44cff97
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tests/e2e/default/tasks/tasks-breadcrumbs.wdio-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ describe('Tasks tab breadcrumbs', () => {

const formsPath = path.join(__dirname, 'forms');
await chtConfUtils.compileAndUploadAppForms(formsPath);
await tasksPage.compileTasks('tasks-breadcrumbs-config.js');
await tasksPage.compileTasks('tasks-breadcrumbs-config.js', false);
});

after(async () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/default/tasks/tasks-group.wdio-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ describe('Tasks group landing page', () => {

const formsPath = path.join(__dirname, 'forms');
await chtConfUtils.compileAndUploadAppForms(formsPath);
await tasksPage.compileTasks('tasks-group-config.js');
await tasksPage.compileTasks('tasks-group-config.js', false);
});

after(async () => {
Expand Down
6 changes: 3 additions & 3 deletions tests/e2e/default/tasks/tasks.wdio-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ describe('Tasks', () => {
});

it('should load multiple pages of tasks on infinite scrolling', async () => {
await tasksPage.compileTasks('tasks-multiple-config.js');
await tasksPage.compileTasks('tasks-multiple-config.js', true);

await commonPage.goToTasks();
const list = await tasksPage.getTasks();
Expand Down Expand Up @@ -113,7 +113,7 @@ describe('Tasks', () => {
});

it('should remove task from list when CHW completes a task successfully', async () => {
await tasksPage.compileTasks('tasks-breadcrumbs-config.js');
await tasksPage.compileTasks('tasks-breadcrumbs-config.js', true);

await commonPage.goToTasks();
let list = await tasksPage.getTasks();
Expand All @@ -129,7 +129,7 @@ describe('Tasks', () => {
});

it('Should show error message for bad config', async () => {
await tasksPage.compileTasks('tasks-error-config.js');
await tasksPage.compileTasks('tasks-error-config.js', true);
await commonPage.goToTasks();

const { errorMessage, url, username, errorStack } = await commonPage.getErrorLog();
Expand Down
4 changes: 2 additions & 2 deletions tests/page-objects/default/tasks/tasks.wdio.page.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ const openTaskById = async (id, taskType) => {
await $(TASK_FORM_SELECTOR).waitForDisplayed();
};

const compileTasks = async (tasksFileName) => {
const compileTasks = async (tasksFileName, sync) => {
await chtConfUtils.initializeConfigDir();
const tasksFilePath = path.join(__dirname, `../../../e2e/default/tasks/config/${tasksFileName}`);
const settings = await chtConfUtils.compileNoolsConfig({ tasks: tasksFilePath });
await utils.updateSettings(settings, { ignoreReload: 'api', sync: true });
await utils.updateSettings(settings, { ignoreReload: 'api', sync });
};

const isTaskElementDisplayed = async (type, text) => {
Expand Down

0 comments on commit 44cff97

Please sign in to comment.