mirror of
https://github.com/gradio-app/gradio.git
synced 2025-02-17 11:29:58 +08:00
Fix flaky ui test (#4906)
* Debug * Upload screenshots * Fix path * turn on verbose mode * turn on verbose mode * turn on verbose mode * await click * cleanup * trigger ci --------- Co-authored-by: pngwn <hello@pngwn.io>
This commit is contained in:
parent
9f072796a5
commit
d3e1d272d5
@ -5,5 +5,5 @@ export default {
|
||||
},
|
||||
testMatch: /.*.spec.ts/,
|
||||
testDir: "..",
|
||||
globalSetup: "./playwright-setup.js"
|
||||
globalSetup: "./playwright-setup.js",
|
||||
};
|
||||
|
7
.github/workflows/ui.yml
vendored
7
.github/workflows/ui.yml
vendored
@ -53,6 +53,13 @@ jobs:
|
||||
run: |
|
||||
. venv/bin/activate
|
||||
pnpm test:browser
|
||||
- name: upload screenshots
|
||||
uses: actions/upload-artifact@v3
|
||||
if: always()
|
||||
with:
|
||||
name: playwright-screenshots
|
||||
path: |
|
||||
./test-results
|
||||
- name: run browser component tests
|
||||
run: |
|
||||
. venv/bin/activate
|
||||
|
@ -91,7 +91,7 @@ test("gr.Info makes the toast show up", async ({ page }) => {
|
||||
});
|
||||
|
||||
test("gr.Warning makes the toast show up", async ({ page }) => {
|
||||
page.click("text=Trigger Warning");
|
||||
await page.click("text=Trigger Warning");
|
||||
|
||||
const toast = page.getByTestId("toast-body");
|
||||
expect(toast).toContainText("This is a warning!");
|
||||
|
@ -21,7 +21,7 @@
|
||||
"test:node": "TEST_MODE=node pnpm vitest run --config .config/vitest.config.ts",
|
||||
"test:browser": "pnpm --filter @gradio/app test:browser",
|
||||
"test:browser:full": "run-s build test:browser",
|
||||
"test:browser:verbose": "GRADIO_TEST_VERBOSE=true pnpm test:browser",
|
||||
"test:browser:verbose": "pnpm test:browser",
|
||||
"test:browser:dev": "pnpm --filter @gradio/app test:browser:dev",
|
||||
"ci:publish": "pnpm publish --no-git-checks --access public -r",
|
||||
"ci:version": "changeset version && pnpm i --lockfile-only",
|
||||
|
Loading…
Reference in New Issue
Block a user