Skip to content

Commit 217efa6

Browse files
authored
Merge pull request #2058 from bcgov/dev
Dev
2 parents abb34ec + 7289673 commit 217efa6

25 files changed

Lines changed: 957 additions & 746 deletions

File tree

applications/Unity.AutoUI/cypress/e2e/ApplicationsActionBar.cy.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/// <reference types="cypress" />
22

33
import { loginIfNeeded } from "../support/auth";
4-
import { ApplicationsListPage } from "../pages/ApplicationDetailsPage";
4+
import { ApplicationsListPage } from "../pages/ApplicationsListPage";
55

66
describe("Unity Login and check data from CHEFS", () => {
77
const page = new ApplicationsListPage();
@@ -171,13 +171,12 @@ describe("Unity Login and check data from CHEFS", () => {
171171
page.switchToGrantProgram("Default Grants Program");
172172
});
173173

174-
it("Tests the existence and functionality of the Submitted Date From and Submitted Date To filters", () => {
175-
// Set date filters using page object methods
174+
it("Tests the existence and functionality of the Quick Date Range filter", () => {
175+
// Select "All time" from quick date range dropdown and verify table refreshes
176176
page
177-
.setSubmittedFromDate("2022-01-01")
177+
.selectQuickDateRange("alltime")
178178
.waitForTableRefresh()
179-
.setSubmittedToDate(page.getTodayIsoLocal())
180-
.waitForTableRefresh();
179+
.verifyQuickDateRangeValue("alltime");
181180
});
182181

183182
// With no rows selected verify the visibility of Filter, Export, Save View, and Columns.
@@ -196,7 +195,7 @@ describe("Unity Login and check data from CHEFS", () => {
196195
.verifyTableHasData()
197196
.selectMultipleRows([0, 1])
198197
.verifyActionBarExists()
199-
.clickPaymentButton()
198+
.clickPaymentButtonWithWait()
200199
.waitForPaymentModalVisible()
201200
.closePaymentModal()
202201
.verifyPaymentModalClosed();

applications/Unity.AutoUI/cypress/e2e/basicEmail.cy.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,24 @@ describe("Send an email", () => {
269269
});
270270

271271
it("Open Emails tab", () => {
272+
// Dismiss any swal2 modal that may be covering the tab
273+
cy.get("body").then(($body) => {
274+
if ($body.find(".swal2-container").length > 0) {
275+
cy.get(".swal2-container").then(($swal) => {
276+
if ($swal.find(".swal2-close").length > 0) {
277+
cy.get(".swal2-close").click({ force: true });
278+
} else if ($swal.find(".swal2-confirm").length > 0) {
279+
cy.get(".swal2-confirm").click({ force: true });
280+
} else {
281+
cy.get("body").type("{esc}", { force: true });
282+
}
283+
});
284+
cy.get(".swal2-container", { timeout: STANDARD_TIMEOUT }).should(
285+
"not.exist",
286+
);
287+
}
288+
});
289+
272290
cy.get("#emails-tab", { timeout: STANDARD_TIMEOUT })
273291
.should("exist")
274292
.should("be.visible")

applications/Unity.AutoUI/cypress/e2e/chefsdata.cy.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,12 @@ describe('Unity Login and check data from CHEFS', () => {
5959
// Ensure the search field exists
6060
cy.get('#search', { timeout: STANDARD_TIMEOUT }).should('exist')
6161

62-
// Conditionally widen Submitted Date range if the control exists
62+
// Select "All time" from quick date range to widen the search
6363
cy.get('body', { timeout: STANDARD_TIMEOUT }).then(($body) => {
64-
if ($body.find('input#submittedFromDate').length > 0) {
65-
cy.get('input#submittedFromDate', { timeout: STANDARD_TIMEOUT })
66-
.should('exist')
67-
.clear()
68-
.type('2022-01-01')
64+
if ($body.find('select#quickDateRange').length > 0) {
65+
cy.get('select#quickDateRange', { timeout: STANDARD_TIMEOUT })
66+
.should('be.visible')
67+
.select('alltime')
6968
}
7069
})
7170

0 commit comments

Comments
 (0)