Skip to content
Snippets Groups Projects
Unverified Commit 9c1b2257 authored by Ariya Hidayat's avatar Ariya Hidayat Committed by GitHub
Browse files

Admin E2E tests: guard assertions with element visibility check (#21197)

parent b792eeda
No related branches found
No related tags found
No related merge requests found
......@@ -177,6 +177,7 @@ describe("scenarios > admin > localization", () => {
visitQuestion(1);
cy.findByTestId("loading-spinner").should("not.exist");
cy.findByTextEnsureVisible("Product ID");
// create a date filter and set it to the 'On' view to see a specific date
cy.findByText("Created At").click();
......@@ -184,6 +185,10 @@ describe("scenarios > admin > localization", () => {
cy.findByText("Previous").click();
cy.findByText("On").click();
// ensure the date picker is ready
cy.findByTextEnsureVisible("Add a time");
cy.findByTextEnsureVisible("Update filter");
// update the date input in the widget
const date = new Date();
const dateString = `${date.getFullYear()}/${date.getMonth() +
......
......@@ -181,6 +181,7 @@ describe("scenarios > admin > settings", () => {
openOrdersTable({ limit: 2 });
cy.findByTextEnsureVisible("Created At");
cy.get(".cellData")
.should("contain", "Created At")
.and("contain", "2019/2/11, 21:40");
......@@ -193,6 +194,7 @@ describe("scenarios > admin > settings", () => {
openOrdersTable({ limit: 2 });
cy.findByTextEnsureVisible("Created At");
cy.get(".cellData").and("contain", "2019/2/11, 9:40 PM");
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment