79407121

Date: 2025-02-02 18:48:11
Score: 1.5
Natty:
Report link

Solved it. I needed to use ```DatabaseCleaner.strategy = :truncation`` instead of :transaction

In the past I've been running Cucumber tests inside rack with the browser being controlled locally so that records created are visible to the browser.

But I can't do that when running inside a docker container. So I have to use a dockerised selenium which runs remotely. Therefore the default database cleaner strategy, :transaction won't work because records would be created inside a transaction, are are therefore invisible to remote selenium.

Once I switched to :truncation it all worked.

Reasons:
  • Blacklisted phrase (0.5): I need
  • Long answer (-0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: John Small