Skip to content

Commit

Permalink
Stop ignoring some tests on chromedriver (#29)
Browse files Browse the repository at this point in the history
These are passing because chromedriver is now spec compliant by default.

Co-authored-by: nbloomf <[email protected]>
  • Loading branch information
nbloomf and nbloomf authored Mar 27, 2021
1 parent a1433ff commit 3c4982a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ invalidElementStateExit
invalidElementStateExit buildTestCase dir =
let path = dir ++ "/invalidElementState.html" in
T.testGroup "Invalid Element State"
[ ifDriverIs Chromedriver TE.ignoreTest $
buildTestCase "elementClear" (_test_elementClear_invalid_element_state path)
[ buildTestCase "elementClear" (_test_elementClear_invalid_element_state path)
]


Expand Down
39 changes: 16 additions & 23 deletions test/Web/Api/WebDriver/Monad/Test/Session/Success.hs
Original file line number Diff line number Diff line change
Expand Up @@ -57,44 +57,33 @@ successfulExit buildTestCase dir =
, buildTestCase "getActiveElement" (_test_getActiveElement_success)
, buildTestCase "isElementSelected" (_test_isElementSelected_success path)
, buildTestCase "getElementAttribute" (_test_getElementAttribute_success path)
, ifDriverIs Chromedriver TE.ignoreTest
$ buildTestCase "getElementCssValue" (_test_getElementCssValue_success path)
, buildTestCase "getElementCssValue" (_test_getElementCssValue_success path)
, buildTestCase "getElementText" (_test_getElementText_success path)
, buildTestCase "getElementTagName" (_test_getElementTagName_success path)
, ifDriverIs Chromedriver TE.ignoreTest
$ buildTestCase "getElementRect" (_test_getElementRect_success path)
, buildTestCase "getElementRect" (_test_getElementRect_success path)
, buildTestCase "isElementEnabled" (_test_isElementEnabled_success path)
, buildTestCase "elementClick" (_test_elementClick_success path)
, buildTestCase "elementClear" (_test_elementClear_success path)
, ifDriverIs Chromedriver TE.ignoreTest
$ buildTestCase "elementSendKeys" (_test_elementSendKeys_success path)
, buildTestCase "elementSendKeys" (_test_elementSendKeys_success path)
, buildTestCase "getPageSource" (_test_getPageSource_success path)
, buildTestCase "getPageSourceStealth" (_test_getPageSourceStealth_success path)
, buildTestCase "getAllCookies" (_test_getAllCookies_success path)
, ifDriverIs Chromedriver TE.ignoreTest
$ T.localOption (PrivateMode False)
$ buildTestCase "getNamedCookie" (_test_getNamedCookie_success path)
, ifDriverIs Chromedriver TE.ignoreTest
$ buildTestCase "deleteCookie" (_test_deleteCookie_success path)
, buildTestCase "deleteCookie" (_test_deleteCookie_success path)
, buildTestCase "deleteAllCookies" (_test_deleteAllCookies_success)
, ifDriverIs Chromedriver TE.ignoreTest
$ buildTestCase "performActions (keyboard)" (_test_performActions_keyboard_success)
, ifDriverIs Chromedriver TE.ignoreTest
$ buildTestCase "performActionsStealth (keyboard)" (_test_performActionsStealth_keyboard_success)
, ifDriverIs Chromedriver TE.ignoreTest
$ buildTestCase "releaseActions" (_test_releaseActions_success)
, ifDriverIs Chromedriver TE.ignoreTest
$ buildTestCase "dismissAlert" (_test_dismissAlert_success path)
, ifDriverIs Chromedriver TE.ignoreTest
$ buildTestCase "acceptAlert" (_test_acceptAlert_success path)
, buildTestCase "performActions (keyboard)" (_test_performActions_keyboard_success)
, buildTestCase "performActionsStealth (keyboard)" (_test_performActionsStealth_keyboard_success)
, buildTestCase "releaseActions" (_test_releaseActions_success)
, buildTestCase "dismissAlert" (_test_dismissAlert_success path)
, buildTestCase "acceptAlert" (_test_acceptAlert_success path)
, ifDriverIs Chromedriver TE.ignoreTest
$ ifHeadless TE.ignoreTest
$ buildTestCase "getAlertText" (_test_getAlertText_success path)
, ifDriverIs Chromedriver TE.ignoreTest
$ buildTestCase "sendAlertText" (_test_sendAlertText_success path)
, buildTestCase "sendAlertText" (_test_sendAlertText_success path)
, buildTestCase "takeScreenshot" (_test_takeScreenshot_success path)
, ifDriverIs Chromedriver TE.ignoreTest
$ buildTestCase "takeElementScreenshot" (_test_takeElementScreenshot_success path)
, buildTestCase "takeElementScreenshot" (_test_takeElementScreenshot_success path)
]


Expand Down Expand Up @@ -543,7 +532,11 @@ _test_getElementCssValue_success page =
case text of
"none" -> assertSuccess "yay"
"rgb(0, 0, 0)" -> assertSuccess "yay"
_ -> assertFailure $ AssertionComment $ "expected 'none' or 'rgb(0, 0, 0)', got '" ++ text ++ "'"
"none solid rgb(0, 0, 0)" -> assertSuccess "yay"
_ -> assertFailure $ AssertionComment $ mconcat
[ "expected 'none' or 'rgb(0, 0, 0)' or 'none solid rgb(0, 0, 0)', got '"
, text, "'"
]
return ()

in catchError session unexpectedError
Expand Down
3 changes: 1 addition & 2 deletions test/Web/Api/WebDriver/Monad/Test/Session/UnknownError.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ unknownErrorExit
-> FilePath
-> T.TestTree
unknownErrorExit buildTestCase path = T.testGroup "Unknown Error"
[ ifDriverIs Chromedriver TE.ignoreTest $
buildTestCase "navigateTo" (_test_navigateTo_unknown_error)
[ buildTestCase "navigateTo" (_test_navigateTo_unknown_error)
]


Expand Down

0 comments on commit 3c4982a

Please sign in to comment.