Skip to content

Commit

Permalink
Reenable the test
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Mar 7, 2018
1 parent 3c6a6a7 commit 804599f
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions test/UITests/Tests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -67,45 +67,45 @@ let tests =

logout()

// testCase "create and remove book" <| fun () ->
// startApp ()
// login ()
testCase "create and remove book" <| fun () ->
startApp ()
login ()

// let initBookRows =
// match someElement "table tbody tr" with
// | Some (_) -> elements "table tbody tr"
// | None -> []
let initBookRows =
match someElement "table tbody tr" with
| Some (_) -> elements "table tbody tr"
| None -> []

// let bookTitle = "Expert F# 4.0"
// let bookAuthor = "Don Syme & Adam Granicz & Antonio Cisternino"
// let bookLink = "https://www.amazon.com/Expert-F-4-0-Don-Syme/dp/1484207416"
let bookTitle = "Expert F# 4.0"
let bookAuthor = "Don Syme & Adam Granicz & Antonio Cisternino"
let bookLink = "https://www.amazon.com/Expert-F-4-0-Don-Syme/dp/1484207416"

// "input[name=Title]" << bookTitle
// "input[name=Author]" << bookAuthor
// "input[name=Link]" << bookLink
"input[name=Title]" << bookTitle
"input[name=Author]" << bookAuthor
"input[name=Link]" << bookLink

// click ".btn"
click ".btn"

// let titleElement = element bookTitle
// let authorElement = element bookAuthor
// let removeBtn = titleElement |> parent |> parent |> elementWithin "Remove"
let titleElement = element bookTitle
let authorElement = element bookAuthor
let removeBtn = titleElement |> parent |> parent |> elementWithin "Remove"

// let href = titleElement.GetAttribute("href")
// Expect.equal href bookLink "title element's href should be book link"
let href = titleElement.GetAttribute("href")
Expect.equal href bookLink "title element's href should be book link"

// let currBookRows = elements "table tbody tr"
// Expect.equal currBookRows.Length (initBookRows.Length + 1) "should add a new book"
let currBookRows = elements "table tbody tr"
Expect.equal currBookRows.Length (initBookRows.Length + 1) "should add a new book"

// let bookRemoved () =
// match someElement bookTitle with
// | Some (_) -> false
// | None -> true
let bookRemoved () =
match someElement bookTitle with
| Some (_) -> false
| None -> true

// click removeBtn
// waitFor bookRemoved
click removeBtn
waitFor bookRemoved

// let currBookRows = elements "table tbody tr"
// Expect.equal currBookRows.Length initBookRows.Length "should remove the new book"
let currBookRows = elements "table tbody tr"
Expect.equal currBookRows.Length initBookRows.Length "should remove the new book"

// logout ()
logout ()
]

0 comments on commit 804599f

Please sign in to comment.