test: Fix navigation test

This commit is contained in:
Suraj Shetty 2023-06-20 10:50:50 +05:30
parent 08bb03abd6
commit ddadee3f3d

View file

@ -1,21 +1,26 @@
context("Navigation", () => {
before(() => {
cy.visit("/login");
cy.login();
cy.visit("/app/website");
});
it("Navigate to route with hash in document name", () => {
cy.insert_doc("ToDo", {
__newname: "ABC#123",
description: "Test this",
ignore_duplicate: true,
});
cy.visit("/app/todo/ABC#123");
cy.insert_doc(
"ToDo",
{
__newname: "ABC#123",
description: "Test this",
},
true
);
cy.visit(`/app/todo/${encodeURIComponent("ABC#123")}`);
cy.title().should("eq", "Test this - ABC#123");
cy.get_field("description", "Text Editor").contains("Test this");
cy.go("back");
cy.title().should("eq", "Website");
});
it.only("Navigate to previous page after login", () => {
it("Navigate to previous page after login", () => {
cy.visit("/app/todo");
cy.get(".page-head").findByTitle("To Do").should("be.visible");
cy.clear_filters();