Fix functional tests (#5682)

* unnamed

* add changeset

* add build

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
This commit is contained in:
Abubakar Abid 2023-09-25 13:26:10 -07:00 committed by GitHub
parent f661c0733b
commit c57f1b75e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 5 deletions

View File

@ -0,0 +1,6 @@
---
"@gradio/client": minor
"gradio": minor
---
feat:Fix functional tests

View File

@ -65,6 +65,7 @@ jobs:
run: |
. venv/bin/activate
python -m pip install -r demo/outbreak_forecast/requirements.txt
- run: pnpm build
- run: pnpm exec playwright install chromium
- name: run browser tests
run: |

View File

@ -399,11 +399,6 @@ export function api_factory(fetch_implementation: typeof fetch): Client {
if (typeof endpoint === "number") {
fn_index = endpoint;
if (fn_index in api.unnamed_endpoints) {
api_info = api.unnamed_endpoints[fn_index];
} else {
throw new Error(`Invalid function index: ${fn_index}`);
}
api_info = api.unnamed_endpoints[fn_index];
} else {
const trimmed_endpoint = endpoint.replace(/^\//, "");