Open jason0x43 opened 4 years ago
We'll need to work out a pattern for tests. Some tests look at pre-set features to decide whether to skip the test so as to avoid testing features that are known not to work.
Some notes from my initial pass at this:
discoverServerFeature
don't seem to be used anywhere.
Currently Intern's webdriver code performs a battery of feature tests when a session is started to determine which commands are broken and whether some follow the JWP or W3C standard. These tests are necessary for Intern to provide a consistent experience across different browsers. However, they are slow and often confusing to users since it may appear that unknown tests are running. They also perform unnecessary work since users may only use a fraction of the commands being tested.
Instead, Intern should set feature flags if and when commands fail. The basic pattern should be:
The above strategy could be tweaked if there are multiple levels of fallback logic (maybe from W3C -> JWP -> JS emulation).
Note that some up-front feature tests may still be needed; there are cases where calling certain commands, particularly with IE, Safari, and some versions of geckodriver, can completely hang a remote browser. These are documented in the Leadfoot source. Flags for those features are set without running tests, and should continue to be set this way.
This issue is related to #1105, which may affect the set of capability flags that Intern uses.
See #1046