Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .github/workflows/lightpanda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Lightpanda Helper Tests

on:
push:
branches:
- 4.x
pull_request:
branches:
- '**'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

permissions:
contents: read

env:
CI: true
FORCE_COLOR: 1
LIGHTPANDA_DISABLE_TELEMETRY: true

jobs:
build:
runs-on: ubuntu-22.04
timeout-minutes: 15

strategy:
matrix:
node-version: [22.x]

steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
- uses: shivammathur/setup-php@v2
with:
php-version: 8.0
- name: npm install
run: npm i --force
- name: Download Lightpanda
run: |
mkdir -p ~/lightpanda-bin
curl -sfL --retry 3 -o ~/lightpanda-bin/lightpanda https://github.com/lightpanda-io/browser/releases/latest/download/lightpanda-x86_64-linux
chmod +x ~/lightpanda-bin/lightpanda
~/lightpanda-bin/lightpanda version
- name: start test server
run: |
php -S 127.0.0.1:8000 -t test/data/app &
sleep 1
curl -sf http://127.0.0.1:8000/info > /dev/null
- name: run lightpanda helper tests
run: |
export LIGHTPANDA_PATH="$HOME/lightpanda-bin/lightpanda"
npm run test:unit:webbapi:lightpanda
- name: run lightpanda acceptance tests
run: |
export LIGHTPANDA_PATH="$HOME/lightpanda-bin/lightpanda"
./bin/codecept.js run -c test/acceptance/codecept.Lightpanda.js --grep @Lightpanda --debug
4 changes: 3 additions & 1 deletion Bunoshfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ const inheritedHelperDocs = {
exclude: [/Title/, /Popup/, /Cookie/, /Url/, /^press/, /^refreshPage/, /^resizeWindow/, /Script$/, /cursor/, /Css/, /Tab$/, /^wait/],
},
Obscura: { parent: 'CDPBrowser' },
Lightpanda: { parent: 'CDPBrowser' },
Kitesurf: { parent: 'CDPBrowser', excludeConfig: ['endpoint', 'headers'] },
}

Expand All @@ -425,11 +426,12 @@ async function docsHelperMarkdown(name, { parent, exclude = [], excludeConfig =
const documentation = await import('documentation')
const buildOptions = { shallow: true, sortOrder: ['alpha'] }
const doc = await documentation.build([`docs/build/${name}.js`], buildOptions)
doc.sort((a, b) => (b.kind === 'class') - (a.kind === 'class'))
let members = doc[0].members.instance

if (parent) {
const parentDoc = await documentation.build([`docs/build/${parent}.js`], buildOptions)
for (const method of parentDoc[0].members.instance) {
for (const method of parentDoc.find(c => c.kind === 'class').members.instance) {
if (exclude.some(f => method.name.match(f))) continue
if (members.some(m => m.name === method.name)) continue
members.push(method)
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
| 🌐 Web | Puppeteer | [![Puppeteer Tests](https://github.com/codeceptjs/CodeceptJS/actions/workflows/puppeteer.yml/badge.svg)](https://github.com/codeceptjs/CodeceptJS/actions/workflows/puppeteer.yml) |
| 🌐 Web | WebDriver | [![WebDriver Tests](https://github.com/codeceptjs/CodeceptJS/actions/workflows/webdriver.yml/badge.svg)](https://github.com/codeceptjs/CodeceptJS/actions/workflows/webdriver.yml) |
| 🌐 Web | Obscura | [![Obscura Helper Tests](https://github.com/codeceptjs/CodeceptJS/actions/workflows/obscura.yml/badge.svg)](https://github.com/codeceptjs/CodeceptJS/actions/workflows/obscura.yml) |
| 🌐 Web | Lightpanda | [![Lightpanda Helper Tests](https://github.com/codeceptjs/CodeceptJS/actions/workflows/lightpanda.yml/badge.svg)](https://github.com/codeceptjs/CodeceptJS/actions/workflows/lightpanda.yml) |
| 📱 Mobile | Appium | [![Appium Tests - Android](https://github.com/codeceptjs/CodeceptJS/actions/workflows/appium_Android.yml/badge.svg)](https://github.com/codeceptjs/CodeceptJS/actions/workflows/appium_Android.yml) |

# CodeceptJS [![Made in Ukraine](https://img.shields.io/badge/made_in-ukraine-ffd700.svg?labelColor=0057b7)](https://stand-with-ukraine.pp.ua)
Expand Down Expand Up @@ -44,6 +45,7 @@ CodeceptJS uses **Helper** modules to provide actions to `I` object. Currently,
- [**Puppeteer**](https://github.com/codeceptjs/CodeceptJS/blob/master/docs/helpers/Puppeteer.md) - uses Google Chrome's Puppeteer for fast headless testing.
- [**WebDriver**](https://github.com/codeceptjs/CodeceptJS/blob/master/docs/helpers/WebDriver.md) - uses [webdriverio](http://webdriver.io/) to run tests via WebDriver or Devtools protocol.
- [**Obscura**](https://codecept.io/helpers/Obscura) - drives the lightweight Obscura browser through Chrome DevTools Protocol. See [Alternative Browser Engines](https://codecept.io/alternative-browsers).
- [**Lightpanda**](https://codecept.io/helpers/Lightpanda) - drives the Lightpanda headless browser through Chrome DevTools Protocol. See [Alternative Browser Engines](https://codecept.io/alternative-browsers).
- [**Appium**](https://github.com/codeceptjs/CodeceptJS/blob/master/docs/helpers/Appium.md) - for **mobile testing** with Appium
- [**Detox**](https://github.com/codeceptjs/CodeceptJS/blob/master/docs/helpers/Detox.md) - This is a wrapper on top of Detox library, aimed to unify testing experience for CodeceptJS framework. Detox provides a grey box testing for mobile applications, playing especially well for React Native apps.

Expand Down
Loading
Loading