-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: try lost pixel #67
base: main
Are you sure you want to change the base?
Changes from all commits
58d60c8
91d6539
ef05a0b
7224dfa
1429256
d55cf5c
d03c6de
4831e1a
3ba8767
c6880c4
a7465e0
dbcf242
c31aaf3
b9e48f3
f45f130
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Regression | ||
|
||
on: | ||
pull_request: | ||
branches: ["*"] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Build packages | ||
run: npm run build | ||
- name: Run preview -- --filter=pink-design | ||
run: (npm run preview -- --filter=pink-design&) | ||
- name: Sleep for 10 seconds | ||
run: sleep 10 | ||
shell: bash | ||
- name: Lost Pixel | ||
uses: lost-pixel/[email protected] | ||
env: | ||
LOST_PIXEL_API_KEY: ${{ secrets.LOST_PIXEL_API_KEY }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,22 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
pull_request: | ||
branches: ["main"] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Run Linter | ||
run: npm run lint | ||
continue-on-error: true | ||
- name: Build packages | ||
run: npm run build | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Run Linter | ||
run: npm run lint | ||
continue-on-error: true | ||
- name: Build packages | ||
run: npm run build |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
current | ||
difference |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { CustomProjectConfig, PageScreenshotParameter } from "lost-pixel"; | ||
|
||
const defaultPageOptions: Partial<PageScreenshotParameter> = { | ||
waitBeforeScreenshot: 2500 | ||
} | ||
|
||
export const config: CustomProjectConfig = { | ||
pageShots: { | ||
pages: [ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would be really cool if we found a way to generate the page list for your DS, recently we added support for programmatic page runs meaning you could generate the array, put it into json and host it statically on your ran website e.g. localhost:3000/pagesToTestWithLP.json and we just pick the info from there ✌🏼 |
||
{ | ||
path: "/elements/button", | ||
name: "buttons", | ||
...defaultPageOptions | ||
}, | ||
{ | ||
path: "/elements/card", | ||
name: "card", | ||
...defaultPageOptions | ||
}, | ||
{ | ||
path: "/elements/input-field", | ||
name: "input-field", | ||
...defaultPageOptions | ||
}, | ||
], | ||
baseUrl: "http://172.17.0.1:3333", | ||
}, | ||
lostPixelProjectId: "clf6rcb5205pmmg0ehjcxzv68", | ||
apiKey: process.env.LOST_PIXEL_API_KEY, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be set on top level in lost pixel config! Page config params can help you override the top level ones 😀