Skip to content

Commit 5f5f446

Browse files
Merge pull request #99 from seanpoulter/github-workflow
ci: Add GitHub Workflow
2 parents 2f6c4de + 8a8fd38 commit 5f5f446

File tree

6 files changed

+40
-29
lines changed

6 files changed

+40
-29
lines changed

.github/workflows/ci.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
name: CI
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
node-version: ['14', '16']
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Use Node.js v${{ matrix.node-version }}
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: ${{ matrix.node-version }}
22+
- name: Install dependencies
23+
run: |
24+
npm ci
25+
- name: Build
26+
run: npm run build --if-present
27+
- name: Run Tests
28+
run: |
29+
npm run test:ci
30+
npm run e2e:protractor
31+
env:
32+
CHROMEDRIVER_FILEPATH: /usr/local/share/chromedriver-linux64/chromedriver
33+
34+
timeout-minutes: 10

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v14.21.3

.travis.yml

-24
This file was deleted.

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Build Status](https://travis-ci.org/Georgegriff/query-selector-shadow-dom.svg?branch=main)](https://travis-ci.org/Georgegriff/query-selector-shadow-dom) [![npm version](https://badge.fury.io/js/query-selector-shadow-dom.svg)](https://badge.fury.io/js/query-selector-shadow-dom) [![codecov](https://codecov.io/gh/Georgegriff/query-selector-shadow-dom/branch/main/graph/badge.svg)](https://codecov.io/gh/Georgegriff/query-selector-shadow-dom)
1+
[![Build Status](https://travis-ci.org/Georgegriff/query-selector-shadow-dom.svg?branch=main)](https://travis-ci.org/Georgegriff/query-selector-shadow-dom) [![npm version](https://badge.fury.io/js/query-selector-shadow-dom.svg)](https://badge.fury.io/js/query-selector-shadow-dom)
22

33
# query-selector-shadow-dom
44

@@ -227,7 +227,7 @@ querySelectorShadowDom.querySelectorAllDeep("child", iframe.contentDocument);
227227
```
228228

229229
This library does not allow you to query across iframe boundaries, you will need to get a reference to the iframe you want to interact with. </br>
230-
If your iframe is inside of a shadow root you could cuse `querySelectorDeep` to find the iframe, then pass the `contentDocument` into the 2nd argument of `querySelectorDeep` or `querySelectorAllDeep`.
230+
If your iframe is inside of a shadow root you could use `querySelectorDeep` to find the iframe, then pass the `contentDocument` into the 2nd argument of `querySelectorDeep` or `querySelectorAllDeep`.
231231

232232
### Chrome downloads page
233233

@@ -258,7 +258,7 @@ If using the polyfills and shady DOM, this library will still work.
258258
## Importing
259259

260260
- Shipped as an ES6 module to be included using a bundler of your choice (or not).
261-
- ES5 version bundled ontop the window as `window.querySelectorShadowDom` available for easy include into a test framework
261+
- ES5 version bundled on top the window as `window.querySelectorShadowDom` available for easy include into a test framework
262262

263263
## Running the code locally
264264

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"lint": "eslint src/**/*.js",
1010
"build": "rollup -c",
1111
"test": "karma start",
12-
"test:ci": "karma start --browsers ChromeHeadless,Firefox",
12+
"test:ci": "karma start --browsers ChromeHeadless,FirefoxHeadless",
1313
"e2e:protractor": "protractor protractor.conf.js",
1414
"watch": "npm-watch",
1515
"selenium": "./node_modules/.bin/selenium-standalone install && ./node_modules/.bin/selenium-standalone start"

protractor.conf.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
exports.config = {
22
baseUrl: 'http://localhost:3000',
33

4-
chromeDriver: require(`chromedriver/lib/chromedriver`).path,
4+
chromeDriver: process.env.CHROMEDRIVER_FILEPATH || require(`chromedriver/lib/chromedriver`).path,
55
SELENIUM_PROMISE_MANAGER: false,
66
directConnect: true,
77

0 commit comments

Comments
 (0)