@@ -33,7 +33,7 @@ func TestRepoCommits(t *testing.T) {
33
33
resp := session .MakeRequest (t , req , http .StatusOK )
34
34
35
35
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" )
37
37
assert .True (t , exists )
38
38
assert .NotEmpty (t , commitURL )
39
39
}
@@ -50,7 +50,7 @@ func Test_ReposGitCommitListNotMaster(t *testing.T) {
50
50
51
51
doc := NewHTMLParser (t , resp .Body )
52
52
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 ) {
54
54
commitURL , exists := s .Attr ("href" )
55
55
assert .True (t , exists )
56
56
assert .NotEmpty (t , commitURL )
@@ -63,7 +63,7 @@ func Test_ReposGitCommitListNotMaster(t *testing.T) {
63
63
assert .Equal (t , "5099b81332712fe655e34e8dd63574f503f61811" , commits [2 ])
64
64
65
65
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 ) {
67
67
userPath , exists := s .Attr ("href" )
68
68
assert .True (t , exists )
69
69
assert .NotEmpty (t , userPath )
@@ -87,7 +87,7 @@ func doTestRepoCommitWithStatus(t *testing.T, state string, classes ...string) {
87
87
88
88
doc := NewHTMLParser (t , resp .Body )
89
89
// 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" )
91
91
assert .True (t , exists )
92
92
assert .NotEmpty (t , commitURL )
93
93
@@ -105,7 +105,7 @@ func doTestRepoCommitWithStatus(t *testing.T, state string, classes ...string) {
105
105
106
106
doc = NewHTMLParser (t , resp .Body )
107
107
// 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" )
109
109
assert .Equal (t , 1 , sel .Length ())
110
110
for _ , class := range classes {
111
111
assert .True (t , sel .HasClass (class ))
@@ -181,7 +181,7 @@ func TestRepoCommitsStatusParallel(t *testing.T) {
181
181
182
182
doc := NewHTMLParser (t , resp .Body )
183
183
// 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" )
185
185
assert .True (t , exists )
186
186
assert .NotEmpty (t , commitURL )
187
187
@@ -216,7 +216,7 @@ func TestRepoCommitsStatusMultiple(t *testing.T) {
216
216
217
217
doc := NewHTMLParser (t , resp .Body )
218
218
// 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" )
220
220
assert .True (t , exists )
221
221
assert .NotEmpty (t , commitURL )
222
222
@@ -241,6 +241,6 @@ func TestRepoCommitsStatusMultiple(t *testing.T) {
241
241
242
242
doc = NewHTMLParser (t , resp .Body )
243
243
// 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` )
245
245
assert .Equal (t , 1 , sel .Length ())
246
246
}
0 commit comments