Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion connect-automation/conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ exports.config = {
'../temp/test-suites/project-creation-flow/create-project.spec.js',
'../temp/test-suites/project-creation-flow/invite-copilot.spec.js',
'../temp/test-suites/project-creation-flow/projects.spec.js',
//'../temp/test-suites/phase-creation-flow/create-new-phase.spec.js'
'../temp/test-suites/phase-creation-flow/create-new-phase.spec.js'
],

// Options to be passed to Jasmine.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,7 @@ export class CreateNewPhaseHelper {
public static async verifyCreateNewPhase(formData: IPhaseCreationData) {
await this.clickOnAddNewPhaseButton();
await this.fillCreatePhaseForm(formData.title, formData.daysBetweenStartAndEndDate);
// Fill report form
await this.fillMilestoneForm(0, formData.reportName);
await this.createNewPhasePageObject.addMilestoneButton.click();
// Fill deliverable review form
await this.fillMilestoneForm(1, formData.deliverableReviewName, 'Deliverable Review');
await this.createNewPhasePageObject.addMilestoneButton.click();
// Fill final deliverable review form
await this.fillMilestoneForm(2, formData.finalDeliverableReviewName, 'Final Deliverable Review');


await BrowserHelper.sleep(3000);
await this.createNewPhasePageObject.publishButton.click();

Expand Down Expand Up @@ -75,35 +67,4 @@ export class CreateNewPhaseHelper {
await this.createNewPhasePageObject.endDateInput().sendKeys(endDate);
logger.info(`Filled end date field with: ${endDate.slice(2)}`);
}

/**
* Create and Fill milestone form
* @param appendix numeric indicator of added milestone form
* @param name name field
* @param type type field
*/
private static async fillMilestoneForm(appendix: number, name: string, type?: string, ) {
await BrowserHelper.sleep(3000);
if (type) {
const types = await this.createNewPhasePageObject.allTypeInput();
await types[appendix].click();
await BrowserHelper.sleep(500);
await this.createNewPhasePageObject.getOptionFromTypeDropdown(type).click();
}
// Fill name field
const nameInput = this.createNewPhasePageObject.nameInput(appendix.toString());
await nameInput.clear();
await nameInput.sendKeys(name);
logger.info(`Filled name field with: ${name}`);

// Fill start date field
const startDate = moment().format(CommonHelper.dateFormat());
await this.createNewPhasePageObject.startDateInput(appendix.toString()).sendKeys(startDate);
logger.info(`Filled start date field with: ${startDate.slice(2)}`);

// Fill end date field
const endDate = moment().add(1, 'days').format(CommonHelper.dateFormat());
await this.createNewPhasePageObject.endDateInput(appendix.toString()).sendKeys(endDate);
logger.info(`Filled end date field with: ${endDate.slice(2)}`);
}
}