retest/recheck-web

Allow passing custom RetestIdProvider and AttributesProvider instances to RecheckSeleniumAdapter

tdauth opened this issue · 1 comments

For Surili we need to get an empty retest ID and filter for custom attributes to keep the number of states smaller. If we use system properties for both, it will affect tests which do use recheck-web and not Surili, too. We cannot guarantee that a customer does not mix both in the same project.

A cleaner approach would be something like this:

final RetestIdProvider suriliRetestIdProvider = new SuriliRetestIdProvider();
final AttributesProvider suriliAttributesProvider = new SuriliAttributesProvider();
final RecheckAdapter recheckAdapter = new RecheckSeleniumAdapter(suriliRetestIdProvider, suriliAttributesProvider);
final Set<RootElement> rootElements = recheckAdapter.convert( driver );
final SutState sutState = new SutState( rootElements );

We need a constructor for RecheckSeleniumAdapter which allows specifying both. The default constructor could still use the singleton instances.
Maybe we should also define interfaces for RetestIdProvider and AttributesProvider.

Resolved via #210.