Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temp alpha mr2 branch [DO NOT MERGE] #2927

Closed

Conversation

BenHenning
Copy link
Member

No description provided.

Includes:
1. Support for disabling practice tab
2. Support for loading images & proto lessons from assets
3. Support for loading proto lessons
4. Preliminary support for loading LaTeX SVGs (not finished)
Conflicts:
	app/src/main/java/org/oppia/android/app/topic/TopicFragmentPresenter.kt
	domain/src/main/java/org/oppia/android/domain/topic/TopicController.kt
	domain/src/main/java/org/oppia/android/domain/topic/TopicListController.kt
	utility/src/main/java/org/oppia/android/util/parser/GlideImageLoader.kt
	utility/src/main/java/org/oppia/android/util/parser/ImageLoader.kt
Attempt to fix LaTeX SVG issues, except Glide seems to be broken in this
branch and requires separate investigation before the LaTeX bits can be
worked on.
BenHenning and others added 16 commits March 16, 2021 13:33
This makes GlideModule generation actually work correctly.
Most of the work is being done in our monkeypatched androidsvg library,
but there are some minor changes needed in Oppia as well. This utilizes
properly computed SVG width/height, and factors in vertical alignment.
It also properly interops with Android's own spacing for inline
drawables so that spaces around the LaTeX image are represented
correctly.
Particularly:
1. This fixes an issue with our SVG pipeline. Before, we were always
using our SVG rendering even for local drawables, but now we're actually
setting up the pipeline correctly to only load via androidsvg when we
intend to. This fixes profile avatar loading (which was broken due to
the new text svg pipeline that was added). This was an issue with the
existing glide module.

2. This finishes the proto version of promoted story creation so those
load correctly.

3. This reintroduces support for lesson thumbnails by creating separate
block/in-line image loading pipelines so that both can be loaded and
arranged correctly.

HTML-based images haven't yet been reintroduced.
1. Fixed image backgrounds being transparent
2. Attempted to fix lack of picture blurring

This commit has one approach for trying to make SVG blurring work, but
it's not complete (and images currently don't load). Another attempt
will be needed since trying to add a post-transcoder transformation
doesn't work in Glide.
This fixes blurring with pictures, and it fixes the missing alpha
channel for the front-of-chapter-thumbnail color filter.
This fixes a crash introduced in an earlier commit due to now-unneeded
code that made an incorrect presumption of Glide's loading pipeline.
This also restores in-lesson image loading support & makes it work a bit
better than before.

This commit marks the end of known image issues; everything
image-related seems to be working correctly & well as needed for alpha.
This updates interaction classifiers to support new types for text
input, drag and drop, and item selection/multiple choice. It partly
updates the UI portions (mainly for item selection), but more work is
needed both for item selection and drag and drop. Text input and
multiple choice should now be working.

Most of this work is due to structural changes in Oppia's backend in
preparation for supporting written translations for answers.
Conflicts:
	app/src/sharedTest/java/org/oppia/android/app/topic/revision/TopicRevisionFragmentTest.kt
	domain/src/main/java/org/oppia/android/domain/topic/TopicController.kt
	utility/BUILD.bazel
Everything in alpha content now seems to be working.
BenHenning added a commit that referenced this pull request Mar 23, 2021
BenHenning added a commit that referenced this pull request Mar 23, 2021
BenHenning added a commit that referenced this pull request Mar 23, 2021
Much of this is copied from #2927 so see that PR's commit history & the
PR corresponding to this commit for specific details.
BenHenning added a commit that referenced this pull request Mar 23, 2021
BenHenning added a commit that referenced this pull request Mar 23, 2021
@BenHenning BenHenning changed the base branch from develop to add-support-for-disabling-practice-tab March 23, 2021 08:24
…-mr2-branch

Conflicts:
	domain/src/main/java/org/oppia/android/domain/question/QuestionRetriever.kt
	model/src/main/proto/exploration.proto
	model/src/main/proto/topic.proto
	third_party/BUILD.bazel
	utility/src/main/java/org/oppia/android/util/parser/BitmapBlurrer.kt
@BenHenning
Copy link
Member Author

#2986 & all preceding PRs officially replace this, making this PR now obsolete.

