0
0
mirror of https://github.com/ankidroid/Anki-Android.git synced 2024-09-19 19:42:17 +02:00
Commit Graph

11 Commits

Author SHA1 Message Date
SanjaySargam
292d662d0b note-editor: drop files
This commit ensures that we can drop files (photos, videos, and audio) in NoteEditor (FixedEditText).

Fix: Handle minSdkVersion conflict with DropHelper and enable file drop in NoteEditor
Added DropHelperCompat to handle the incompatibility issue with DropHelper and minSdkVersion 23. The manifest merger failed with the following error:

> Manifest merger failed: uses-sdk:minSdkVersion 23 cannot be smaller than version 24 declared in library [androidx.draganddrop:draganddrop:1.0.0] /Users/davidallison/.gradle/cache> s/8.8/transforms/0a1688833d368c1b9b07d2054911030e/transformed/draganddrop-1.0.0/AndroidManifest.xml as the library might be using APIs not available in 23
> Suggestion: use a compatible library with a minSdk of at most 23,
>     or increase this project's minSdk version to at least 24,
>     or use tools:overrideLibrary="androidx.draganddrop" to force usage
>     (may lead to runtime failures)

To resolve this, the DropHelperCompat class is used to conditionally configure the view for drag and drop operations only when the SDK version is 24 or higher.
2024-08-15 18:49:35 +00:00
andriusezerskis
c63e93a09f Remove wildcard from imports 2024-07-17 09:16:28 +00:00
Mike Hardy
cf1b98d0a2 refactor(test): shift common testlib items into a 'common' package
this means they have their own separate directory with no collisions
in other modules that consume them
2024-06-24 12:35:54 +00:00
abdelrahmanesam
dcb10769b1 extract magic numbers to version catalog 2024-06-16 08:21:52 +00:00
David Allison
84730bec3c test: support class-level Flaky annotation 2024-05-19 21:58:32 +00:00
David Allison
a74f1a0552 chore: assertThrows 2024-05-04 16:16:00 +00:00
David Allison
909867cf5c test: fail on unhandled exception
Previously, an unhandled exception would hang

Issue 16253
2024-04-27 17:26:41 +00:00
AbdelrahmanEsam
bb0c4a85bf
Migrate version catalog (#15966)
* version catalog conflict
 solve

* implementing version catalog for stable versioning between modules

* implementing version catalog for stable versioning between modules

---------

Co-authored-by: abdelrahmanesam <abdelrahmanesam>
2024-03-27 00:53:28 +00:00
David Allison
8d3b4d2899 fix: emulator tests (apply @Flaky)
`IgnoreFlakyTestsInCIRule` was not applied to the test class

So we apply the rule, and improve the documentation
2024-02-02 02:23:02 +00:00
David Allison
b424741d01 fix: emulator tests (BuildConfig)
0c238ed9bb broke with

```
com.ichi2.anki.ReviewerTest > testCustomSchedulerWithRuntimeError[test(AVD) - 11] FAILED
	java.lang.AssertionError: View assertion was not true within 30000 milliseconds
	at org.junit.Assert.fail(Assert.java:89)
E0201 20:37:37.824023 bcf7000 FrameBuffer.cpp:3765] Failed to find ColorBuffer:314

com.ichi2.anki.ReviewerTest > testCustomSchedulerWithCustomData[test(AVD) - 11] FAILED
	java.lang.AssertionError: View assertion was not true within 30000 milliseconds
	at org.junit.Assert.fail(Assert.java:89)
```

But only when run on `main`, not in the PR

I suspect:
The "CI" parameter appeared to not passed to the emulator

So we should use BuildConfig, rather than getenv

ref: https://github.com/ankidroid/Anki-Android/pull/15381#issuecomment-1922257990
2024-02-02 02:23:02 +00:00
Mike Hardy
cf8cf278e4 refactor: shared "testlib" module, used by AnkiDroid test and androidTest 2024-02-01 19:59:38 +00:00