-
-
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.
feat: manage multiple edge devices in PWA (#757)
Closes #757 Closes #758 Closes #753 Closes #741 Closes #711 Closes #705 Closes #660 Closes #659 Closes #601 Closes #595 Closes #589 Closes #563 Closes #408 Closes #370 Closes #329 Closes #327 Closes #302 Closes #299
- Loading branch information
Ivelin Ivanov
authored
Nov 3, 2021
1 parent
9aaaff9
commit 72f72ba
Showing
75 changed files
with
41,484 additions
and
4,086 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
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 |
---|---|---|
|
@@ -4,30 +4,65 @@ image: | |
|
||
tasks: | ||
- init: | | ||
touch /tmp/.npm-lock | ||
npm install | ||
npm run prepare | ||
npm update | ||
npm audit fix | ||
npm install -g @vue/cli | ||
- command: | | ||
rm /tmp/.npm-lock | ||
- init: | | ||
echo "Waiting for npm install to complete" | ||
sleep 1 && while [ -f /tmp/.npm-lock ]; do sleep 1; done | ||
command: | | ||
echo "Starting Ambianic UI in dev mode:" | ||
npm run serve | ||
- command: | | ||
echo "Waiting for npm install to finish" | ||
npm install cypress | ||
gp await-port 8080 && gp preview $(gp url 8080)/index.html | ||
- init: | | ||
echo "Waiting for npm install to complete" | ||
sleep 1 && while [ -f /tmp/.npm-lock ]; do sleep 1; done | ||
# echo "Waiting for Ambianic UI to start..." | ||
# gp await-port 8080 && gp preview $(gp url 8080)/index.html | ||
command: | | ||
echo "Starting Ambianic PWA testsuite" | ||
# need to install cypress here because | ||
# it needs system dirs that gitpod deletes on workspace restart | ||
# https://community.gitpod.io/t/gitpod-and-cypress-disagree-on-cache/5535 | ||
npm install -g cypress | ||
npm run test | ||
- command: | | ||
- init: | | ||
echo "Waiting for npm install to complete" | ||
sleep 1 && while [ -f /tmp/.npm-lock ]; do sleep 1; done | ||
# echo "Waiting for Ambianic UI to start.." | ||
# gp await-port 8080 && gp preview $(gp url 8080)/index.html | ||
command: | | ||
echo "Starting Cypress in Interactive Mode" | ||
npm install -g cypress | ||
npm run cy:open | ||
- init: | | ||
echo "Waiting for npm install to complete" | ||
sleep 1 && while [ -f /tmp/.npm-lock ]; do sleep 1; done | ||
command: | | ||
echo "Starting http server for local HTML file preview" | ||
npx browser-sync start -s -w | ||
npm install -g browser-sync | ||
npx browser-sync start --watch --directory --server | ||
# vscode: | ||
# extensions: | ||
# - [email protected]:QHyAEoimIBiRDoL6WtEoRg== | ||
|
||
ports: | ||
- port: 8080 | ||
- port: 8080 # Ambianic UI App | ||
onOpen: open-browser | ||
- port: 6080 # Cypress Interactive Mode | ||
onOpen: open-browser | ||
- port: 3000 # Static file serve via Browsersync | ||
- port: 3001 # Browsersync dashboard | ||
- port: 8888 # Dependencies chart | ||
- port: 10000 | ||
onOpen: ignore | ||
- port: 5900 | ||
onOpen: ignore | ||
|
||
|
||
github: | ||
prebuilds: | ||
|
@@ -36,4 +71,4 @@ github: | |
|
||
vscode: | ||
extensions: | ||
- octref.vetur | ||
- octref.vetur |
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 was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/// <reference types="cypress" /> | ||
|
||
context('index.html', () => { | ||
beforeEach(() => { | ||
cy.visit('/') | ||
}) | ||
|
||
|
||
const checkViewPort = (cy, device) => { | ||
cy.viewport(device).window().then(win => { | ||
cy.title().should('eq', 'Ambianic UI') | ||
|
||
cy.get('head meta[name="description"][content*="Ambianic UI"]') | ||
|
||
cy.get('#welcome-text') | ||
.should('contain', 'Safer Home via Ambient Intelligence' ) | ||
|
||
cy.get('[data-cy=btn-continue]') | ||
.get('.v-btn__content') | ||
.contains('Continue', { matchCase: false }) | ||
}) | ||
} | ||
|
||
|
||
//Set an array of sizes | ||
const sizes = [ | ||
'iphone-5', 'iphone-6' , 'samsung-s10', 'samsung-note9', 'iphone-x', 'iphone-xr', | ||
'ipad-mini', 'ipad-2', 'macbook-11', 'macbook-13', | ||
'macbook-16' | ||
] | ||
|
||
describe('Find page elements correctly in a range of browser device viewports', () => { | ||
sizes.forEach(size => { | ||
it(`Should display elements correctly on ${size}`, () => { | ||
// ensure elements are shown on smaller viewports | ||
checkViewPort(cy, size) | ||
}) | ||
}) | ||
}) | ||
}) |
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
Oops, something went wrong.