Skip to content

Commit

Permalink
ui: Fix e2e-tests
Browse files Browse the repository at this point in the history
- Currencies: The format of the test has been changed to correctly fetch
the created project to check for the currency symbol
- Overview: Console log statement is removed and formatting
  • Loading branch information
mathiashoeld committed Jul 16, 2019
1 parent 8f1c65f commit 7a86890
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
6 changes: 2 additions & 4 deletions e2e-test/cypress/integration/currencies_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,8 @@ describe("Overview Page", function() {
//Fetch projects to get newest one
cy.reload();

cy.get("[aria-label=project]")
.contains("Test")
.parents()
.filter("[aria-label=project]")
cy.get("[data-test*=projectcard]")
.last()
.find("[data-test=projectbudget]")
.should("contain", currencies.EUR.symbol);
});
Expand Down
9 changes: 2 additions & 7 deletions e2e-test/cypress/integration/overview_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,8 @@ describe("Overview Page", function() {
cy.get("[data-test=projectcard-0]")
.eq(0)
.then($card => {
console.log($card.find("[data-test=projectheader] span"));
expect(
$card.find("[data-test=projectheader] span").eq(0)
).to.contains.text(this.data.displayName);
expect($card.find("[data-test=projectheader] span").eq(2)).to.have.text(
"Status: Open"
);
expect($card.find("[data-test=projectheader] span").eq(0)).to.contains.text(this.data.displayName);
expect($card.find("[data-test=projectheader] span").eq(2)).to.have.text("Status: Open");
expect(
$card
.find("[data-test=projectbudget]")
Expand Down

0 comments on commit 7a86890

Please sign in to comment.