mobile: add tests

This commit is contained in:
Ammar Ahmed
2025-10-28 12:00:38 +05:00
parent 4720456d63
commit 38600bf2a5
5 changed files with 10 additions and 1 deletions

View File

@@ -108,6 +108,7 @@ export const SearchBar = ({
name="close"
size={AppFontSize.xxl}
top={10}
testID="clear-search"
bottom={10}
onPress={() => {
inputRef.current?.clear();

View File

@@ -1,5 +1,5 @@
import { execSync } from "child_process";
//@ts-ignore
import { pathExists, ensureDir } from "fs-extra";
import { resolveConfig } from "detox/internals";

View File

@@ -28,6 +28,9 @@ describe("Search", () => {
.typeTextById("search-input", "Test")
.wait(1000)
.isVisibleByText("1")
.waitAndTapById("clear-search")
.wait(2000)
.isNotVisibleByText("1")
.run();
});
});

View File

@@ -20,6 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
import { expect as jestExpect } from "@jest/globals";
import { device as _device, expect } from "detox";
import { readFileSync } from "fs";
//@ts-ignore
import { toMatchImageSnapshot } from "jest-image-snapshot";
import type { RouteName } from "../../app/stores/use-navigation-store";
import { notesnook } from "../test.ids";

View File

@@ -104,6 +104,10 @@
"run-ios",
"build-ios",
"build-android",
"build-android-debug",
"e2e-android-debug",
"e2e-android",
"e2e-ios",
"release-android",
"release-android-bundle",
"release-ios",