Autoscroll Behavior #2084
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Autoscroll Behavior | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '10 16 * * *' | |
jobs: | |
autoscroll_test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [22.x] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: install requirements | |
run: yarn install | |
- name: build behaviors | |
run: yarn run build | |
- uses: c-py/action-dotenv-to-setenv@v2 | |
with: | |
env-file: test/test.env | |
- name: get browsertrix image | |
run: docker pull $BROWSERTRIX_IMAGE | |
- name: run crawl | |
run: docker run -v $PWD/dist/behaviors.js:/app/node_modules/browsertrix-behaviors/dist/behaviors.js $BROWSERTRIX_IMAGE crawl --url https://www.iana.org/numbers --limit 1 --logging debug --context behaviorScript --behaviors autoscroll > ./log | |
- name: check for autoscroll debug log line | |
run: grep 'Skipping autoscroll, page seems to not be responsive to scrolling events' ./log | |
- name: check that state is logged as well | |
run: grep '{"state":{"segments":1}' ./log | |