Skip to content

Commit 279055e

Browse files
authored
Add API URL Override Support (#64)
* Modernize dependencies * Add support for api_url * Fixed undefined appearing in output URLs
1 parent 7d8e415 commit 279055e

File tree

12 files changed

+425
-125
lines changed

12 files changed

+425
-125
lines changed

.github/workflows/pr-workflow.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ jobs:
3232
with:
3333
application-id: D6uz-lhAGBYuTTc6Jj_w0Q-a
3434
environment-id: I9tfo2dWd7WSigXcO91feA-e
35+
# Intentionally trigger deprecation warning
36+
uri: 'https://sandbox.mabl.com'
37+
app-url: 'https://storage.googleapis.com/public-test-pages/uptime/canary.html'
3538
browser-types: |
3639
chrome
3740
plan-labels: |

.github/workflows/push-workflow.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ jobs:
3333
with:
3434
application-id: D6uz-lhAGBYuTTc6Jj_w0Q-a
3535
environment-id: I9tfo2dWd7WSigXcO91feA-e
36+
# Intentionally trigger deprecation warning
37+
uri: 'https://sandbox.mabl.com'
38+
app-url: 'https://storage.googleapis.com/public-test-pages/uptime/canary.html'
3639
browser-types: |
3740
chrome
3841
plan-labels: |

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,12 @@ jobs:
107107
types to test e.g. `chrome, firefox, safari, internet_explorer`. If not
108108
provided, mabl will test the browsers configured on the triggered test.
109109
- `plan-labels` {string} (optional): comma or new line separated plan labels to test. Plans matching **any** label will be run. e.g. `smoke-test, beta-feature`. Note: additional selection criteria must also be met like application-id or environment-id, if supplied.
110-
- `uri` {string} (optional) the base uri to test against. If provided, this will
110+
- `uri` {string} (optional, DEPRECATED - use app_url) the base uri to run browser based tests against. If provided, this will
111111
override the default uri associated with the environment in mabl
112+
- `app-url` {string} (optional) the base uri to run **Web Browser tests** against. If provided, this will
113+
override the default web browser uri associated with the environment in mabl (note, this replaces `uri`, and will supersede the value in `uri` if both are provided)
114+
- `api-url` {string} (optional) the base uri to run **API tests** against. If provided, this will
115+
override the default API uri associated with the environment in mabl
112116
- `mabl-branch` {string} (optional) run tests on the mabl branch of tests with this name. Defaults to `master`.
113117
- `http-headers` {string} (optional) Headers to add to all requests e.g. "My-Header:the-value" (comma or new line delimited).
114118
- `rebaseline-images` {boolean} (optional) - Set `true` to reset the visual

action.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,19 @@ inputs:
2727
required: false
2828
uri:
2929
description: ^
30-
'Base URI to test against. If provided, this will override the default URI
31-
associated with the environment in mabl'
30+
'The base uri to test browser based tests against. If provided, this will
31+
override the default uri associated with the environment in mabl'
32+
deprecationMessage: "use 'app-url' instead"
33+
required: false
34+
app-url:
35+
description: ^
36+
'The base uri to run WEB BROWSER TESTS against. If provided, this will
37+
override the default web browser uri associated with the environment in mabl (note, this replaces `uri`, and will override the value in `uri` if both are provided)'
38+
required: false
39+
api-url:
40+
description: ^
41+
'The base uri to run API TESTS against. If provided, this will
42+
override the default API uri associated with the environment in mabl'
3243
required: false
3344
mabl-branch:
3445
description: ^
@@ -42,19 +53,19 @@ inputs:
4253
description: ^
4354
'Set to true to reset the visual baseline to the current deployment'
4455
required: false
45-
default: false
56+
default: 'false'
4657
set-static-baseline:
4758
description: ^
4859
'Set to true to use the current deployment as an exact static
4960
baseline. If this is set, mabl will not model dynamic areas and will use
5061
the current deployment as a pixel-exact visual baseline.'
5162
required: false
52-
default: false
63+
default: 'false'
5364
continue-on-failure:
5465
description: ^
5566
'Set to true to continue the build even if there are test failures'
5667
required: false
57-
default: false
68+
default: 'false'
5869
event-time:
5970
description: "Event time the deployment occurred. Defaults to now."
6071
required: false

0 commit comments

Comments
 (0)