Switch all cases of window.location over to RB.navigateTo.

Review Request #12736 — Created Nov. 22, 2022 and submitted — Latest diff uploaded

Information

Review Board
release-6.x

Reviewers

The new navigateTo method allows us to spy on things that would cause
the page to reload or navigate away during the test suite. We have a
couple cases of similar methods that were just part of other objects,
and a bunch of cases where we were assigning directly to
window.location. This change switches everything over to the new one.

Ran js-tests.

Diff Revision 1

This is not the most recent revision of the diff. The latest diff is revision 2. See what's changed.

orig
1
2

Commits

First Last Summary ID Author
Switch all cases of window.location over to RB.navigateTo.
The new `navigateTo` method allows us to spy on things that would cause the page to reload or navigate away during the test suite. We have a couple cases of similar methods that were just part of other objects, and a bunch of cases where we were assigning directly to `window.location`. This change switches everything over to the new one. Testing Done: Ran js-tests.
6ec3eeea2fd183b38eb9690436d42fbb356ae01f David Trowbridge
reviewboard/static/rb/js/models/uploadDiffModel.es6.js
reviewboard/static/rb/js/newReviewRequest/views/commitView.es6.js
reviewboard/static/rb/js/newReviewRequest/views/newReviewRequestView.es6.js
reviewboard/static/rb/js/newReviewRequest/views/postCommitView.es6.js
reviewboard/static/rb/js/newReviewRequest/views/tests/postCommitViewTests.es6.js
reviewboard/static/rb/js/pages/views/reviewablePageView.es6.js
reviewboard/static/rb/js/reviewRequestPage/views/reviewRequestPageView.es6.js
reviewboard/static/rb/js/views/draftReviewBannerView.es6.js
reviewboard/static/rb/js/views/dummyReviewableView.es6.js
reviewboard/static/rb/js/views/imageReviewableView.es6.js
reviewboard/static/rb/js/views/reviewRequestEditorView.es6.js
reviewboard/static/rb/js/views/textBasedReviewableView.es6.js
reviewboard/static/rb/js/views/tests/reviewRequestEditorViewTests.es6.js
Loading...