@@ -33,7 +33,7 @@ func TestRepoCommits(t *testing.T) {
3333 resp := session .MakeRequest (t , req , http .StatusOK )
3434
3535 doc := NewHTMLParser (t , resp .Body )
36- commitURL , exists := doc .doc .Find ("#commits-table .commit-id-short" ).Attr ("href" )
36+ commitURL , exists := doc .doc .Find (".timeline.commits_list_group_by_date .commit_sign_badge .commit-id-short" ).Attr ("href" )
3737 assert .True (t , exists )
3838 assert .NotEmpty (t , commitURL )
3939}
@@ -50,7 +50,7 @@ func Test_ReposGitCommitListNotMaster(t *testing.T) {
5050
5151 doc := NewHTMLParser (t , resp .Body )
5252 commits := []string {}
53- doc .doc .Find ("#commits-table .commit-id-short" ).Each (func (i int , s * goquery.Selection ) {
53+ doc .doc .Find (".timeline.commits_list_group_by_date .commit_sign_badge .commit-id-short" ).Each (func (i int , s * goquery.Selection ) {
5454 commitURL , exists := s .Attr ("href" )
5555 assert .True (t , exists )
5656 assert .NotEmpty (t , commitURL )
@@ -63,7 +63,7 @@ func Test_ReposGitCommitListNotMaster(t *testing.T) {
6363 assert .Equal (t , "5099b81332712fe655e34e8dd63574f503f61811" , commits [2 ])
6464
6565 userNames := []string {}
66- doc .doc .Find ("#commits-table .author-wrapper" ).Each (func (i int , s * goquery.Selection ) {
66+ doc .doc .Find (".timeline.commits_list_group_by_date .description .author-wrapper" ).Each (func (i int , s * goquery.Selection ) {
6767 userPath , exists := s .Attr ("href" )
6868 assert .True (t , exists )
6969 assert .NotEmpty (t , userPath )
@@ -87,7 +87,7 @@ func doTestRepoCommitWithStatus(t *testing.T, state string, classes ...string) {
8787
8888 doc := NewHTMLParser (t , resp .Body )
8989 // Get first commit URL
90- commitURL , exists := doc .doc .Find ("#commits-table .commit-id-short" ).Attr ("href" )
90+ commitURL , exists := doc .doc .Find (".timeline.commits_list_group_by_date .commit_sign_badge .commit-id-short" ).Attr ("href" )
9191 assert .True (t , exists )
9292 assert .NotEmpty (t , commitURL )
9393
@@ -105,7 +105,7 @@ func doTestRepoCommitWithStatus(t *testing.T, state string, classes ...string) {
105105
106106 doc = NewHTMLParser (t , resp .Body )
107107 // Check if commit status is displayed in message column (.tippy-target to ignore the tippy trigger)
108- sel := doc .doc .Find ("#commits-table .message .tippy-target .commit-status" )
108+ sel := doc .doc .Find (".timeline.commits_list_group_by_date .description .tippy-target .commit-status" )
109109 assert .Equal (t , 1 , sel .Length ())
110110 for _ , class := range classes {
111111 assert .True (t , sel .HasClass (class ))
@@ -181,7 +181,7 @@ func TestRepoCommitsStatusParallel(t *testing.T) {
181181
182182 doc := NewHTMLParser (t , resp .Body )
183183 // Get first commit URL
184- commitURL , exists := doc .doc .Find ("#commits-table .commit-id-short" ).Attr ("href" )
184+ commitURL , exists := doc .doc .Find (".timeline.commits_list_group_by_date .commit_sign_badge .commit-id-short" ).Attr ("href" )
185185 assert .True (t , exists )
186186 assert .NotEmpty (t , commitURL )
187187
@@ -216,7 +216,7 @@ func TestRepoCommitsStatusMultiple(t *testing.T) {
216216
217217 doc := NewHTMLParser (t , resp .Body )
218218 // Get first commit URL
219- commitURL , exists := doc .doc .Find ("#commits-table .commit-id-short" ).Attr ("href" )
219+ commitURL , exists := doc .doc .Find (".timeline.commits_list_group_by_date .commit_sign_badge .commit-id-short" ).Attr ("href" )
220220 assert .True (t , exists )
221221 assert .NotEmpty (t , commitURL )
222222
@@ -241,6 +241,6 @@ func TestRepoCommitsStatusMultiple(t *testing.T) {
241241
242242 doc = NewHTMLParser (t , resp .Body )
243243 // Check that the data-global-init="initCommitStatuses" (for trigger) and commit-status (svg) are present
244- sel := doc .doc .Find (`#commits-table .message [data-global-init="initCommitStatuses"] .commit-status` )
244+ sel := doc .doc .Find (`.timeline.commits_list_group_by_date .description [data-global-init="initCommitStatuses"] .commit-status` )
245245 assert .Equal (t , 1 , sel .Length ())
246246}
0 commit comments