Skip to content

Commit

Permalink
Merge pull request #99 from seanpoulter/github-workflow
Browse files Browse the repository at this point in the history
ci: Add GitHub Workflow
  • Loading branch information
christian-bromann authored Mar 26, 2024
2 parents 2f6c4de + 8a8fd38 commit 5f5f446
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 29 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: CI

on:
push:
branches:
- main
pull_request:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['14', '16']
steps:
- uses: actions/checkout@v4
- name: Use Node.js v${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: |
npm ci
- name: Build
run: npm run build --if-present
- name: Run Tests
run: |
npm run test:ci
npm run e2e:protractor
env:
CHROMEDRIVER_FILEPATH: /usr/local/share/chromedriver-linux64/chromedriver

timeout-minutes: 10
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v14.21.3
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![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)
[![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)

# query-selector-shadow-dom

Expand Down Expand Up @@ -227,7 +227,7 @@ querySelectorShadowDom.querySelectorAllDeep("child", iframe.contentDocument);
```

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>
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`.
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`.

### Chrome downloads page

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

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

## Running the code locally

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"lint": "eslint src/**/*.js",
"build": "rollup -c",
"test": "karma start",
"test:ci": "karma start --browsers ChromeHeadless,Firefox",
"test:ci": "karma start --browsers ChromeHeadless,FirefoxHeadless",
"e2e:protractor": "protractor protractor.conf.js",
"watch": "npm-watch",
"selenium": "./node_modules/.bin/selenium-standalone install && ./node_modules/.bin/selenium-standalone start"
Expand Down
2 changes: 1 addition & 1 deletion protractor.conf.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
exports.config = {
baseUrl: 'http://localhost:3000',

chromeDriver: require(`chromedriver/lib/chromedriver`).path,
chromeDriver: process.env.CHROMEDRIVER_FILEPATH || require(`chromedriver/lib/chromedriver`).path,
SELENIUM_PROMISE_MANAGER: false,
directConnect: true,

Expand Down

0 comments on commit 5f5f446

Please sign in to comment.