-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
e2e: Test dispaying of node connection status
- Loading branch information
Showing
3 changed files
with
31 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
describe("Nodes Page", function() { | ||
const organization = "KfW"; | ||
const firstNode = { | ||
accessType: "admin", | ||
connectionStatus: "Connection" | ||
}; | ||
|
||
beforeEach(function() { | ||
cy.login(); | ||
cy.visit(`/nodes`); | ||
}); | ||
|
||
it("Show nodes table", function() { | ||
cy.get("[data-test=nodes-table]").should("be.visible"); | ||
}); | ||
|
||
it("Show node connection status", function() { | ||
cy.get("#tableTitle").should("be.visible"); | ||
cy.get("[data-test=nodes-table] table tbody tr").should("have.length.above", 0); | ||
cy.get("[data-test=nodes-table] table tbody tr") | ||
.eq(0) | ||
.then($node => { | ||
expect($node.find("th")).to.contains.text(organization); | ||
const nodeCount = parseInt($node.find("td").eq(0).text().trim(), 10); | ||
expect(nodeCount).to.be.greaterThan(0); | ||
expect($node.find("td").eq(1)).to.contains.text(`${firstNode.accessType} (${firstNode.connectionStatus})`); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters