Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: angrykoala/wendigo
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2.4.0
Choose a base ref
...
head repository: angrykoala/wendigo
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 3,229 additions and 1,820 deletions.
  1. +3 −1 .eslintignore
  2. +1 −1 .eslintrc.json → .eslintrc-js.js
  3. +170 −0 .eslintrc-ts.js
  4. +1 −0 .github/FUNDING.yml
  5. +27 −0 .github/workflows/npm-publish.yml
  6. +24 −0 .github/workflows/test.yml
  7. +1 −4 .gitlab-ci.yml
  8. +0 −19 .travis.yml
  9. +0 −1 @types/compositer/index.d.ts
  10. +0 −4 @types/is-class/index.d.ts
  11. +188 −0 CHANGELOG.md
  12. +1 −1 CONTRIBUTING.md
  13. +10 −41 Dockerfile
  14. +21 −674 LICENSE
  15. +184 −21 README.md
  16. +0 −12 config.ts
  17. +2 −2 globals.d.ts
  18. +0 −261 injection_scripts/selector_finder.js
  19. +265 −0 injection_scripts/selector_finder.ts
  20. +0 −94 injection_scripts/selector_query.js
  21. +94 −0 injection_scripts/selector_query.ts
  22. +0 −77 injection_scripts/wendigo_utils.js
  23. +81 −0 injection_scripts/wendigo_utils.ts
  24. +1 −1 lib/browser/assertions/assert_elements.ts
  25. +22 −22 lib/browser/assertions/assertions_core.ts
  26. +8 −8 lib/browser/assertions/browser_not_assertions.ts
  27. +5 −4 lib/browser/browser.ts
  28. +190 −73 lib/browser/browser_core.ts
  29. +28 −0 lib/browser/helpers/header_helper.ts
  30. +58 −19 lib/browser/mixins/browser_actions.ts
  31. +7 −7 lib/browser/mixins/browser_click.ts
  32. +2 −1 lib/browser/mixins/browser_edit.ts
  33. +26 −13 lib/browser/mixins/browser_info.ts
  34. +1 −1 lib/browser/mixins/browser_navigation.ts
  35. +13 −3 lib/browser/mixins/browser_queries.ts
  36. +16 −9 lib/browser/mixins/browser_tap.ts
  37. +123 −36 lib/browser/mixins/browser_wait.ts
  38. +0 −10 lib/browser/puppeteer_wrapper/puppeteer_types.ts
  39. +12 −13 lib/browser_factory.ts
  40. +1 −1 lib/decorators/fail_if_not_loaded.ts
  41. +2 −2 lib/decorators/override_error.ts
  42. +10 −4 lib/models/dom_element.ts
  43. +17 −5 lib/{ → models}/errors.ts
  44. +5 −8 lib/modules/auth/browser_auth.ts
  45. +9 −8 lib/modules/console/browser_console.ts
  46. +1 −1 lib/modules/console/console_assertion.ts
  47. +2 −1 lib/modules/console/log.ts
  48. +1 −1 lib/modules/console/types.ts
  49. +5 −5 lib/modules/cookies/browser_cookies.ts
  50. +1 −1 lib/modules/cookies/cookies_assertion.ts
  51. +27 −27 lib/modules/dialog/browser_dialog.ts
  52. +8 −8 lib/modules/dialog/dialog.ts
  53. +11 −0 lib/modules/local_storage/browser_local_storage.ts
  54. +1 −1 lib/modules/local_storage/local_storage_assertions.ts
  55. +6 −6 lib/modules/local_storage/local_storage_not_assertions.ts
  56. +45 −14 lib/modules/requests/browser_requests.ts
  57. +13 −5 lib/modules/requests/request_assertions_filter.ts
  58. +25 −19 lib/modules/requests/request_filter.ts
  59. +65 −53 lib/modules/requests/request_mock.ts
  60. +4 −3 lib/modules/requests/request_mocker.ts
  61. +2 −1 lib/modules/requests/types.ts
  62. +2 −1 lib/modules/webworkers/webworker.ts
  63. +1 −1 lib/modules/webworkers/webworkers_assertions.ts
  64. +1 −1 lib/modules/wendigo_module.ts
  65. +44 −0 lib/puppeteer_wrapper/puppeteer_context.ts
  66. +22 −0 lib/puppeteer_wrapper/puppeteer_launcher.ts
  67. +54 −15 lib/{browser → }/puppeteer_wrapper/puppeteer_page.ts
  68. +38 −0 lib/puppeteer_wrapper/puppeteer_types.ts
  69. +6 −4 lib/{browser → }/puppeteer_wrapper/puppeteer_utils.ts
  70. +32 −2 lib/types.ts
  71. +1 −1 lib/utils/assert_utils.ts
  72. +11 −6 lib/utils/utils.ts
  73. +26 −32 lib/wendigo.ts
  74. BIN logo/wendigo_lighter.png
  75. +0 −47 logo/wendigo_lighter.svg
  76. +2 −2 main.ts
  77. +23 −18 package.json
  78. +17 −0 tests/assertions/assert_request.test.js
  79. +10 −0 tests/assertions/assert_style.test.js
  80. +35 −0 tests/assertions/assert_text.test.js
  81. +6 −0 tests/assertions/assert_text_contains.test.js
  82. +11 −4 tests/browser/drag.test.js
  83. +2 −1 tests/browser/evaluate.test.js
  84. +33 −0 tests/browser/find_by_label.test.js
  85. +69 −0 tests/browser/geolocation.test.js
  86. +2 −2 tests/browser/incognito.test.js
  87. +52 −0 tests/browser/log_option.test.js
  88. +44 −0 tests/browser/log_requests.test.js
  89. +23 −6 tests/browser/open.test.js
  90. +4 −3 tests/browser/pdf.test.js
  91. +114 −0 tests/browser/request_headers.test.js
  92. +35 −0 tests/browser/set_content.test.js
  93. +70 −0 tests/browser/set_media.test.js
  94. +137 −0 tests/browser/tabs.test.js
  95. +10 −1 tests/browser/text.test.js
  96. +29 −1 tests/browser/timezone.test.js
  97. +8 −5 tests/browser/upload.test.js
  98. +42 −0 tests/browser/wait_and_check.test.js
  99. +51 −0 tests/browser/wait_and_tap.test.js
  100. +46 −0 tests/browser/wait_and_type.test.js
  101. +14 −0 tests/browser/wait_for.test.js
  102. +2 −2 tests/browser/wait_for_request.test.js
  103. +7 −0 tests/browser/wait_until_not_visible.test.js
  104. +8 −3 tests/browser/wendigo_main.test.js
  105. +2 −1 tests/browser_modules/browser_auth.test.js
  106. +11 −0 tests/browser_modules/browser_console.test.js
  107. +3 −3 tests/browser_modules/browser_dialog.test.js
  108. +9 −0 tests/browser_modules/browser_local_storage.test.js
  109. +16 −1 tests/browser_modules/request_mock_object.test.js
  110. +17 −6 tests/browser_modules/requests_filter.test.js
  111. +8 −1 tests/config.json
  112. +12 −2 tests/dom_element/dom_element.test.js
  113. +1 −0 tests/dummy_file
  114. +12 −1 tests/dummy_server/index.js
  115. +9 −0 tests/dummy_server/static/console.html
  116. +1 −1 tests/dummy_server/static/drag.html
  117. +2 −2 tests/dummy_server/static/forms.html
  118. +17 −0 tests/dummy_server/static/lorem.html
  119. +17 −0 tests/dummy_server/static/multiple_styles.html
  120. +15 −0 tests/dummy_server/static/tabs_and_popups.html
  121. +26 −0 tests/dummy_server/static/wait_and_check.html
  122. +33 −0 tests/dummy_server/static/wait_and_tap.html
  123. +26 −0 tests/dummy_server/static/wait_and_type.html
  124. +1 −0 tests/dummy_server/static/weird_text.html
  125. +1 −0 tsconfig.json
  126. +0 −37 tslint.json
