WIP: Move Batch Page Size Into State
What does this MR do?
For #197402 (closed)
Moves the value that determines how many files to request per batch diff load into state.
The initial value is still set via a constant, but the UI behavior is updated to use the value in state.
Why
To confirm that #197402 (closed) doesn't happen again, we want to add some regression tests.
To add those tests, we'd like to be able to control the size of the batch pages so that we can force batching to occur even on small MRs. There isn't a very good way to mock exports from JS files in Capybara, but we can make changes to the state.
This change allows us to manually modify the page size in some RSpec tests.
In the future, this could also allow power users to modify the batch paging size via some UI control (this does not currently exist, just guessing that it may be desirable at some point).
Screenshots
N/A; ~backstage -only changes.
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
~~Label as security and @ mention @gitlab-com/gl-security/appsec
~~ -
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team