Skip to content

Commit

Permalink
Tailwinds SampleDetails.tsx (#5631)
Browse files Browse the repository at this point in the history
* fixes #4981

* minor fix for resource date filters

---------
  • Loading branch information
rithviknishad authored Jun 12, 2023
1 parent 61d0549 commit f49ac41
Show file tree
Hide file tree
Showing 2 changed files with 187 additions and 178 deletions.
34 changes: 30 additions & 4 deletions cypress/e2e/resource_spec/filter.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,42 @@ describe("Resource filter", () => {

it("filter by created date", () => {
cy.intercept(/\/api\/v1\/resource/).as("resource_filter");
cy.get("[name='created_date_after']").type("22/05/2020");
cy.get("[name='created_date_before']").type("09/09/2021");
cy.get("[name='created_date_after']").click();
cy.get(
"[role='button'][aria-label='Move backward to switch to the previous month.']"
).click();
cy.get("td[tabindex='-1']")
.first()
.then(($td) => {
$td[0].click();

cy.get("td[tabindex='-1']")
.eq(14)
.then(($td2) => {
$td2[0].click();
});
});
cy.contains("Apply").click();
cy.wait("@resource_filter");
});

it("filter by modified date", () => {
cy.intercept(/\/api\/v1\/resource/).as("resource_filter");
cy.get("[name='modified_date_after']").type("22/05/2020");
cy.get("[name='modified_date_before']").type("09/09/2021");
cy.get("[name='modified_date_after']").click();
cy.get(
"[role='button'][aria-label='Move backward to switch to the previous month.']"
).click();
cy.get("td[tabindex='-1']")
.first()
.then(($td) => {
$td[0].click();

cy.get("td[tabindex='-1']")
.eq(14)
.then(($td2) => {
$td2[0].click();
});
});
cy.contains("Apply").click();
cy.wait("@resource_filter");
});
Expand Down
Loading

0 comments on commit f49ac41

Please sign in to comment.