Skip to content

Commit

Permalink
Lint + Autoscroll test fix (#54)
Browse files Browse the repository at this point in the history
* lint fix

* ci: fix autoscroll test by comparing only the behavior output via jq
  • Loading branch information
ikreymer authored Jun 14, 2023
1 parent 2698809 commit 5136e9b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/autoscroll.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ jobs:
run: cat ./log

- name: compare crawl log to expected
run: grep '"msg"' ./log | diff - ./test/expected-autoscroll.log
run: cat ./log | jq -c 'select(.context == "behaviorScript") | .details' | diff - ./test/expected-autoscroll.log

2 changes: 1 addition & 1 deletion dist/behaviors.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/site/instagram.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ export class InstagramPostsBehavior {

async* run(ctx) {
const { getState, scrollIntoView, sleep, waitUnit, xpathNode } = ctx.Lib;
const origLoc = window.location.href;
//const origLoc = window.location.href;

//yield* this.viewStandalonePost(ctx, origLoc);

Expand Down
4 changes: 2 additions & 2 deletions test/expected-autoscroll.log
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{"state":{"segments":1},"msg":"Skipping autoscroll, page seems to not be responsive to scrolling events"}
{"state":{"segments":1},"msg":"done!"}
{"state":{"segments":1},"msg":"Skipping autoscroll, page seems to not be responsive to scrolling events","page":"https://www.iana.org/numbers","workerid":0}
{"state":{"segments":1},"msg":"done!","page":"https://www.iana.org/numbers","workerid":0}

0 comments on commit 5136e9b

Please sign in to comment.