Skip to content

Commit

Permalink
Merge branch 'main' into renovate/all-minor-patch
Browse files Browse the repository at this point in the history
  • Loading branch information
mrazian85 committed Sep 5, 2023
2 parents 02cfdd4 + 279a428 commit a05af35
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/components/AgentCard/Timer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export interface TimerProps {

export const Timer = ({ agentStatus }: TimerProps) => {
const [count, setCount] = useState(0);
const timerIdRef = useRef<undefined | NodeJS.Timer>(undefined);
const timerIdRef = useRef<undefined | NodeJS.Timeout>(undefined);
const hour: number = Math.floor(count / 3600);
const minute: number = Math.floor((count - hour * 3600) / 60);
const seconds: number = count - (hour * 3600 + minute * 60);
Expand Down
22 changes: 16 additions & 6 deletions src/components/Pagination/Pagination.cypresstest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,27 +45,37 @@ describe("Pagination component", () => {

cy.get(navItems).last().click();

cy.focused().should("have.text", "20");
cy.focused();

cy.get(navItems).first().click();
cy.should("have.text", "20");

cy.focused().should("have.text", "1");
cy.get(navItems);

cy.first().click();

cy.focused();

cy.should("have.text", "1");
});

it("should navigate smoothly via tabbing", () => {
cy.mount(<Default />);

cy.get("#default-pagination").click();
cy.get("#default-pagination");
cy.click();
cy.realPress("Tab"); // 1
cy.realPress("Tab"); // 2
cy.realPress("Tab"); // 3
cy.realPress("Enter");
cy.focused().should("have.text", "3");
cy.focused();
cy.should("have.text", "3");

cy.realPress(["Shift", "Tab"]); // 2
cy.realPress(["Shift", "Tab"]); // 1
cy.realPress("Enter");

cy.focused().should("have.text", "1");
cy.focused();

cy.should("have.text", "1");
});
});

0 comments on commit a05af35

Please sign in to comment.