Add test cases for E-needstest issues

Closes #6991.
Closes #7867.
Closes #12028.
Closes #12863.
Closes #14091.
Closes #14721.
Closes #16560.
Closes #16668.
Closes #16683.
Closes #17021.
Closes #17551.
Closes #18118.
Closes #18252.