test(awesomebar): Remove unnecessary delay
This commit is contained in:
parent
eb63faaf05
commit
08bb03abd6
1 changed files with 14 additions and 25 deletions
|
|
@ -7,50 +7,39 @@ context("Awesome Bar", () => {
|
|||
|
||||
beforeEach(() => {
|
||||
cy.get(".navbar .navbar-home").click();
|
||||
cy.findByPlaceholderText("Search or type a command (Ctrl + G)").clear();
|
||||
cy.findByPlaceholderText("Search or type a command (Ctrl + G)").as("awesome_bar");
|
||||
cy.get("@awesome_bar").type("{selectall}");
|
||||
});
|
||||
|
||||
it("navigates to doctype list", () => {
|
||||
cy.findByPlaceholderText("Search or type a command (Ctrl + G)").type("todo", {
|
||||
delay: 700,
|
||||
});
|
||||
cy.get("@awesome_bar").type("todo");
|
||||
cy.wait(100);
|
||||
cy.get(".awesomplete").findByRole("listbox").should("be.visible");
|
||||
cy.findByPlaceholderText("Search or type a command (Ctrl + G)").type("{enter}", {
|
||||
delay: 700,
|
||||
});
|
||||
|
||||
cy.get("@awesome_bar").type("{enter}");
|
||||
cy.get(".title-text").should("contain", "To Do");
|
||||
|
||||
cy.location("pathname").should("eq", "/app/todo");
|
||||
});
|
||||
|
||||
it("find text in doctype list", () => {
|
||||
cy.findByPlaceholderText("Search or type a command (Ctrl + G)").type(
|
||||
"test in todo{enter}",
|
||||
{ delay: 700 }
|
||||
);
|
||||
|
||||
cy.get("@awesome_bar").type("test in todo");
|
||||
cy.wait(100);
|
||||
cy.get("@awesome_bar").type("{enter}");
|
||||
cy.get(".title-text").should("contain", "To Do");
|
||||
|
||||
cy.findByPlaceholderText("ID").should("have.value", "%test%");
|
||||
cy.clear_filters();
|
||||
});
|
||||
|
||||
it("navigates to new form", () => {
|
||||
cy.findByPlaceholderText("Search or type a command (Ctrl + G)").type(
|
||||
"new blog post{enter}",
|
||||
{ delay: 700 }
|
||||
);
|
||||
|
||||
cy.get("@awesome_bar").type("new blog post");
|
||||
cy.wait(100);
|
||||
cy.get("@awesome_bar").type("{enter}");
|
||||
cy.get(".title-text:visible").should("have.text", "New Blog Post");
|
||||
});
|
||||
|
||||
it("calculates math expressions", () => {
|
||||
cy.findByPlaceholderText("Search or type a command (Ctrl + G)").type(
|
||||
"55 + 32{downarrow}{enter}",
|
||||
{ delay: 700 }
|
||||
);
|
||||
|
||||
cy.get("@awesome_bar").type("55 + 32");
|
||||
cy.wait(100);
|
||||
cy.get("@awesome_bar").type("{downarrow}{enter}");
|
||||
cy.get(".modal-title").should("contain", "Result");
|
||||
cy.get(".msgprint").should("contain", "55 + 32 = 87");
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue