Skip to content

Commit 3ec925a

Browse files
nursoltan-stc_user
andauthored
fix phase creation test (#4396)
Co-authored-by: tc_user <vijay.86@wipro.com>
1 parent 00ff406 commit 3ec925a

File tree

2 files changed

+2
-41
lines changed

2 files changed

+2
-41
lines changed

connect-automation/conf.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ exports.config = {
4141
'../temp/test-suites/project-creation-flow/create-project.spec.js',
4242
'../temp/test-suites/project-creation-flow/invite-copilot.spec.js',
4343
'../temp/test-suites/project-creation-flow/projects.spec.js',
44-
//'../temp/test-suites/phase-creation-flow/create-new-phase.spec.js'
44+
'../temp/test-suites/phase-creation-flow/create-new-phase.spec.js'
4545
],
4646

4747
// Options to be passed to Jasmine.

connect-automation/page-objects/phase-creation-flow/create-new-phase/create-new-phase.helper.ts

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,7 @@ export class CreateNewPhaseHelper {
2121
public static async verifyCreateNewPhase(formData: IPhaseCreationData) {
2222
await this.clickOnAddNewPhaseButton();
2323
await this.fillCreatePhaseForm(formData.title, formData.daysBetweenStartAndEndDate);
24-
// Fill report form
25-
await this.fillMilestoneForm(0, formData.reportName);
26-
await this.createNewPhasePageObject.addMilestoneButton.click();
27-
// Fill deliverable review form
28-
await this.fillMilestoneForm(1, formData.deliverableReviewName, 'Deliverable Review');
29-
await this.createNewPhasePageObject.addMilestoneButton.click();
30-
// Fill final deliverable review form
31-
await this.fillMilestoneForm(2, formData.finalDeliverableReviewName, 'Final Deliverable Review');
32-
24+
3325
await BrowserHelper.sleep(3000);
3426
await this.createNewPhasePageObject.publishButton.click();
3527

@@ -75,35 +67,4 @@ export class CreateNewPhaseHelper {
7567
await this.createNewPhasePageObject.endDateInput().sendKeys(endDate);
7668
logger.info(`Filled end date field with: ${endDate.slice(2)}`);
7769
}
78-
79-
/**
80-
* Create and Fill milestone form
81-
* @param appendix numeric indicator of added milestone form
82-
* @param name name field
83-
* @param type type field
84-
*/
85-
private static async fillMilestoneForm(appendix: number, name: string, type?: string, ) {
86-
await BrowserHelper.sleep(3000);
87-
if (type) {
88-
const types = await this.createNewPhasePageObject.allTypeInput();
89-
await types[appendix].click();
90-
await BrowserHelper.sleep(500);
91-
await this.createNewPhasePageObject.getOptionFromTypeDropdown(type).click();
92-
}
93-
// Fill name field
94-
const nameInput = this.createNewPhasePageObject.nameInput(appendix.toString());
95-
await nameInput.clear();
96-
await nameInput.sendKeys(name);
97-
logger.info(`Filled name field with: ${name}`);
98-
99-
// Fill start date field
100-
const startDate = moment().format(CommonHelper.dateFormat());
101-
await this.createNewPhasePageObject.startDateInput(appendix.toString()).sendKeys(startDate);
102-
logger.info(`Filled start date field with: ${startDate.slice(2)}`);
103-
104-
// Fill end date field
105-
const endDate = moment().add(1, 'days').format(CommonHelper.dateFormat());
106-
await this.createNewPhasePageObject.endDateInput(appendix.toString()).sendKeys(endDate);
107-
logger.info(`Filled end date field with: ${endDate.slice(2)}`);
108-
}
10970
}

0 commit comments

Comments
 (0)