-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More UI tests based on Users flow written. Secured the tests with using data-cy instead of ID.
- Loading branch information
1 parent
d4a2d85
commit d7fe170
Showing
8 changed files
with
160 additions
and
9 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,43 @@ | ||
/** | ||
* This test will only work while the EC2 machines are running. | ||
*/ | ||
|
||
/// <reference types="cypress" /> | ||
|
||
context('Check Navbar Items', () => { | ||
before(() => { | ||
// cy.visit('http://18.219.76.94') | ||
cy.visit('http://localhost:8080') | ||
cy.get('[data-cy=settings]').click() | ||
}) | ||
|
||
it('Should have a search bar', () => { | ||
cy.get('[data-cy=container').find("#searchbar") | ||
}) | ||
|
||
it('Should be a download off button', () => { | ||
const t = cy.get('[data-cy=download-off]') | ||
expect(t).to.exist | ||
}) | ||
|
||
it('Should be a heart button', () => { | ||
const t = cy.get('[data-cy=heart]') | ||
expect(t).to.exist | ||
}) | ||
|
||
it('Should be a bell button', () => { | ||
const t = cy.get('[data-cy=bell]') | ||
expect(t).to.exist | ||
}) | ||
|
||
it('Should be an about button', () => { | ||
const t = cy.get('[data-cy=about]') | ||
expect(t).to.exist | ||
}) | ||
|
||
it('Should have a five links', () => { | ||
cy.get('[data-cy=drawer]').then(($result) => { | ||
assert.equal($result.children().children()[0].childElementCount,5,'Five links in the drawer') | ||
}) | ||
}) | ||
}) |
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,37 @@ | ||
/** | ||
* This test will only work while the EC2 machines are running. | ||
*/ | ||
|
||
/// <reference types="cypress" /> | ||
|
||
context('RemoteConnections', () => { | ||
before(() => { | ||
cy.visit('http://18.219.76.94') | ||
cy.get('[data-cy=settings]').click() | ||
}) | ||
|
||
it('Should have a title card', () => { | ||
cy.get('[data-cy=titlecard]').contains('Connection details') | ||
}) | ||
|
||
it('Should have a local ambianic edge title card', () => { | ||
cy.get('[data-cy=localtitlecard]').contains('Connect to local Ambianic Edge') | ||
}) | ||
|
||
it('Should have a remote ambianic edge title card', () => { | ||
cy.get('[data-cy=remotetitlecard]').contains('Connect to remote Ambianic Edge') | ||
}) | ||
|
||
it('Should have remote connection button disabled', () => { | ||
cy.get('[data-cy=sendRemotePeerID]').should('be.disabled') | ||
}) | ||
|
||
it('Should have remote connection button enabled', () => { | ||
cy.get('[data-cy=remotePeerID]').type('917d5f0a-6469-4d33-b5c2-efd858118b74') | ||
cy.get('[data-cy=sendRemotePeerID]').should('be.enabled') | ||
}) | ||
|
||
it('Should have a row', () => { | ||
cy.get('[data-cy=template-row]').should('exist') | ||
}) | ||
}) |
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,45 @@ | ||
/** | ||
* This test will only work while the EC2 machines are running. | ||
*/ | ||
|
||
/// <reference types="cypress" /> | ||
|
||
context('RemoteConnections', () => { | ||
beforeEach(() => { | ||
cy.visit('http://18.219.76.94') | ||
}) | ||
|
||
it('Should browse to timeline', () => { | ||
cy.get('[data-cy=timeline]').click() | ||
|
||
cy.url().should('include', '/timeline') | ||
}) | ||
|
||
it('Should render connection card', () => { | ||
cy.get('[data-cy=timeline]').click() | ||
|
||
cy.get('.mx-auto').contains('Connecting to Ambianic Edge device...') | ||
}) | ||
|
||
/** | ||
* This will be removed once we have decided on the flow | ||
* for future layout/flow in UI / Edge connection | ||
*/ | ||
it('Should browse to edgeconnect', () => { | ||
cy.get('[data-cy=timeline]').click() | ||
|
||
cy.wait(500) | ||
|
||
cy.get('[data-cy=settings]').click() | ||
|
||
cy.url().should('include', '/edge-connect') | ||
}) | ||
|
||
it('Should generate no results in timeline', () => { | ||
cy.get('[data-cy=timeline]').click() | ||
|
||
cy.wait(5000) | ||
|
||
cy.get('.infinite-status-prompt').contains('No results :(') | ||
}) | ||
}) |
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
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