-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #313: Added tests for a guest user to see the list page when th…
…ere are no torrents in the index 6d6806d refactor: [#310] change describe to Users (Mario) 8e9b04c refactor: [#310] fix minor typo in function name (Mario) b1e9ab6 test: [#310] added tests for a guest user to see the list page when there are no torrents in the index (MMelchor) Pull request description: Resolves #310. ACKs for top commit: josecelano: ACK 6d6806d Tree-SHA512: 5138f0b1a6ba3e4162c0ea30f78629abf879fbccbf2068949729ac1a353bd5e34ff57c29b370a664d367857b9de67ce29451660a1b92a204b10b2f11f75b3198
- Loading branch information
Showing
6 changed files
with
90 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
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
14 changes: 14 additions & 0 deletions
14
cypress/e2e/contexts/torrent/specs/list/no_torrents_to_display.cy.ts
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,14 @@ | ||
import { baseURL } from "nuxt/dist/core/runtime/nitro/paths"; | ||
|
||
describe("Users", () => { | ||
before(() => { | ||
// Deletes all torrents and their related info from the database so the test can pass | ||
cy.clear_torrents_info_from_database(); | ||
}); | ||
|
||
it("Should be able to see the list page when there are no torrents", () => { | ||
cy.visit("/torrents"); | ||
cy.url().should("match", /\/torrents$/); | ||
cy.get("[data-cy=\"no-results-element\"]").invoke("text").should("match", /No results./i); | ||
}); | ||
}); |
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
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