Skip to content

Commit

Permalink
fix: unstable test case
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-jan committed Oct 26, 2023
1 parent ca29f63 commit 945ba83
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions electron/tests/my-models.e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ test.afterAll(async () => {

test("shows my models", async () => {
await page.getByTestId("My Models").first().click();
const header = await page
.getByRole("heading")
.filter({ hasText: "My Models" })
.first()
.isVisible();
expect(header).toBe(false);
await page.getByTestId("testid-mymodels-header").isVisible();
// More test cases here...
});
2 changes: 1 addition & 1 deletion web/screens/MyModels/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const MyModelsScreen = () => {
return (
<div className="flex h-full w-full overflow-y-auto">
<div className="w-full p-5">
<h1 className="text-lg font-semibold">My Models</h1>
<h1 data-testid="testid-mymodels-header" className="text-lg font-semibold">My Models</h1>
<p className="mt-2 text-gray-600 dark:text-gray-400">
You have <span>{downloadedModels.length}</span> models downloaded
</p>
Expand Down

0 comments on commit 945ba83

Please sign in to comment.