Skip to content
This repository was archived by the owner on Apr 5, 2024. It is now read-only.

Commit 2404369

Browse files
authored
FF-409 update tests (#160)
1 parent e3ca08b commit 2404369

File tree

3 files changed

+20
-6
lines changed

3 files changed

+20
-6
lines changed

cypress/integration/filesystem.js

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,25 @@ import "../support/index";
33
describe("The filesystem page", () => {
44
beforeEach(() => {
55
cy.log("Login before every test");
6-
cy.loginWithUrl("/file");
6+
77
});
88

99
it("changes the url when you click on a file", () => {
10-
cy.get("div").contains("user1").click();
11-
cy.url().should("include", "/user1");
10+
cy.loginWithUrl("/file");
11+
cy.get("div.col-md-4.col-7").contains("Admin").click();
12+
cy.url().should("include", "/admin");
13+
});
14+
15+
it("goes back to the home of the filesystem", () => {
16+
cy.loginWithUrl("/file/admin");
17+
cy.get("div").contains("Home").click();
18+
cy.url().should("not.include", "/admin");
19+
});
20+
21+
it("shows error message when a path does not exist", () => {
22+
cy.loginWithUrl("/file/fghdhjghjdfhjhdfkhg/dfghjkhghjdfhj");
23+
cy.get("div").contains("Folder does not exist, or you are not allowed to see the folder.")
1224
});
1325
});
26+
27+

cypress/integration/login_spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ describe('The Home Page', () => {
66

77
it('sets auth cookie when logging in via form submission', function () {
88
// destructuring assignment of the this.currentUser object
9-
const username = 'user1';
10-
const password = '12345';
9+
const username = 'admin';
10+
const password = 'admin';
1111

1212
//cy.visit('/login')
1313

cypress/support/commands.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//
1212
// -- This is a parent command --
1313
Cypress.Commands.add('loginWithUrl', (path) => {
14-
const user = {username:"user",password:"1234"}
14+
const user = {username:"admin",password:"admin"}
1515

1616
cy.visit(path)
1717
cy.get('input[id=formBasicUsername]')

0 commit comments

Comments
 (0)