Skip to content

Commit

Permalink
fix: improve timeline UX when p2p connection is down
Browse files Browse the repository at this point in the history
Merge pull request #594 from ivelin/master
  • Loading branch information
Ivelin Ivanov authored Mar 30, 2021
2 parents 2bf35b2 + 4f99496 commit ed47f5a
Show file tree
Hide file tree
Showing 14 changed files with 869 additions and 662 deletions.
14 changes: 14 additions & 0 deletions .gitpod.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM gitpod/workspace-full

USER root
# Install custom tools, runtime, etc.
RUN sudo apt-get update \
&& sudo apt-get install -y \
libgtk2.0-0 libgtk-3-0 libgbm-dev \
libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb \
&& sudo rm -rf /var/lib/apt/lists/*

USER gitpod
# Apply user-specific settings
# ENV ...
RUN npm install
5 changes: 4 additions & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
image:
file: .gitpod.Dockerfile

tasks:
- init: npm install && npm run build
- init: && npm audit fix && npm run build
- command: npm run serve

vscode:
Expand Down
13 changes: 8 additions & 5 deletions cypress/integration/ambianic-tests/navbar.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@ context('Check Navbar Items', () => {
cy.get('[data-cy=timeline]').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', () => {

/** future buttons
it('Should not have a search bar', () => {
cy.get('[data-cy=container').find("#searchbar")
})
it('Should not have a heart button', () => {
const t = cy.get('[data-cy=heart]')
expect(t).to.exist
})
Expand All @@ -24,6 +26,7 @@ context('Check Navbar Items', () => {
const t = cy.get('[data-cy=bell]')
expect(t).to.exist
})
*/

it('Should be an about button', () => {
const t = cy.get('[data-cy=about]')
Expand Down
6 changes: 6 additions & 0 deletions cypress/integration/ambianic-tests/remote-connection.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ context('RemoteConnections', () => {
// cy.get('#peerID').contains('5568ec87-42d8-47b0-aeea-01a125db0623')
// })

/**
This test also relies on an actual remote peer connection being established before it can verify that the input display value is hidden.
Needs to be fixed. See https://github.com/ambianic/ambianic-ui/issues/595
it('Should retrieve and display user PeerID', () => {
// cy.get('#btn-settings').click()
cy.get('#remotePeerID').type('917d5f0a-6469-4d33-b5c2-efd858118b74')
Expand All @@ -34,6 +39,7 @@ context('RemoteConnections', () => {
cy.get('#toggle-visibility').click()
cy.get('#peerId-container').should('have.value', '917d5f0a-6469-4d33-b5c2-efd858118b74')
})
*/

it('Displays elements in smaller viewports', () => {
cy.get('#remotePeerID').type('917d5f0a-6469-4d33-b5c2-efd858118b74')
Expand Down
6 changes: 1 addition & 5 deletions cypress/integration/ambianic-tests/timeline.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ context('Timeline', () => {
cy.url().should('include', '/timeline')
})

it('Should render connection card', () => {
cy.get('[data-cy=connectioncard]').contains('Connecting to Ambianic Edge device...')
})

// Try to get this to work once we have mock data

// it('Get timeline data', () => {
Expand All @@ -30,4 +26,4 @@ context('Timeline', () => {

// cy.get('.infinite-status-prompt').contains('No results :(')
// })
})
})
Loading

0 comments on commit ed47f5a

Please sign in to comment.