Skip to content

Commit

Permalink
Merge pull request #1 from BKristenssonAlfsson/bug/amb-fix-responsive
Browse files Browse the repository at this point in the history
Bug/amb fix responsive
  • Loading branch information
BKristenssonAlfsson authored May 4, 2020
2 parents 3d79cb5 + cbecd0b commit 8a51c59
Show file tree
Hide file tree
Showing 17 changed files with 1,818 additions and 564 deletions.
50 changes: 50 additions & 0 deletions .github/lighthouse/budget.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
[
{
"path": "/*",
"resourceSizes": [
{
"resourceType": "script",
"budget": 500
},
{
"resourceType": "stylesheet",
"budget": 120
},
{
"resourceType": "font",
"budget": 306
},
{
"resourceType": "image",
"budget": 50
},
{
"resourceType": "third-party",
"budget": 200
},
{
"resourceType": "document",
"budget": 180
},
{
"resourceType": "other",
"budget": 100
},
{
"resourceType": "total",
"budget": 650
}
],
"timings": [
{
"metric": "interactive",
"budget": 5000
},
{
"metric": "first-meaningful-paint",
"budget": 2000
}
]
}
]

10 changes: 10 additions & 0 deletions .github/lighthouse/lighthouserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"ci": {
"assert": {
"preset": "lighthouse:recommended",
"assertions": {
"first-contentful-paint": ["warn", { "minScore": 0.6 }]
}
}
}
}
48 changes: 48 additions & 0 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# This is a basic workflow to help you get started with Actions

name: Lighthouse CI

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# Runs a single command using the runners shell
- name: Run a one-line script
run: echo Hello, world!

# Runs a set of commands using the runners shell
- name: Run a multi-line script
run: |
echo Add other actions to build,
echo test, and deploy your project.
#runs the lighthouse
- name: Lighthouse CI Action
uses: treosh/lighthouse-ci-action@v2
with:
# List of URL(s) to analyze
urls: 'https://ui.ambianic.ai/'
budgetPath: '.github/lighthouse/budget.json' # test performance budgets
configPath: '.github/lighthouse/lighthouserc.json'
# Path to a LHCI lighthouserc.json file
# Opt-out of saving Lighthouse results as an action artifacts
uploadArtifacts: false
# Number of runs to do per URL
serverBaseUrl: ${{ secrets.LHCI_SERVER_URL }}
serverToken: ${{ secrets.LHCI_SERVER_TOKEN }}
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Semantic Versioning Changelog

## [2.2.15](https://github.com/ambianic/ambianic-ui/compare/v2.2.14...v2.2.15) (2020-05-02)


### Bug Fixes

* adds config files ([a0fc02c](https://github.com/ambianic/ambianic-ui/commit/a0fc02c14d6938a35743fba3a27c29e471c0331e))

## [2.2.14](https://github.com/ambianic/ambianic-ui/compare/v2.2.13...v2.2.14) (2020-04-21)


Expand Down
30 changes: 30 additions & 0 deletions cypress/integration/ambianic-tests/home.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/// <reference types="cypress" />
context('HomePage', () => {
beforeEach(() => {
cy.visit('/')
})

it('Loads title and subtitle', () => {
cy.get('.v-list-item__title')
.should('contain.text', 'Cozy at Home')

cy.get('.v-list-item__subtitle')
.should('contain.text', 'via Ambient Intelligence')
})

it('Loads timeline button', () => {
cy.get('#btn-timeline > .v-btn__content')
.should('contain.text', 'View Timeline')
.click()

cy.url().should('include', '/timeline')
})

it('Loads settings button', () => {
cy.get('#btn-settings > .v-btn__content')
.should('contain.text', 'Settings')
.click()

cy.url().should('include', '/settings')
})
})
Loading

0 comments on commit 8a51c59

Please sign in to comment.