Skip to content

Commit

Permalink
Merge branch 'master' into skip-param
Browse files Browse the repository at this point in the history
  • Loading branch information
oblador committed Jun 11, 2020
2 parents 4b48306 + 8f5f5fe commit 0240db5
Show file tree
Hide file tree
Showing 46 changed files with 684 additions and 86 deletions.
75 changes: 75 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Tests

on: [push]

jobs:
unit:
name: Unit tests
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Install dependencies
run: yarn --frozen-lockfile --non-interactive --silent --ignore-scripts
- name: Run Jest
uses: tangro/actions-test@1.1.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_CONTEXT: ${{ toJson(github) }}
with:
command: test-ci

static-analysis:
name: Static analysis
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Install dependencies
run: yarn --frozen-lockfile --non-interactive --silent --ignore-scripts
- name: Run ESLint
run: yarn lint

integration-cli:
name: 'Integration tests: CLI'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Install dependencies
run: yarn --frozen-lockfile --non-interactive --silent --ignore-scripts
- name: Run integration tests
run: yarn workspace @loki/test-cli test

visual-react-dom:
name: 'Visual tests: React DOM'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Install dependencies
run: yarn --frozen-lockfile --non-interactive --silent --ignore-scripts
- name: Run loki
run: yarn workspace @loki/example-react test-ci
- name: Archive screenshots
if: ${{ failure() }}
uses: actions/upload-artifact@v1
with:
name: screenshots
path: examples/react/.loki
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ yarn-error.log
_book
.loki
!examples/*/.loki
test_results.json
2 changes: 1 addition & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Example `package.json`:
}
```

You may also use a file named `.lokirc`, `.lokirc.json` or `loki.config.js` if you don't want to pollute your `package.json`.
You may also use a file named `.lokirc`, `.lokirc.json` or `loki.config.js` (see the react example) if you don't want to pollute your `package.json`.

## `chromeSelector`

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions examples/react/loki.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
"chromeSelector": ".wrapper > *, #root > *",
"diffingEngine": "looks-same",
"configurations": {
"chrome.laptop": {
"target": "chrome.docker",
"width": 1366,
"height": 768
},
"chrome.iphone7": {
"target": "chrome.docker",
"preset": "iPhone 7"
},
"chrome.a4": {
"target": "chrome.docker",
"preset": "A4 Paper"
}
},
"fetchFailIgnore": "localhost:1234/get"
};
20 changes: 0 additions & 20 deletions examples/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,6 @@
"@storybook/react": "^5.3.13",
"loki": "^0.20.3"
},
"loki": {
"chromeSelector": ".wrapper > *, #root > *",
"diffingEngine": "looks-same",
"configurations": {
"chrome.laptop": {
"target": "chrome.docker",
"width": 1366,
"height": 768
},
"chrome.iphone7": {
"target": "chrome.docker",
"preset": "iPhone 7"
},
"chrome.a4": {
"target": "chrome.docker",
"preset": "A4 Paper"
}
},
"fetchFailIgnore": "localhost:1234/get"
},
"eslintConfig": {
"extends": "react-app"
},
Expand Down
5 changes: 5 additions & 0 deletions examples/react/src/FocusedInput.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import React from 'react';

const FocusedInput = () => <input type="text" autoFocus />;

export default FocusedInput;
Loading

0 comments on commit 0240db5

Please sign in to comment.