Consider a Selenium test that does some steps on the UI (e.g. fill a field and then click a save button), and afterwards checks with a DB query if the data entered in the new field was really saved into the DB.
Is this good or bad practice? What are the advantages and disadvantages of such an approach?
(Let's suppose that the change would be testable in the UI as well -- otherwise, why write something into the DB, if we do not want to show it on the UI at all?)