-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1399ac2
commit 8104ae8
Showing
2 changed files
with
23 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/** | ||
* TODO: Make this test independent of the other tests. | ||
*/ | ||
describe('All projects page', () => { | ||
it('switches between active and all projects', () => { | ||
cy.visit('/projects'); | ||
cy.get('[data-cy="all-projects"]').should('not.contain', 'never'); | ||
cy.contains('Show All Projects').click(); | ||
cy.get('[data-cy="all-projects"]').should('contain', 'never'); | ||
cy.contains('Show Active Projects').click(); | ||
cy.get('[data-cy="all-projects"]').should('not.contain', 'never'); | ||
}); | ||
|
||
it('shows private projects when logged in', () => { | ||
cy.visit('/projects/all'); | ||
// ProjectTest4Db is a random private project generated by previous tests | ||
cy.get('[data-cy="all-projects"]').should('not.contain', 'ProjectTest4Db'); | ||
cy.login(); | ||
cy.visit('/projects/all'); | ||
cy.get('[data-cy="all-projects"]').should('contain', 'ProjectTest4Db'); | ||
}); | ||
}); |