Distinguishing between wet and dry atmospheres of TRAPPIST-1 e and f