4 changes: 3 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
dist/
dist/
.eslint.js
node_modules
2 changes: 1 addition & 1 deletion .eslintrc.json → .eslintrc-js.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
module.exports = {
"env": {
"mocha": true,
"node": true,
170 changes: 170 additions & 0 deletions .eslintrc-ts.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
/*
👋 Hi! This file was autogenerated by tslint-to-eslint-config.
https://github.com/typescript-eslint/tslint-to-eslint-config
It represents the closest reasonable ESLint configuration to this
project's original TSLint configuration.
We recommend eventually switching this configuration to extend from
the recommended rulesets in typescript-eslint.
https://github.com/typescript-eslint/tslint-to-eslint-config/blob/master/docs/FAQs.md
Happy linting! 💖
*/
module.exports = {
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"sourceType": "module"
},
"plugins": [
"eslint-plugin-prefer-arrow",
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/adjacent-overload-signatures": "error",
"@typescript-eslint/array-type": "off",
"@typescript-eslint/ban-types": [
"error",
{
"types": {
"Boolean": {
"message": "Avoid using the `Boolean` type. Did you mean `boolean`?"
},
"Number": {
"message": "Avoid using the `Number` type. Did you mean `number`?"
},
"String": {
"message": "Avoid using the `String` type. Did you mean `string`?"
},
"Symbol": {
"message": "Avoid using the `Symbol` type. Did you mean `symbol`?"
}
}
}
],
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/dot-notation": "error",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/member-ordering": "off",
"@typescript-eslint/naming-convention": "off",
"@typescript-eslint/no-empty-function": "error",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-parameter-properties": "off",
"@typescript-eslint/no-unnecessary-type-assertion": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/prefer-for-of": "off",
"@typescript-eslint/prefer-function-type": "error",
"@typescript-eslint/prefer-namespace-keyword": "error",
"@typescript-eslint/prefer-regexp-exec": "off",
"@typescript-eslint/quotes": "off",
"@typescript-eslint/require-await": "off",
"@typescript-eslint/restrict-plus-operands": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/triple-slash-reference": [
"error",
{
"path": "always",
"types": "prefer-import",
"lib": "always"
}
],
"@typescript-eslint/unified-signatures": "error",
"arrow-parens": [
"off",
"always"
],
"comma-dangle": "off",
"complexity": "off",
"constructor-super": "error",
"curly": "off",
"eqeqeq": [
"error",
"smart"
],
"guard-for-in": "error",
"id-blacklist": [
"error",
"any",
"Number",
"number",
"String",
"string",
"Boolean",
"boolean",
"Undefined",
"undefined"
],
"id-match": "error",
"import/order": "off",
"max-classes-per-file": "off",
"max-len": [
"error",
{
"code": 200
}
],
"new-parens": "error",
"no-bitwise": "error",
"no-caller": "error",
"no-cond-assign": "error",
"no-console": "off",
"no-debugger": "error",
"no-empty": "error",
"no-eval": "error",
"no-fallthrough": "off",
"no-invalid-this": "off",
"no-new-wrappers": "error",
"no-shadow": "off",
"no-throw-literal": "error",
"no-trailing-spaces": "error",
"no-undef-init": "error",
"no-underscore-dangle": "off",
"no-unsafe-finally": "error",
"no-unused-labels": "error",
"no-var": "error",
"object-shorthand": "off",
"one-var": [
"error",
"never"
],
"prefer-arrow/prefer-arrow-functions": "off",
"prefer-const": "off",
"prefer-rest-params": "off",
"radix": "error",
"spaced-comment": [
"error",
"always",
{
"markers": [
"/"
]
}
],
"use-isnan": "error",
"valid-typeof": "off",
}
};
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [angrykoala]
27 changes: 27 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: NPM Publish

on:
release:
types: [published]

jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: npm install
- name: publish
run: |
sudo apt-get update
sudo apt-get install -y libgbm-dev
npm run lint
npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
24 changes: 24 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Test

on: [push]

jobs:
test:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest] # windows not added due to || operator not being valid
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
- run: npm install
- name: test
run: |
sudo apt-get update
sudo apt-get install -y libgbm-dev
npm run lint
npm test || npm test
env:
CI: true
5 changes: 1 addition & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: node:10.13.0
image: node:12.13.1

variables:
NO_SANDBOX: "true"
@@ -12,7 +12,4 @@ test:
stage: test
retry: 1
script:
- npm run eslint
- npm run tslint
- npm run markdown-lint
- npm test
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

1 change: 0 additions & 1 deletion @types/compositer/index.d.ts

This file was deleted.

4 changes: 0 additions & 4 deletions @types/is-class/index.d.ts

This file was deleted.

Loading