@BenHenning BenHenning closed this Mar 23, 2021
@BenHenning BenHenning deleted the temp-alpha-mr2-branch branch March 23, 2021 08:28
BenHenning added a commit that referenced this pull request Apr 15, 2021
… from local assets (#2978)

* Add support for loading proto versions of lessons.

* Upgrade Espresso versions to work around build issues.

Note that I can't actually verify Espresso tests are working with these
versions since the Bazel project doesn't yet have Espresso tests set up.

* Lint fix post-copying from #2927.

* Remove image loading annotation.

This will be added in a later branch in the chain.

* Add caching module to needed test suites.

* Add support for importing text protos as assets.

This actually provides Bazel-only support for converting text protos to
binary and including those as assets so that we can avoid checking in
binary protos to the codebase.

* Add gitignore for Android Studio Bazel plugin output.

* Import textproto versions of existing dev assets.

This imports local conversions of all existing dev assets as text proto
leveraging the Bazel-only conversion system to convert these to binary
protos and include them as assets.

This is a necessary step to both eventually replace JSON assets with
text proto, and to test that the new proto loading pipeline is working
as designed.

* Undo Espresso version change since it breaks Bazel tests.

* Fix tests.

Various attempts to fix existing tests + move some of the domain tests
over to actually using proto when running with Bazel.

App module tests are hanging currently for unknown reasons (only in
Bazel).

* Use correct Espresso core.

3.1.0 causes tests to hang indefinitely when run with Bazel.

* Move coroutine dispatchers.

This moves the coroutine dispatchers to a new threading subpackage. It
also simplifies the TestCoroutineDispatcher interface & implementations
(which required moving runUntilIdle to CoroutineExecutorServiceTest).

The test coroutine annotations were also moved to their own files.

* Refactor testing utilities build graph.

This introduces new Bazel libraries for:
- Test dispatchers
- Fake system/Oppia clocks
- Robolectric dependencies

* Introduce dedicated test for TestCoroutineDispatcher.

This also fixes some threading issues in the dispatcher, and clarifies
some of its API that was previously unclear (and can lead to subtle race
conditions).

* Add tests for TestCoroutineDispatcher.

This required a bunch of refactoring, adding the first examples of
dedicated Bazel test build files, and introducing a new test pattern for
sharing code between different implementations. Further, it refined the
API for TesCoroutineDispatcher & fixed some issues in the
implementations (especially Robolectric).

Tests verified as non-flaky in Robolectric across 1000 runs, and 0.2%
flaky across 1000 runs for Espresso (though that may be fixed; waiting
on a follow-up run to confirm stability).

* Workaround ktlint semicolon issue.

* Lint fixes.

* Fix test post-merge.

* Move CoroutineDispatcher to be part of threading.

* Lint fixes.

* Undo version upgrade.

* Fix broken tests.

* Lint fixes.

* Add a bit more proto loading test coverage.

* Comment fix.

* Lint fixes.

* Address earlier TODO.

* Fix broken test build.
BenHenning added a commit that referenced this pull request Apr 23, 2021
* Add support for loading proto versions of lessons.

* Upgrade Espresso versions to work around build issues.

Note that I can't actually verify Espresso tests are working with these
versions since the Bazel project doesn't yet have Espresso tests set up.

* Lint fix post-copying from #2927.

* Fix Glide in Bazel.

* Remove image loading annotation.

This will be added in a later branch in the chain.

* Add caching module to needed test suites.

* Add support for importing text protos as assets.

This actually provides Bazel-only support for converting text protos to
binary and including those as assets so that we can avoid checking in
binary protos to the codebase.

* Add gitignore for Android Studio Bazel plugin output.

* Import textproto versions of existing dev assets.

This imports local conversions of all existing dev assets as text proto
leveraging the Bazel-only conversion system to convert these to binary
protos and include them as assets.

This is a necessary step to both eventually replace JSON assets with
text proto, and to test that the new proto loading pipeline is working
as designed.

* Undo Espresso version change since it breaks Bazel tests.

* Fix tests.

Various attempts to fix existing tests + move some of the domain tests
over to actually using proto when running with Bazel.

App module tests are hanging currently for unknown reasons (only in
Bazel).

* Use correct Espresso core.

3.1.0 causes tests to hang indefinitely when run with Bazel.

* Move coroutine dispatchers.

This moves the coroutine dispatchers to a new threading subpackage. It
also simplifies the TestCoroutineDispatcher interface & implementations
(which required moving runUntilIdle to CoroutineExecutorServiceTest).

The test coroutine annotations were also moved to their own files.

* Refactor testing utilities build graph.

This introduces new Bazel libraries for:
- Test dispatchers
- Fake system/Oppia clocks
- Robolectric dependencies

* Introduce dedicated test for TestCoroutineDispatcher.

This also fixes some threading issues in the dispatcher, and clarifies
some of its API that was previously unclear (and can lead to subtle race
conditions).

* Add tests for TestCoroutineDispatcher.

This required a bunch of refactoring, adding the first examples of
dedicated Bazel test build files, and introducing a new test pattern for
sharing code between different implementations. Further, it refined the
API for TesCoroutineDispatcher & fixed some issues in the
implementations (especially Robolectric).

Tests verified as non-flaky in Robolectric across 1000 runs, and 0.2%
flaky across 1000 runs for Espresso (though that may be fixed; waiting
on a follow-up run to confirm stability).

* Workaround ktlint semicolon issue.

* Lint fixes.

* Fix test post-merge.

* Move CoroutineDispatcher to be part of threading.

* Lint fixes.

* Undo version upgrade.

* Fix broken tests.

* Lint fixes.

* Add a bit more proto loading test coverage.

* Comment fix.

* Lint fixes.

* Address earlier TODO.

* Post-merge restructure.

* Post-merge fixes.

This removes unneeded dependencies from PersistentCacheStore, including
Glide.

* Fix broken test build.

* Post-merge lint fixes.
BenHenning added a commit that referenced this pull request Apr 23, 2021
* Add support for loading proto versions of lessons.

* Upgrade Espresso versions to work around build issues.

Note that I can't actually verify Espresso tests are working with these
versions since the Bazel project doesn't yet have Espresso tests set up.

* Lint fix post-copying from #2927.

* Fix Glide in Bazel.

* Fix concept card name escaping.

Also, refactor HtmlParser to better support/handling different tag types
& prepare for LaTeX SVG image support.

* Copy over test fix from #2927.

* Remove image loading annotation.

This will be added in a later branch in the chain.

* Add caching module to needed test suites.

* Add support for importing text protos as assets.

This actually provides Bazel-only support for converting text protos to
binary and including those as assets so that we can avoid checking in
binary protos to the codebase.

* Add gitignore for Android Studio Bazel plugin output.

* Import textproto versions of existing dev assets.

This imports local conversions of all existing dev assets as text proto
leveraging the Bazel-only conversion system to convert these to binary
protos and include them as assets.

This is a necessary step to both eventually replace JSON assets with
text proto, and to test that the new proto loading pipeline is working
as designed.

* Undo Espresso version change since it breaks Bazel tests.

* Fix tests.

Various attempts to fix existing tests + move some of the domain tests
over to actually using proto when running with Bazel.

App module tests are hanging currently for unknown reasons (only in
Bazel).

* Use correct Espresso core.

3.1.0 causes tests to hang indefinitely when run with Bazel.

* Move coroutine dispatchers.

This moves the coroutine dispatchers to a new threading subpackage. It
also simplifies the TestCoroutineDispatcher interface & implementations
(which required moving runUntilIdle to CoroutineExecutorServiceTest).

The test coroutine annotations were also moved to their own files.

* Refactor testing utilities build graph.

This introduces new Bazel libraries for:
- Test dispatchers
- Fake system/Oppia clocks
- Robolectric dependencies

* Introduce dedicated test for TestCoroutineDispatcher.

This also fixes some threading issues in the dispatcher, and clarifies
some of its API that was previously unclear (and can lead to subtle race
conditions).

* Add tests for TestCoroutineDispatcher.

This required a bunch of refactoring, adding the first examples of
dedicated Bazel test build files, and introducing a new test pattern for
sharing code between different implementations. Further, it refined the
API for TesCoroutineDispatcher & fixed some issues in the
implementations (especially Robolectric).

Tests verified as non-flaky in Robolectric across 1000 runs, and 0.2%
flaky across 1000 runs for Espresso (though that may be fixed; waiting
on a follow-up run to confirm stability).

* Workaround ktlint semicolon issue.

* Lint fixes.

* Fix test post-merge.

* Move CoroutineDispatcher to be part of threading.

* Lint fixes.

* Undo version upgrade.

* Fix broken tests.

* Lint fixes.

* Add a bit more proto loading test coverage.

* Comment fix.

* Lint fixes.

* Address earlier TODO.

* Post-merge restructure.

* Post-merge fixes.

This removes unneeded dependencies from PersistentCacheStore, including
Glide.

* Add tests for new tag handlers.

Also, add tests for HtmlParser, and clean up some existing tests.

* Fix broken test build.

* Post-merge lint fixes.

* Lint fixes.

* Address reviewer comment.

* Post-merge fix.

* Fix typo.
BenHenning added a commit that referenced this pull request Apr 23, 2021
…#2980] (#2981)

* Add support for loading proto versions of lessons.

* Upgrade Espresso versions to work around build issues.

Note that I can't actually verify Espresso tests are working with these
versions since the Bazel project doesn't yet have Espresso tests set up.

* Lint fix post-copying from #2927.

* Fix Glide in Bazel.

* Fix concept card name escaping.

Also, refactor HtmlParser to better support/handling different tag types
& prepare for LaTeX SVG image support.

* Copy over test fix from #2927.

* Add support for rendering LaTeX via SVGs.

Much of this is copied from #2927 so see that PR's commit history & the
PR corresponding to this commit for specific details.

* Remove image loading annotation.

This will be added in a later branch in the chain.

* Add caching module to needed test suites.

* Re-add image load annotation for this PR.

* Add support for importing text protos as assets.

This actually provides Bazel-only support for converting text protos to
binary and including those as assets so that we can avoid checking in
binary protos to the codebase.

* Add gitignore for Android Studio Bazel plugin output.

* Import textproto versions of existing dev assets.

This imports local conversions of all existing dev assets as text proto
leveraging the Bazel-only conversion system to convert these to binary
protos and include them as assets.

This is a necessary step to both eventually replace JSON assets with
text proto, and to test that the new proto loading pipeline is working
as designed.

* Undo Espresso version change since it breaks Bazel tests.

* Fix tests.

Various attempts to fix existing tests + move some of the domain tests
over to actually using proto when running with Bazel.

App module tests are hanging currently for unknown reasons (only in
Bazel).

* Use correct Espresso core.

3.1.0 causes tests to hang indefinitely when run with Bazel.

* Move coroutine dispatchers.

This moves the coroutine dispatchers to a new threading subpackage. It
also simplifies the TestCoroutineDispatcher interface & implementations
(which required moving runUntilIdle to CoroutineExecutorServiceTest).

The test coroutine annotations were also moved to their own files.

* Refactor testing utilities build graph.

This introduces new Bazel libraries for:
- Test dispatchers
- Fake system/Oppia clocks
- Robolectric dependencies

* Introduce dedicated test for TestCoroutineDispatcher.

This also fixes some threading issues in the dispatcher, and clarifies
some of its API that was previously unclear (and can lead to subtle race
conditions).

* Add tests for TestCoroutineDispatcher.

This required a bunch of refactoring, adding the first examples of
dedicated Bazel test build files, and introducing a new test pattern for
sharing code between different implementations. Further, it refined the
API for TesCoroutineDispatcher & fixed some issues in the
implementations (especially Robolectric).

Tests verified as non-flaky in Robolectric across 1000 runs, and 0.2%
flaky across 1000 runs for Espresso (though that may be fixed; waiting
on a follow-up run to confirm stability).

* Workaround ktlint semicolon issue.

* Lint fixes.

* Fix test post-merge.

* Move CoroutineDispatcher to be part of threading.

* Lint fixes.

* Undo version upgrade.

* Fix broken tests.

* Lint fixes.

* Add a bit more proto loading test coverage.

* Comment fix.

* Lint fixes.

* Address earlier TODO.

* Post-merge restructure.

* Post-merge fixes.

This removes unneeded dependencies from PersistentCacheStore, including
Glide.

* Add tests for new tag handlers.

Also, add tests for HtmlParser, and clean up some existing tests.

* Fix broken test build.

* Post-merge lint fixes.

* Lint fixes.

* Address reviewer comment.

* Post-merge fix.

* Address pre-merge TODO.

* Disable local image loading.

Also, add specific LaTeX line in the first fractions interaction so that
the new SVG support can be tested.

* Fix typo.

* Docs + tests.

This adds more documentation & context for code added before without it.
It also adds a bunch of new testing coverage for changes. The tests are
particularly around the html part of the LaTeX loading pipeline, but not
the image parts.

More of both will be needed specifically for the image loading pipeline
changes.

* Docs + tests + refactor.

This adds documentation for all remaining components introduced in #2981,
adds some testing for UrlImageParser, and cleans up the image loading
pipeline to be a bit simpler & cleaner (though this will probably break
down-stream PRs relying on image transformations).

* Lint fixes.

* Fix lint failure & re-enable assets.
BenHenning added a commit that referenced this pull request Apr 23, 2021
* Add support for loading proto versions of lessons.

* Upgrade Espresso versions to work around build issues.

Note that I can't actually verify Espresso tests are working with these
versions since the Bazel project doesn't yet have Espresso tests set up.

* Lint fix post-copying from #2927.

* Fix Glide in Bazel.

* Fix concept card name escaping.

Also, refactor HtmlParser to better support/handling different tag types
& prepare for LaTeX SVG image support.

* Copy over test fix from #2927.

* Add support for rendering LaTeX via SVGs.

Much of this is copied from #2927 so see that PR's commit history & the
PR corresponding to this commit for specific details.

* Ensure all thumbnails are opaque.

* Remove image loading annotation.

This will be added in a later branch in the chain.

* Add caching module to needed test suites.

* Re-add image load annotation for this PR.

* Add support for importing text protos as assets.

This actually provides Bazel-only support for converting text protos to
binary and including those as assets so that we can avoid checking in
binary protos to the codebase.

* Add gitignore for Android Studio Bazel plugin output.

* Import textproto versions of existing dev assets.

This imports local conversions of all existing dev assets as text proto
leveraging the Bazel-only conversion system to convert these to binary
protos and include them as assets.

This is a necessary step to both eventually replace JSON assets with
text proto, and to test that the new proto loading pipeline is working
as designed.

* Undo Espresso version change since it breaks Bazel tests.

* Fix tests.

Various attempts to fix existing tests + move some of the domain tests
over to actually using proto when running with Bazel.

App module tests are hanging currently for unknown reasons (only in
Bazel).

* Use correct Espresso core.

3.1.0 causes tests to hang indefinitely when run with Bazel.

* Move coroutine dispatchers.

This moves the coroutine dispatchers to a new threading subpackage. It
also simplifies the TestCoroutineDispatcher interface & implementations
(which required moving runUntilIdle to CoroutineExecutorServiceTest).

The test coroutine annotations were also moved to their own files.

* Refactor testing utilities build graph.

This introduces new Bazel libraries for:
- Test dispatchers
- Fake system/Oppia clocks
- Robolectric dependencies

* Introduce dedicated test for TestCoroutineDispatcher.

This also fixes some threading issues in the dispatcher, and clarifies
some of its API that was previously unclear (and can lead to subtle race
conditions).

* Add tests for TestCoroutineDispatcher.

This required a bunch of refactoring, adding the first examples of
dedicated Bazel test build files, and introducing a new test pattern for
sharing code between different implementations. Further, it refined the
API for TesCoroutineDispatcher & fixed some issues in the
implementations (especially Robolectric).

Tests verified as non-flaky in Robolectric across 1000 runs, and 0.2%
flaky across 1000 runs for Espresso (though that may be fixed; waiting
on a follow-up run to confirm stability).

* Workaround ktlint semicolon issue.

* Lint fixes.

* Fix test post-merge.

* Move CoroutineDispatcher to be part of threading.

* Lint fixes.

* Undo version upgrade.

* Fix broken tests.

* Lint fixes.

* Add a bit more proto loading test coverage.

* Comment fix.

* Lint fixes.

* Address earlier TODO.

* Post-merge restructure.

* Post-merge fixes.

This removes unneeded dependencies from PersistentCacheStore, including
Glide.

* Add tests for new tag handlers.

Also, add tests for HtmlParser, and clean up some existing tests.

* Fix broken test build.

* Post-merge lint fixes.

* Lint fixes.

* Address reviewer comment.

* Post-merge fix.

* Address pre-merge TODO.

* Disable local image loading.

Also, add specific LaTeX line in the first fractions interaction so that
the new SVG support can be tested.

* Fix typo.

* Docs + tests.

This adds more documentation & context for code added before without it.
It also adds a bunch of new testing coverage for changes. The tests are
particularly around the html part of the LaTeX loading pipeline, but not
the image parts.

More of both will be needed specifically for the image loading pipeline
changes.

* Docs + tests + refactor.

This adds documentation for all remaining components introduced in #2981,
adds some testing for UrlImageParser, and cleans up the image loading
pipeline to be a bit simpler & cleaner (though this will probably break
down-stream PRs relying on image transformations).

* Lint fixes.

* Fix lint failure & re-enable assets.

* Clean up + tests.

Add tests where reasonable given current testing limitations and
developing time availability, and remove some dead code. Add new testing
utility (GenericViewMatchers) + corresponding Bazel package.

* Consolidate testing module view matchers.

This moves two other view matchers that are part of the testing module
into the new Espresso package.

* Lint fixes.
BenHenning added a commit that referenced this pull request Apr 23, 2021
* Add support for loading proto versions of lessons.

* Upgrade Espresso versions to work around build issues.

Note that I can't actually verify Espresso tests are working with these
versions since the Bazel project doesn't yet have Espresso tests set up.

* Lint fix post-copying from #2927.

* Fix Glide in Bazel.

* Fix concept card name escaping.

Also, refactor HtmlParser to better support/handling different tag types
& prepare for LaTeX SVG image support.

* Copy over test fix from #2927.

* Add support for rendering LaTeX via SVGs.

Much of this is copied from #2927 so see that PR's commit history & the
PR corresponding to this commit for specific details.

* Ensure all thumbnails are opaque.

* Fix blurring for SVGs.

SVGs did not previous support blurring, & this change introduces a way
to leverage the existing bitmap blurrer to introduce blurring
functionality in a way that's consistent with bitmap thumbnails.

* Lint fixes post copying from #2927.

* Remove image loading annotation.

This will be added in a later branch in the chain.

* Add caching module to needed test suites.

* Re-add image load annotation for this PR.

* Add support for importing text protos as assets.

This actually provides Bazel-only support for converting text protos to
binary and including those as assets so that we can avoid checking in
binary protos to the codebase.

* Add gitignore for Android Studio Bazel plugin output.

* Import textproto versions of existing dev assets.

This imports local conversions of all existing dev assets as text proto
leveraging the Bazel-only conversion system to convert these to binary
protos and include them as assets.

This is a necessary step to both eventually replace JSON assets with
text proto, and to test that the new proto loading pipeline is working
as designed.

* Undo Espresso version change since it breaks Bazel tests.

* Fix tests.

Various attempts to fix existing tests + move some of the domain tests
over to actually using proto when running with Bazel.

App module tests are hanging currently for unknown reasons (only in
Bazel).

* Use correct Espresso core.

3.1.0 causes tests to hang indefinitely when run with Bazel.

* Move coroutine dispatchers.

This moves the coroutine dispatchers to a new threading subpackage. It
also simplifies the TestCoroutineDispatcher interface & implementations
(which required moving runUntilIdle to CoroutineExecutorServiceTest).

The test coroutine annotations were also moved to their own files.

* Refactor testing utilities build graph.

This introduces new Bazel libraries for:
- Test dispatchers
- Fake system/Oppia clocks
- Robolectric dependencies

* Introduce dedicated test for TestCoroutineDispatcher.

This also fixes some threading issues in the dispatcher, and clarifies
some of its API that was previously unclear (and can lead to subtle race
conditions).

* Add tests for TestCoroutineDispatcher.

This required a bunch of refactoring, adding the first examples of
dedicated Bazel test build files, and introducing a new test pattern for
sharing code between different implementations. Further, it refined the
API for TesCoroutineDispatcher & fixed some issues in the
implementations (especially Robolectric).

Tests verified as non-flaky in Robolectric across 1000 runs, and 0.2%
flaky across 1000 runs for Espresso (though that may be fixed; waiting
on a follow-up run to confirm stability).

* Workaround ktlint semicolon issue.

* Lint fixes.

* Fix test post-merge.

* Move CoroutineDispatcher to be part of threading.

* Lint fixes.

* Undo version upgrade.

* Fix broken tests.

* Lint fixes.

* Add a bit more proto loading test coverage.

* Comment fix.

* Lint fixes.

* Address earlier TODO.

* Post-merge restructure.

* Post-merge fixes.

This removes unneeded dependencies from PersistentCacheStore, including
Glide.

* Add tests for new tag handlers.

Also, add tests for HtmlParser, and clean up some existing tests.

* Fix broken test build.

* Post-merge lint fixes.

* Lint fixes.

* Address reviewer comment.

* Post-merge fix.

* Address pre-merge TODO.

* Disable local image loading.

Also, add specific LaTeX line in the first fractions interaction so that
the new SVG support can be tested.

* Fix typo.

* Docs + tests.

This adds more documentation & context for code added before without it.
It also adds a bunch of new testing coverage for changes. The tests are
particularly around the html part of the LaTeX loading pipeline, but not
the image parts.

More of both will be needed specifically for the image loading pipeline
changes.

* Docs + tests + refactor.

This adds documentation for all remaining components introduced in #2981,
adds some testing for UrlImageParser, and cleans up the image loading
pipeline to be a bit simpler & cleaner (though this will probably break
down-stream PRs relying on image transformations).

* Lint fixes.

* Fix lint failure & re-enable assets.

* Clean up + tests.

Add tests where reasonable given current testing limitations and
developing time availability, and remove some dead code. Add new testing
utility (GenericViewMatchers) + corresponding Bazel package.

* Consolidate testing module view matchers.

This moves two other view matchers that are part of the testing module
into the new Espresso package.

* Lint fixes.

* Post-merge fixes + docs.

Add TODOs for tests that can't easily be added. Fill in missing
documentation. Fix post-merge issues to ensure SVGs can actually be
blurred (will be verified after this commit).
BenHenning added a commit that referenced this pull request Apr 24, 2021
…upport new localization structures (#2985)

* Add support for loading proto versions of lessons.

* Upgrade Espresso versions to work around build issues.

Note that I can't actually verify Espresso tests are working with these
versions since the Bazel project doesn't yet have Espresso tests set up.

* Lint fix post-copying from #2927.

* Fix Glide in Bazel.

* Fix concept card name escaping.

Also, refactor HtmlParser to better support/handling different tag types
& prepare for LaTeX SVG image support.

* Copy over test fix from #2927.

* Add support for rendering LaTeX via SVGs.

Much of this is copied from #2927 so see that PR's commit history & the
PR corresponding to this commit for specific details.

* Ensure all thumbnails are opaque.

* Fix interactions to support new localization.

This fixes answer classification, submission, and viewing for drag &
drop, item selection, multiple choice, and text input interactions per
changes in the states structure to support lesson localization.

* Fix blurring for SVGs.

SVGs did not previous support blurring, & this change introduces a way
to leverage the existing bitmap blurrer to introduce blurring
functionality in a way that's consistent with bitmap thumbnails.

* Lint fixes post copying from #2927.

* Remove image loading annotation.

This will be added in a later branch in the chain.

* Add caching module to needed test suites.

* Re-add image load annotation for this PR.

* Add support for importing text protos as assets.

This actually provides Bazel-only support for converting text protos to
binary and including those as assets so that we can avoid checking in
binary protos to the codebase.

* Add gitignore for Android Studio Bazel plugin output.

* Import textproto versions of existing dev assets.

This imports local conversions of all existing dev assets as text proto
leveraging the Bazel-only conversion system to convert these to binary
protos and include them as assets.

This is a necessary step to both eventually replace JSON assets with
text proto, and to test that the new proto loading pipeline is working
as designed.

* Undo Espresso version change since it breaks Bazel tests.

* Fix tests.

Various attempts to fix existing tests + move some of the domain tests
over to actually using proto when running with Bazel.

App module tests are hanging currently for unknown reasons (only in
Bazel).

* Use correct Espresso core.

3.1.0 causes tests to hang indefinitely when run with Bazel.

* Move coroutine dispatchers.

This moves the coroutine dispatchers to a new threading subpackage. It
also simplifies the TestCoroutineDispatcher interface & implementations
(which required moving runUntilIdle to CoroutineExecutorServiceTest).

The test coroutine annotations were also moved to their own files.

* Refactor testing utilities build graph.

This introduces new Bazel libraries for:
- Test dispatchers
- Fake system/Oppia clocks
- Robolectric dependencies

* Introduce dedicated test for TestCoroutineDispatcher.

This also fixes some threading issues in the dispatcher, and clarifies
some of its API that was previously unclear (and can lead to subtle race
conditions).

* Add tests for TestCoroutineDispatcher.

This required a bunch of refactoring, adding the first examples of
dedicated Bazel test build files, and introducing a new test pattern for
sharing code between different implementations. Further, it refined the
API for TesCoroutineDispatcher & fixed some issues in the
implementations (especially Robolectric).

Tests verified as non-flaky in Robolectric across 1000 runs, and 0.2%
flaky across 1000 runs for Espresso (though that may be fixed; waiting
on a follow-up run to confirm stability).

* Workaround ktlint semicolon issue.

* Lint fixes.

* Fix test post-merge.

* Move CoroutineDispatcher to be part of threading.

* Lint fixes.

* Undo version upgrade.

* Fix broken tests.

* Lint fixes.

* Add a bit more proto loading test coverage.

* Comment fix.

* Lint fixes.

* Address earlier TODO.

* Post-merge restructure.

* Post-merge fixes.

This removes unneeded dependencies from PersistentCacheStore, including
Glide.

* Add tests for new tag handlers.

Also, add tests for HtmlParser, and clean up some existing tests.

* Fix broken test build.

* Post-merge lint fixes.

* Lint fixes.

* Address reviewer comment.

* Post-merge fix.

* Address pre-merge TODO.

* Disable local image loading.

Also, add specific LaTeX line in the first fractions interaction so that
the new SVG support can be tested.

* Fix typo.

* Docs + tests.

This adds more documentation & context for code added before without it.
It also adds a bunch of new testing coverage for changes. The tests are
particularly around the html part of the LaTeX loading pipeline, but not
the image parts.

More of both will be needed specifically for the image loading pipeline
changes.

* Docs + tests + refactor.

This adds documentation for all remaining components introduced in #2981,
adds some testing for UrlImageParser, and cleans up the image loading
pipeline to be a bit simpler & cleaner (though this will probably break
down-stream PRs relying on image transformations).

* Lint fixes.

* Fix lint failure & re-enable assets.

* Clean up + tests.

Add tests where reasonable given current testing limitations and
developing time availability, and remove some dead code. Add new testing
utility (GenericViewMatchers) + corresponding Bazel package.

* Consolidate testing module view matchers.

This moves two other view matchers that are part of the testing module
into the new Espresso package.

* Lint fixes.

* Post-merge fixes + docs.

Add TODOs for tests that can't easily be added. Fill in missing
documentation. Fix post-merge issues to ensure SVGs can actually be
blurred (will be verified after this commit).

* Add tests for structural changes.

Revamps StateFragmentTest to include a bunch of new interaction tests to
verify that the new structural changes are correct. These discovered
issues with the old asset converter that needed to be fixed, and new
textproto changes needed to be pulled in.

Removed a few now-unused (or should be unused) asset files.
ExplorationProgressControllerTest is now broken and has to be almost
entirely rewritten to support different explorations. The previous ones
couldn't reasonably be migrated without lots of manual work, so we
abandoned them.

* Rename test (& fix it).

Relevant fixes will be coming in a later commit. This is just committing
the file move.

* Fix/update json assets.

This includes fixes for existing content in textproto files, too, where
the previous conversion script had issues.

Assets that will no longer be included are removed (due to being too
hard to migrate).

The codebase will be broken at this point--thorough test changes are
needed, first.

* Fix a LOT of tests that break due to changes.

Fundamentally, this:
1. Migrates existing structural changes in tests for item selection,
text input, and drag and drop.
2. Introduces proto loading (when run on Bazel) for a few more tests,
including some UI tests.
3. Updates test suites to no longer depend on explorations that weren't
carried over in this change.
4. Cleans up a bunch of existing tests/line wrapping issues and other
things.

* Import structurally updates questions.

This includes proto questions even though they can't yet be imported.
Some tests needed adjustments due to fixes in the questions themselves.

* Post-merge lint fixes.

* Address reviewer comments.

Fix case sensitive checks for text input, and some minor cleanups in
drag & drop interaction view model.

* Fix broken Gradle test.

Another structural change: 'translation' is now the correct reference
for written translations rather than 'html'.
BenHenning added a commit that referenced this pull request Apr 24, 2021
* Add support for loading proto versions of lessons.

* Upgrade Espresso versions to work around build issues.

Note that I can't actually verify Espresso tests are working with these
versions since the Bazel project doesn't yet have Espresso tests set up.

* Lint fix post-copying from #2927.

* Fix Glide in Bazel.

* Fix concept card name escaping.

Also, refactor HtmlParser to better support/handling different tag types
& prepare for LaTeX SVG image support.

* Copy over test fix from #2927.

* Add support for rendering LaTeX via SVGs.

Much of this is copied from #2927 so see that PR's commit history & the
PR corresponding to this commit for specific details.

* Ensure all thumbnails are opaque.

* Fix interactions to support new localization.

This fixes answer classification, submission, and viewing for drag &
drop, item selection, multiple choice, and text input interactions per
changes in the states structure to support lesson localization.

* Fix blurring for SVGs.

SVGs did not previous support blurring, & this change introduces a way
to leverage the existing bitmap blurrer to introduce blurring
functionality in a way that's consistent with bitmap thumbnails.

* Lint fixes post copying from #2927.

* Remove image loading annotation.

This will be added in a later branch in the chain.

* Add caching module to needed test suites.

* Re-add image load annotation for this PR.

* Add support for hiding the questions player.

* Add missing dep from #2927 to fix build.

* Add support for importing text protos as assets.

This actually provides Bazel-only support for converting text protos to
binary and including those as assets so that we can avoid checking in
binary protos to the codebase.

* Add gitignore for Android Studio Bazel plugin output.

* Import textproto versions of existing dev assets.

This imports local conversions of all existing dev assets as text proto
leveraging the Bazel-only conversion system to convert these to binary
protos and include them as assets.

This is a necessary step to both eventually replace JSON assets with
text proto, and to test that the new proto loading pipeline is working
as designed.

* Undo Espresso version change since it breaks Bazel tests.

* Fix tests.

Various attempts to fix existing tests + move some of the domain tests
over to actually using proto when running with Bazel.

App module tests are hanging currently for unknown reasons (only in
Bazel).

* Use correct Espresso core.

3.1.0 causes tests to hang indefinitely when run with Bazel.

* Move coroutine dispatchers.

This moves the coroutine dispatchers to a new threading subpackage. It
also simplifies the TestCoroutineDispatcher interface & implementations
(which required moving runUntilIdle to CoroutineExecutorServiceTest).

The test coroutine annotations were also moved to their own files.

* Refactor testing utilities build graph.

This introduces new Bazel libraries for:
- Test dispatchers
- Fake system/Oppia clocks
- Robolectric dependencies

* Introduce dedicated test for TestCoroutineDispatcher.

This also fixes some threading issues in the dispatcher, and clarifies
some of its API that was previously unclear (and can lead to subtle race
conditions).

* Add tests for TestCoroutineDispatcher.

This required a bunch of refactoring, adding the first examples of
dedicated Bazel test build files, and introducing a new test pattern for
sharing code between different implementations. Further, it refined the
API for TesCoroutineDispatcher & fixed some issues in the
implementations (especially Robolectric).

Tests verified as non-flaky in Robolectric across 1000 runs, and 0.2%
flaky across 1000 runs for Espresso (though that may be fixed; waiting
on a follow-up run to confirm stability).

* Workaround ktlint semicolon issue.

* Lint fixes.

* Fix test post-merge.

* Move CoroutineDispatcher to be part of threading.

* Lint fixes.

* Undo version upgrade.

* Fix broken tests.

* Lint fixes.

* Add a bit more proto loading test coverage.

* Comment fix.

* Lint fixes.

* Address earlier TODO.

* Post-merge restructure.

* Post-merge fixes.

This removes unneeded dependencies from PersistentCacheStore, including
Glide.

* Add tests for new tag handlers.

Also, add tests for HtmlParser, and clean up some existing tests.

* Fix broken test build.

* Post-merge lint fixes.

* Lint fixes.

* Address reviewer comment.

* Post-merge fix.

* Address pre-merge TODO.

* Disable local image loading.

Also, add specific LaTeX line in the first fractions interaction so that
the new SVG support can be tested.

* Fix typo.

* Docs + tests.

This adds more documentation & context for code added before without it.
It also adds a bunch of new testing coverage for changes. The tests are
particularly around the html part of the LaTeX loading pipeline, but not
the image parts.

More of both will be needed specifically for the image loading pipeline
changes.

* Docs + tests + refactor.

This adds documentation for all remaining components introduced in #2981,
adds some testing for UrlImageParser, and cleans up the image loading
pipeline to be a bit simpler & cleaner (though this will probably break
down-stream PRs relying on image transformations).

* Lint fixes.

* Fix lint failure & re-enable assets.

* Clean up + tests.

Add tests where reasonable given current testing limitations and
developing time availability, and remove some dead code. Add new testing
utility (GenericViewMatchers) + corresponding Bazel package.

* Consolidate testing module view matchers.

This moves two other view matchers that are part of the testing module
into the new Espresso package.

* Lint fixes.

* Post-merge fixes + docs.

Add TODOs for tests that can't easily be added. Fill in missing
documentation. Fix post-merge issues to ensure SVGs can actually be
blurred (will be verified after this commit).

* Add tests for structural changes.

Revamps StateFragmentTest to include a bunch of new interaction tests to
verify that the new structural changes are correct. These discovered
issues with the old asset converter that needed to be fixed, and new
textproto changes needed to be pulled in.

Removed a few now-unused (or should be unused) asset files.
ExplorationProgressControllerTest is now broken and has to be almost
entirely rewritten to support different explorations. The previous ones
couldn't reasonably be migrated without lots of manual work, so we
abandoned them.

* Rename test (& fix it).

Relevant fixes will be coming in a later commit. This is just committing
the file move.

* Fix/update json assets.

This includes fixes for existing content in textproto files, too, where
the previous conversion script had issues.

Assets that will no longer be included are removed (due to being too
hard to migrate).

The codebase will be broken at this point--thorough test changes are
needed, first.

* Fix a LOT of tests that break due to changes.

Fundamentally, this:
1. Migrates existing structural changes in tests for item selection,
text input, and drag and drop.
2. Introduces proto loading (when run on Bazel) for a few more tests,
including some UI tests.
3. Updates test suites to no longer depend on explorations that weren't
carried over in this change.
4. Cleans up a bunch of existing tests/line wrapping issues and other
things.

* Import structurally updates questions.

This includes proto questions even though they can't yet be imported.
Some tests needed adjustments due to fixes in the questions themselves.

* Fix post-merge test build failures.

* Add test for when practice tab is disabled.

* Fix new module location per reviewer comment.

* Post-merge lint fixes.

* Address reviewer comments.

Fix case sensitive checks for text input, and some minor cleanups in
drag & drop interaction view model.

* Fix broken Gradle test.

Another structural change: 'translation' is now the correct reference
for written translations rather than 'html'.

* Lint fixes.

* Address reviewer comment.

Adds test with config change.
BenHenning added a commit that referenced this pull request Apr 24, 2021
* Add support for loading proto versions of lessons.

* Upgrade Espresso versions to work around build issues.

Note that I can't actually verify Espresso tests are working with these
versions since the Bazel project doesn't yet have Espresso tests set up.

* Lint fix post-copying from #2927.

* Fix Glide in Bazel.

* Fix concept card name escaping.

Also, refactor HtmlParser to better support/handling different tag types
& prepare for LaTeX SVG image support.

* Copy over test fix from #2927.

* Add support for rendering LaTeX via SVGs.

Much of this is copied from #2927 so see that PR's commit history & the
PR corresponding to this commit for specific details.

* Ensure all thumbnails are opaque.

* Fix interactions to support new localization.

This fixes answer classification, submission, and viewing for drag &
drop, item selection, multiple choice, and text input interactions per
changes in the states structure to support lesson localization.

* Fix blurring for SVGs.

SVGs did not previous support blurring, & this change introduces a way
to leverage the existing bitmap blurrer to introduce blurring
functionality in a way that's consistent with bitmap thumbnails.

* Lint fixes post copying from #2927.

* Remove image loading annotation.

This will be added in a later branch in the chain.

* Add caching module to needed test suites.

* Re-add image load annotation for this PR.

* Add support for hiding the questions player.

* Add missing dep from #2927 to fix build.

* Add support for importing text protos as assets.

This actually provides Bazel-only support for converting text protos to
binary and including those as assets so that we can avoid checking in
binary protos to the codebase.

* Add gitignore for Android Studio Bazel plugin output.

* Import textproto versions of existing dev assets.

This imports local conversions of all existing dev assets as text proto
leveraging the Bazel-only conversion system to convert these to binary
protos and include them as assets.

This is a necessary step to both eventually replace JSON assets with
text proto, and to test that the new proto loading pipeline is working
as designed.

* Undo Espresso version change since it breaks Bazel tests.

* Fix tests.

Various attempts to fix existing tests + move some of the domain tests
over to actually using proto when running with Bazel.

App module tests are hanging currently for unknown reasons (only in
Bazel).

* Use correct Espresso core.

3.1.0 causes tests to hang indefinitely when run with Bazel.

* Add support for concept cards in revision cards.

* Move coroutine dispatchers.

This moves the coroutine dispatchers to a new threading subpackage. It
also simplifies the TestCoroutineDispatcher interface & implementations
(which required moving runUntilIdle to CoroutineExecutorServiceTest).

The test coroutine annotations were also moved to their own files.

* Refactor testing utilities build graph.

This introduces new Bazel libraries for:
- Test dispatchers
- Fake system/Oppia clocks
- Robolectric dependencies

* Introduce dedicated test for TestCoroutineDispatcher.

This also fixes some threading issues in the dispatcher, and clarifies
some of its API that was previously unclear (and can lead to subtle race
conditions).

* Add tests for TestCoroutineDispatcher.

This required a bunch of refactoring, adding the first examples of
dedicated Bazel test build files, and introducing a new test pattern for
sharing code between different implementations. Further, it refined the
API for TesCoroutineDispatcher & fixed some issues in the
implementations (especially Robolectric).

Tests verified as non-flaky in Robolectric across 1000 runs, and 0.2%
flaky across 1000 runs for Espresso (though that may be fixed; waiting
on a follow-up run to confirm stability).

* Workaround ktlint semicolon issue.

* Lint fixes.

* Fix test post-merge.

* Move CoroutineDispatcher to be part of threading.

* Lint fixes.

* Undo version upgrade.

* Fix broken tests.

* Lint fixes.

* Add a bit more proto loading test coverage.

* Comment fix.

* Lint fixes.

* Address earlier TODO.

* Post-merge restructure.

* Post-merge fixes.

This removes unneeded dependencies from PersistentCacheStore, including
Glide.

* Add tests for new tag handlers.

Also, add tests for HtmlParser, and clean up some existing tests.

* Fix broken test build.

* Post-merge lint fixes.

* Lint fixes.

* Address reviewer comment.

* Post-merge fix.

* Address pre-merge TODO.

* Disable local image loading.

Also, add specific LaTeX line in the first fractions interaction so that
the new SVG support can be tested.

* Fix typo.

* Docs + tests.

This adds more documentation & context for code added before without it.
It also adds a bunch of new testing coverage for changes. The tests are
particularly around the html part of the LaTeX loading pipeline, but not
the image parts.

More of both will be needed specifically for the image loading pipeline
changes.

* Docs + tests + refactor.

This adds documentation for all remaining components introduced in #2981,
adds some testing for UrlImageParser, and cleans up the image loading
pipeline to be a bit simpler & cleaner (though this will probably break
down-stream PRs relying on image transformations).

* Lint fixes.

* Fix lint failure & re-enable assets.

* Clean up + tests.

Add tests where reasonable given current testing limitations and
developing time availability, and remove some dead code. Add new testing
utility (GenericViewMatchers) + corresponding Bazel package.

* Consolidate testing module view matchers.

This moves two other view matchers that are part of the testing module
into the new Espresso package.

* Lint fixes.

* Post-merge fixes + docs.

Add TODOs for tests that can't easily be added. Fill in missing
documentation. Fix post-merge issues to ensure SVGs can actually be
blurred (will be verified after this commit).

* Add tests for structural changes.

Revamps StateFragmentTest to include a bunch of new interaction tests to
verify that the new structural changes are correct. These discovered
issues with the old asset converter that needed to be fixed, and new
textproto changes needed to be pulled in.

Removed a few now-unused (or should be unused) asset files.
ExplorationProgressControllerTest is now broken and has to be almost
entirely rewritten to support different explorations. The previous ones
couldn't reasonably be migrated without lots of manual work, so we
abandoned them.

* Rename test (& fix it).

Relevant fixes will be coming in a later commit. This is just committing
the file move.

* Fix/update json assets.

This includes fixes for existing content in textproto files, too, where
the previous conversion script had issues.

Assets that will no longer be included are removed (due to being too
hard to migrate).

The codebase will be broken at this point--thorough test changes are
needed, first.

* Fix a LOT of tests that break due to changes.

Fundamentally, this:
1. Migrates existing structural changes in tests for item selection,
text input, and drag and drop.
2. Introduces proto loading (when run on Bazel) for a few more tests,
including some UI tests.
3. Updates test suites to no longer depend on explorations that weren't
carried over in this change.
4. Cleans up a bunch of existing tests/line wrapping issues and other
things.

* Import structurally updates questions.

This includes proto questions even though they can't yet be imported.
Some tests needed adjustments due to fixes in the questions themselves.

* Fix post-merge test build failures.

* Add test for when practice tab is disabled.

* Fix new module location per reviewer comment.

* Add concept card tests for revision cards.

This required some small updates to one of the revision card test assets
(for both JSON & textproto variants).

* Enable proto loading for revision card testing.

* Post-merge lint fixes.

* Address reviewer comments.

Fix case sensitive checks for text input, and some minor cleanups in
drag & drop interaction view model.

* Fix broken Gradle test.

Another structural change: 'translation' is now the correct reference
for written translations rather than 'html'.

* Lint fixes.

* Lint fixes.

* Address reviewer comment.

Adds test with config change.

* Address reviewer comment.

Move CONCEPT_CARD_DIALOG_FRAGMENT_TEST to ConceptCardFragment's
Companion object.

* Fix broken test.

* Lint fixes.
BenHenning added a commit that referenced this pull request Apr 24, 2021
…ent nonstandard keyboards (#3116)

* Add support for loading proto versions of lessons.

* Upgrade Espresso versions to work around build issues.

Note that I can't actually verify Espresso tests are working with these
versions since the Bazel project doesn't yet have Espresso tests set up.

* Lint fix post-copying from #2927.

* Fix Glide in Bazel.

* Fix concept card name escaping.

Also, refactor HtmlParser to better support/handling different tag types
& prepare for LaTeX SVG image support.

* Copy over test fix from #2927.

* Add support for rendering LaTeX via SVGs.

Much of this is copied from #2927 so see that PR's commit history & the
PR corresponding to this commit for specific details.

* Ensure all thumbnails are opaque.

* Fix interactions to support new localization.

This fixes answer classification, submission, and viewing for drag &
drop, item selection, multiple choice, and text input interactions per
changes in the states structure to support lesson localization.

* Fix blurring for SVGs.

SVGs did not previous support blurring, & this change introduces a way
to leverage the existing bitmap blurrer to introduce blurring
functionality in a way that's consistent with bitmap thumbnails.

* Lint fixes post copying from #2927.

* Remove image loading annotation.

This will be added in a later branch in the chain.

* Add caching module to needed test suites.

* Re-add image load annotation for this PR.

* Add support for hiding the questions player.

* Add missing dep from #2927 to fix build.

* Add support for importing text protos as assets.

This actually provides Bazel-only support for converting text protos to
binary and including those as assets so that we can avoid checking in
binary protos to the codebase.

* Add gitignore for Android Studio Bazel plugin output.

* Import textproto versions of existing dev assets.

This imports local conversions of all existing dev assets as text proto
leveraging the Bazel-only conversion system to convert these to binary
protos and include them as assets.

This is a necessary step to both eventually replace JSON assets with
text proto, and to test that the new proto loading pipeline is working
as designed.

* Undo Espresso version change since it breaks Bazel tests.

* Fix tests.

Various attempts to fix existing tests + move some of the domain tests
over to actually using proto when running with Bazel.

App module tests are hanging currently for unknown reasons (only in
Bazel).

* Use correct Espresso core.

3.1.0 causes tests to hang indefinitely when run with Bazel.

* Add support for concept cards in revision cards.

* Move coroutine dispatchers.

This moves the coroutine dispatchers to a new threading subpackage. It
also simplifies the TestCoroutineDispatcher interface & implementations
(which required moving runUntilIdle to CoroutineExecutorServiceTest).

The test coroutine annotations were also moved to their own files.

* Refactor testing utilities build graph.

This introduces new Bazel libraries for:
- Test dispatchers
- Fake system/Oppia clocks
- Robolectric dependencies

* Introduce dedicated test for TestCoroutineDispatcher.

This also fixes some threading issues in the dispatcher, and clarifies
some of its API that was previously unclear (and can lead to subtle race
conditions).

* Add tests for TestCoroutineDispatcher.

This required a bunch of refactoring, adding the first examples of
dedicated Bazel test build files, and introducing a new test pattern for
sharing code between different implementations. Further, it refined the
API for TesCoroutineDispatcher & fixed some issues in the
implementations (especially Robolectric).

Tests verified as non-flaky in Robolectric across 1000 runs, and 0.2%
flaky across 1000 runs for Espresso (though that may be fixed; waiting
on a follow-up run to confirm stability).

* Workaround ktlint semicolon issue.

* Lint fixes.

* Fix test post-merge.

* Move CoroutineDispatcher to be part of threading.

* Lint fixes.

* Undo version upgrade.

* Fix broken tests.

* Lint fixes.

* Add a bit more proto loading test coverage.

* Comment fix.

* Lint fixes.

* Address earlier TODO.

* Post-merge restructure.

* Post-merge fixes.

This removes unneeded dependencies from PersistentCacheStore, including
Glide.

* Add tests for new tag handlers.

Also, add tests for HtmlParser, and clean up some existing tests.

* Fix broken test build.

* Post-merge lint fixes.

* Lint fixes.

* Address reviewer comment.

* Post-merge fix.

* Address pre-merge TODO.

* Disable local image loading.

Also, add specific LaTeX line in the first fractions interaction so that
the new SVG support can be tested.

* Fix typo.

* Docs + tests.

This adds more documentation & context for code added before without it.
It also adds a bunch of new testing coverage for changes. The tests are
particularly around the html part of the LaTeX loading pipeline, but not
the image parts.

More of both will be needed specifically for the image loading pipeline
changes.

* Docs + tests + refactor.

This adds documentation for all remaining components introduced in #2981,
adds some testing for UrlImageParser, and cleans up the image loading
pipeline to be a bit simpler & cleaner (though this will probably break
down-stream PRs relying on image transformations).

* Lint fixes.

* Fix lint failure & re-enable assets.

* Clean up + tests.

Add tests where reasonable given current testing limitations and
developing time availability, and remove some dead code. Add new testing
utility (GenericViewMatchers) + corresponding Bazel package.

* Consolidate testing module view matchers.

This moves two other view matchers that are part of the testing module
into the new Espresso package.

* Lint fixes.

* Post-merge fixes + docs.

Add TODOs for tests that can't easily be added. Fill in missing
documentation. Fix post-merge issues to ensure SVGs can actually be
blurred (will be verified after this commit).

* Add tests for structural changes.

Revamps StateFragmentTest to include a bunch of new interaction tests to
verify that the new structural changes are correct. These discovered
issues with the old asset converter that needed to be fixed, and new
textproto changes needed to be pulled in.

Removed a few now-unused (or should be unused) asset files.
ExplorationProgressControllerTest is now broken and has to be almost
entirely rewritten to support different explorations. The previous ones
couldn't reasonably be migrated without lots of manual work, so we
abandoned them.

* Rename test (& fix it).

Relevant fixes will be coming in a later commit. This is just committing
the file move.

* Fix/update json assets.

This includes fixes for existing content in textproto files, too, where
the previous conversion script had issues.

Assets that will no longer be included are removed (due to being too
hard to migrate).

The codebase will be broken at this point--thorough test changes are
needed, first.

* Fix a LOT of tests that break due to changes.

Fundamentally, this:
1. Migrates existing structural changes in tests for item selection,
text input, and drag and drop.
2. Introduces proto loading (when run on Bazel) for a few more tests,
including some UI tests.
3. Updates test suites to no longer depend on explorations that weren't
carried over in this change.
4. Cleans up a bunch of existing tests/line wrapping issues and other
things.

* Import structurally updates questions.

This includes proto questions even though they can't yet be imported.
Some tests needed adjustments due to fixes in the questions themselves.

* Fix post-merge test build failures.

* Add test for when practice tab is disabled.

* Fix new module location per reviewer comment.

* Add concept card tests for revision cards.

This required some small updates to one of the revision card test assets
(for both JSON & textproto variants).

* Enable proto loading for revision card testing.

* Use standard keyboard for fractions & ratios.

* Post-merge lint fixes.

* Address reviewer comments.

Fix case sensitive checks for text input, and some minor cleanups in
drag & drop interaction view model.

* Fix broken Gradle test.

Another structural change: 'translation' is now the correct reference
for written translations rather than 'html'.

* Lint fixes.

* Lint fixes.

* Address reviewer comment.

Adds test with config change.

* Address reviewer comment.

Move CONCEPT_CARD_DIALOG_FRAGMENT_TEST to ConceptCardFragment's
Companion object.

* Fix broken test.

* Lint fixes.

* Add tests for fraction + ratio input types.

Also, fix comment in FractionInputInteractionView.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant