Typography

活版印字


  • Home
  • Archive
  • Categories
  • Tags
  •  

© 2020 alincode

Theme Typography by Makito

Proudly published with Hexo

Geb 0.10.x ~ 0.12.x 更新重點

Posted at 2016-04-02

0.12.2

  • 改善對 Null 的驗證 #398

0.12.1

  • 針對 Intellij 的抱怨修改 waitFor() 使得 waitFor() 可在 Intellij 被辨識 #391
  • 修正 class attribute selector 的錯誤,兩種寫法都應該可以正常執行。 390

寫法一

1
2
3
static content = {
userMenuButton { $('a.user-menu-button') }
}

寫法二

1
2
3
static content = {
userMenuButton { $('a', class: 'user-menu-button') }
}

0.12.0

  • 特別對 Page 和 module,有多項改善
  • 改善錯誤訊息,讓開發者更容易除錯

新功能

  • 支援 page 的 title 可以帶變數,變成可動態的。#310
1
2
3
4
5
6
7
8
9
10
11
class ProductPage extends Page {
String productId

ProductPage(String productId) {
this.productId = productId
}

static at = { title == "Product '$productId'" }
}

to new ProductPage("myId")
  • 支援在 Page 內,也可以使用 click 方法,做頁面切換#183
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class ListPage extends Page {
static content = {
movie(to: MoviePage) { $("a.movie", text: contains(it) }
}
}

class MoviePage extends Page {
static at = { title == movieTitle }
String movieTitle

}

at ListPage
movie.click { movieTitle = "Jaws" }
at MoviePage
  • 改善 WaitTimeoutException 的錯誤訊息 #386
1
2
3
4
5
6
7
8
9
10
11
def "waitFor block exception message contains cause"() {
given:
def wait = new Wait(0.5)

when:
wait.waitFor { 'not empty'.empty }

then:
WaitTimeoutException exception = thrown()
exception.message.contains("'not empty'.empty")
}

test case

  • 改善 UnexpectedPageException 的錯誤訊息

Deprecations

  • module(Class<? extends Module>, Map args) 被 Navigator.module(Module) 取代#311
  • module(Class<? extends Module>, Navigator base, Map args) 被 Navigable.module(Module) 取代

重大改變

  • Page.toString() now returns full page class name instead of its simple name.
  • MissingPropertyException is thrown instead of UnresolvablePropertyException when content with a given name is not found on page or module.
  • 建構在 Groovy 2.3.10 and Spock 1.0-groovy-2.3

0.10.0

增加對 cloud browsers 的支援度

新功能

  • Navigator 新增了一個 css() #141
  • 在 content 定義的區塊,多了一個 atWait 的屬性,以增加對 ajax 動態新增元素的支援度 #134
    1
    2
    3
    static content = {
    submitButton(to: SuccessPage, toWait: true) { send() }
    }

    bugs 修復

  • 修復 manipulating checkboxes 取值時的問題 #268
  • 修復 withNewWindow() 和 withWindow() 再切換頁面時的一個小問題 #279

Share 

 Previous post: PM2 管理工具 Next post: Geb 0.13.x 更新重點 

© 2020 alincode

Theme Typography by Makito

Proudly published with Hexo