Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariachaudhry committed Nov 15, 2024
1 parent e940de6 commit e33bd73
Show file tree
Hide file tree
Showing 5 changed files with 121 additions and 121 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,18 +180,18 @@ public void verify_the_response_in_the_body_of_email_in_the_system_log_emails(St
page.getByPlaceholder("Filter").press("Enter");
assertThat(page.getByRole(AriaRole.LINK, new Page.GetByRoleOptions().setName("Emails"))).isVisible();
page.getByRole(AriaRole.LINK, new Page.GetByRoleOptions().setName("Emails")).click();
page.frameLocator("iframe[name=\"gsft_main\"]").getByLabel("Search a specific field of").selectOption("subject");
page.frameLocator("iframe[name=\"gsft_main\"]").getByLabel("Search", new FrameLocator.GetByLabelOptions().setExact(true)).click();
page.frameLocator("iframe[name=\"gsft_main\"]").getByLabel("Search", new FrameLocator.GetByLabelOptions().setExact(true)).fill(ocplTrainingRequest);
page.frameLocator("iframe[name=\"gsft_main\"]").getByLabel("Search", new FrameLocator.GetByLabelOptions().setExact(true)).press("Enter");
assertThat(page.frameLocator("iframe[name=\"gsft_main\"]").getByLabel("Emails.").locator("tbody")).containsText(ocplTrainingRequest);
page.frameLocator("iframe[name=\"gsft_main\"]").locator("(//a[@aria-label='Preview record: OCPL Training Request'])[1]").click();
page.frameLocator("iframe[name=\"gsft_main\"]").locator("//a[normalize-space()='Open Record']").isVisible();
page.frameLocator("iframe[name=\"gsft_main\"]").locator("//a[normalize-space()='Open Record']").click();
page.frameLocator("iframe[name=\"gsft_main\"]").getByRole(AriaRole.BUTTON, new FrameLocator.GetByRoleOptions().setName("Preview Email")).scrollIntoViewIfNeeded();
assertThat(page.frameLocator("iframe[name=\"gsft_main\"]").getByRole(AriaRole.BUTTON, new FrameLocator.GetByRoleOptions().setName("Preview Email"))).isVisible();
page.frameLocator("iframe[name=\"gsft_main\"]").locator("(//a[normalize-space()='Preview Email'])").click();
assertThat(page.frameLocator("iframe[name=\"gsft_main\"]").frameLocator("iframe[title=\"Preview Email\"]").getByRole(AriaRole.PARAGRAPH)).containsText("Are you requesting Compensatory Time for Travel (CTT) during this training? = Yes");
assertThat(page.frameLocator("iframe[name=\"gsft_main\"]").frameLocator("iframe[title=\"Preview Email\"]").getByRole(AriaRole.PARAGRAPH)).containsText("Are you requesting Comp Time (CT) during this training? = No");
page.frameLocator("iframe[name='gsft_main']").getByLabel("Search a specific field of").selectOption("subject");
page.frameLocator("iframe[name='gsft_main']").getByLabel("Search", new FrameLocator.GetByLabelOptions().setExact(true)).click();
page.frameLocator("iframe[name='gsft_main']").getByLabel("Search", new FrameLocator.GetByLabelOptions().setExact(true)).fill(ocplTrainingRequest);
page.frameLocator("iframe[name='gsft_main']").getByLabel("Search", new FrameLocator.GetByLabelOptions().setExact(true)).press("Enter");
assertThat(page.frameLocator("iframe[name='gsft_main']").getByLabel("Emails.").locator("tbody")).containsText(ocplTrainingRequest);
page.frameLocator("iframe[name='gsft_main']").locator("(//a[@aria-label='Preview record: OCPL Training Request'])[1]").click();
page.frameLocator("iframe[name='gsft_main']").locator("//a[normalize-space()='Open Record']").isVisible();
page.frameLocator("iframe[name='gsft_main']").locator("//a[normalize-space()='Open Record']").click();
page.frameLocator("iframe[name='gsft_main']").getByRole(AriaRole.BUTTON, new FrameLocator.GetByRoleOptions().setName("Preview Email")).scrollIntoViewIfNeeded();
assertThat(page.frameLocator("iframe[name='gsft_main']").getByRole(AriaRole.BUTTON, new FrameLocator.GetByRoleOptions().setName("Preview Email"))).isVisible();
page.frameLocator("iframe[name='gsft_main']").locator("(//a[normalize-space()='Preview Email'])").click();
assertThat(page.frameLocator("iframe[name='gsft_main']").frameLocator("iframe[title=\"Preview Email\"]").getByRole(AriaRole.PARAGRAPH)).containsText("Are you requesting Compensatory Time for Travel (CTT) during this training? = Yes");
assertThat(page.frameLocator("iframe[name='gsft_main']").frameLocator("iframe[title=\"Preview Email\"]").getByRole(AriaRole.PARAGRAPH)).containsText("Are you requesting Comp Time (CT) during this training? = No");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Feature: SNOWTRAVEL Native View Form Scenarios

@SNOWTRAVEL-124 @Chaudhryma @Smoke @Regression @playwright
Scenario: Test Create Travel Request Application Module
Given I am an authenticated DOC CGH Travel Request User
Given I am an authenticated DOC CGH Travel Request User "Dimetria Branch"
When I search "Travel Planning System", in the filter navigator,
Then I will see Modules created for the "Travel Requests", "Assigned to Me", "Assigned to My Group",and "My Approvals" underneath Travel Planning System Application

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ public static void i_will_see_modules_created_for_the_and_underneath_application
assertThat(page.getByRole(AriaRole.LINK, new Page.GetByRoleOptions().setName(myApprovals))).isVisible();
assertThat(page.getByRole(AriaRole.LIST)).containsText(myApprovals);
page.getByRole(AriaRole.LINK, new Page.GetByRoleOptions().setName(myApprovals)).click();
assertThat(page.frameLocator("iframe[name=\"gsft_main\"]").getByRole(AriaRole.BUTTON, new FrameLocator.GetByRoleOptions().setName(Travel_Request_NV_Contants.NV_MY_APPROVAL_MODULE_APPROVALS_TEXT))).isVisible();
assertThat(page.frameLocator("iframe[name=\"gsft_main\"]").getByRole(AriaRole.HEADING)).containsText(Travel_Request_NV_Contants.NV_MY_APPROVAL_MODULE_APPROVALS_TEXT);
assertThat(page.frameLocator("iframe[name='gsft_main']").getByRole(AriaRole.BUTTON, new FrameLocator.GetByRoleOptions().setName(Travel_Request_NV_Contants.NV_MY_APPROVAL_MODULE_APPROVALS_TEXT))).isVisible();
assertThat(page.frameLocator("iframe[name='gsft_main']").getByRole(AriaRole.HEADING)).containsText(Travel_Request_NV_Contants.NV_MY_APPROVAL_MODULE_APPROVALS_TEXT);
CucumberLogUtils.playwrightScreenshot(page);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,15 @@ public static void the_field_will_map_to_the_travel_start_date_field_in_the_vari
CucumberLogUtils.playwrightScreenshot(page);

CucumberLogUtils.scenario.log("---- CLICK ON THE MOST TOP RECORD AND CLICK ON OPEN RECORD BUTTON ----");
page.frameLocator("iframe[name=\"gsft_main\"]").locator("(//*[@class='list_decoration_cell col-small col-center ']//a)[1]").hover();
page.frameLocator("iframe[name=\"gsft_main\"]").locator("(//*[@class='list_decoration_cell col-small col-center ']//a)[1]").click();
page.frameLocator("iframe[name=\"gsft_main\"]").locator("//*[@class='btn btn-sm btn-default pop-over-button pull-right']").click();
page.frameLocator("iframe[name='gsft_main']").locator("(//*[@class='list_decoration_cell col-small col-center ']//a)[1]").hover();
page.frameLocator("iframe[name='gsft_main']").locator("(//*[@class='list_decoration_cell col-small col-center ']//a)[1]").click();
page.frameLocator("iframe[name='gsft_main']").locator("//*[@class='btn btn-sm btn-default pop-over-button pull-right']").click();
CucumberLogUtils.playwrightScreenshot(page);
page.frameLocator("iframe[name=\"gsft_main\"]").locator("#tabs2_section").getByText(Travel_Request_Portal_Form_Constants.VARIABLES_TAB).click();
page.frameLocator("iframe[name=\"gsft_main\"]").locator("//span[@aria-label='Trip Information']").scrollIntoViewIfNeeded();
assertThat(page.frameLocator("iframe[name=\"gsft_main\"]").getByLabel("Trip Information", new FrameLocator.GetByLabelOptions().setExact(true))).containsText(Travel_Request_Portal_Form_Constants.TRIP_INFORMATION_HEADER_TEXT);
assertThat(page.frameLocator("iframe[name=\"gsft_main\"]").getByRole(AriaRole.HEADING, new FrameLocator.GetByRoleOptions().setName(travelStartDate))).isVisible();
assertThat(page.frameLocator("iframe[name=\"gsft_main\"]").getByLabel("Variables form section")).containsText(travelStartDate);
page.frameLocator("iframe[name='gsft_main']").locator("#tabs2_section").getByText(Travel_Request_Portal_Form_Constants.VARIABLES_TAB).click();
page.frameLocator("iframe[name='gsft_main']").locator("//span[@aria-label='Trip Information']").scrollIntoViewIfNeeded();
assertThat(page.frameLocator("iframe[name='gsft_main']").getByLabel("Trip Information", new FrameLocator.GetByLabelOptions().setExact(true))).containsText(Travel_Request_Portal_Form_Constants.TRIP_INFORMATION_HEADER_TEXT);
assertThat(page.frameLocator("iframe[name='gsft_main']").getByRole(AriaRole.HEADING, new FrameLocator.GetByRoleOptions().setName(travelStartDate))).isVisible();
assertThat(page.frameLocator("iframe[name='gsft_main']").getByLabel("Variables form section")).containsText(travelStartDate);
CucumberLogUtils.playwrightScreenshot(page);
}

Expand All @@ -188,8 +188,8 @@ public static void the_field_will_map_to_the_travel_start_date_field_in_the_vari
* @param travelEndDate the value entered for the travel end date
*/
public static void the_field_will_map_to_the_travel_end_date_in_the_variables_section_of_the_ritm_in_nv(String travelEndDate) {
assertThat(page.frameLocator("iframe[name=\"gsft_main\"]").getByRole(AriaRole.HEADING, new FrameLocator.GetByRoleOptions().setName(travelEndDate))).isVisible();
assertThat(page.frameLocator("iframe[name=\"gsft_main\"]").getByLabel("Variables form section")).containsText(travelEndDate);
assertThat(page.frameLocator("iframe[name='gsft_main']").getByRole(AriaRole.HEADING, new FrameLocator.GetByRoleOptions().setName(travelEndDate))).isVisible();
assertThat(page.frameLocator("iframe[name='gsft_main']").getByLabel("Variables form section")).containsText(travelEndDate);
CucumberLogUtils.playwrightScreenshot(page);
}

Expand Down
Loading

0 comments on commit e33bd73

Please sign in to comment.