test: add test case to open search modal
This commit is contained in:
parent
ac448227be
commit
252fde05b0
1 changed files with 9 additions and 2 deletions
|
|
@ -13,8 +13,10 @@ context("Awesome Bar", () => {
|
|||
let txt = `Search or type a command (${
|
||||
window.navigator.platform === "MacIntel" ? "⌘" : "Ctrl"
|
||||
} + K)`;
|
||||
cy.findByPlaceholderText(txt).as("awesome_bar");
|
||||
cy.get("@awesome_bar").type("{selectall}");
|
||||
cy.contains(txt).as("awesome_bar_search");
|
||||
cy.get("@awesome_bar_search").click();
|
||||
cy.get("#navbar-search").as("awesome_bar");
|
||||
cy.get("#navbar-search").type("{selectall}");
|
||||
});
|
||||
|
||||
after(() => {
|
||||
|
|
@ -22,6 +24,11 @@ context("Awesome Bar", () => {
|
|||
cy.clear_filters();
|
||||
});
|
||||
|
||||
it("opens awesome bar on click", () => {
|
||||
cy.get("@awesome_bar").should("be.visible");
|
||||
cy.get("body").click(15, 40);
|
||||
});
|
||||
|
||||
it("navigates to doctype list", () => {
|
||||
cy.get("@awesome_bar").type("todo");
|
||||
cy.wait(100); // Wait a bit before hitting enter.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue