Commit graph

7 commits

Author SHA1 Message Date
DannyS712
f10795c3cd EditPage: Add two more constraints
- AutoSummaryMissingSummaryConstraint
- SelfRedirectConstraint

Bug: T157658
Change-Id: I0bc29d81ec3df6228a04f41df66b53b113792e38
2020-11-11 23:15:42 +00:00
DannyS712
3b0c5e579b Move EditPage::runPostMergeFilters to a constraint
Bug: T157658
Change-Id: I071163d6d2538948693527c36e8e59281f528402
2020-11-10 23:34:20 +00:00
DannyS712
d7a737fca9 Rename MissingSummaryConstraint to NewSectionMissingSummaryConstraint
There is another place a missing summary is
checked, with different parameters and under
different conditions

Bug: T157658
Change-Id: I988a34a2a130244e6e250259b66727ef979a91ec
2020-11-09 22:59:20 +00:00
DannyS712
44418378e0 EditPage: Factor out more constraints
CreationPermissionConstraint
DefaultTextConstraint
MissingCommentConstraint
MissingSummaryConstraint

Bug: T157658
Change-Id: I55cf336ff6dfb990045e43e6dcd7437a241a46b2
2020-11-04 21:29:54 +00:00
DannyS712
cc8bab4111 Add PageSizeConstraint and ChangeTagsConstraint
Bug: T157658
Change-Id: I2c7b4f77cd07c72b42eaeb7e37095461c92b367a
2020-10-28 16:03:02 +00:00
DannyS712
f40958384a Clean up EditPageConstraintsTest
Bug: T157658
Change-Id: I5364909e605c86e91c0dea1ca8e4e02ac8219266
2020-10-28 02:50:26 +00:00
DannyS712
05ae763ba2 EditPage: Migrate more checks to constraint
Add
- ContentModelChangeConstraint
- EditRightConstraint
- ImageRedirectConstraint
- ReadOnlyConstraint
- UserBlockConstraint
- UserRateLimitConstraint

Additionally:
- Split EditPageTest into a separate file for
all of the constraints being tested

- Add a helper EditConstraintTestTrait

- Add debug logging for EditConstraintRunner for
the result of each constraint

- Changed the order of some of the checks, which
may result in a different failure code if multiple
checks were going to fail, but shouldn't change the
overall result of whether an edit fails or not.

Bug: T157658
Change-Id: Ib8f8b62b9928544e5559c96d82bf850dd8cf9b05
2020-10-26 22:01:05 +00:00