diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index a38274f..92c7bbd 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -27,9 +27,14 @@ jobs: node-version: 18.x - run: yarn install - run: yarn run build-full-test + - id: setup-chrome + uses: browser-actions/setup-chrome@v1 # set up a virtual display for chrome (since the tests don't currently run it in headless mode) # then run the tests - - run: | + - name: Run Tests + env: + CHROME_PATH: ${{ steps.setup-chrome.outputs.chrome-path }} + run: | export DISPLAY=:99 sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & yarn test diff --git a/package.json b/package.json index 4b1700d..2c2e710 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@webrecorder/wombat", - "version": "3.8.3", + "version": "3.8.4", "main": "index.js", "license": "AGPL-3.0-or-later", "author": "Ilya Kreymer, Webrecorder Software", diff --git a/src/wombat.js b/src/wombat.js index b95a000..51f56f7 100755 --- a/src/wombat.js +++ b/src/wombat.js @@ -4549,7 +4549,9 @@ Wombat.prototype.initHTTPOverrides = function() { // responseURL override this.overridePropExtract(this.$wbwindow.XMLHttpRequest.prototype, 'responseURL'); - if (!this.wb_info.isSW) { + var convertToGet = !!this.wb_info.convert_post_to_get; + + if (!this.wb_info.isSW && !convertToGet) { if (this.$wbwindow.XMLHttpRequest.prototype.open) { var origXMLHttpOpen = this.$wbwindow.XMLHttpRequest.prototype.open; this.utilFns.XHRopen = origXMLHttpOpen; @@ -4588,9 +4590,6 @@ Wombat.prototype.initHTTPOverrides = function() { this.__WB_xhr_headers.set(name, value); }; - var wombat = this; - var convertToGet = !!this.wb_info.convert_post_to_get; - this.$wbwindow.XMLHttpRequest.prototype.send = async function(value) { if (convertToGet && (this.__WB_xhr_open_arguments[0] === 'POST' || this.__WB_xhr_open_arguments[0] === 'PUT')) {