@@ -29,14 +29,14 @@ func testRepoFork(t *testing.T, session *TestSession, ownerName, repoName, forkO
2929
3030 // Step2: click the fork button
3131 htmlDoc := NewHTMLParser (t , resp .Body )
32- link , exists := htmlDoc .doc .Find (" a.ui.button[href^= \" /repo/ fork/ \" ]" ).Attr ("href" )
32+ link , exists := htmlDoc .doc .Find (` a.ui.button[href*="/ fork"]` ).Attr ("href" )
3333 assert .True (t , exists , "The template has changed" )
3434 req = NewRequest (t , "GET" , link )
3535 resp = session .MakeRequest (t , req , http .StatusOK )
3636
3737 // Step3: fill the form of the forking
3838 htmlDoc = NewHTMLParser (t , resp .Body )
39- link , exists = htmlDoc .doc .Find (" form.ui.form[action^= \" /repo/ fork/ \" ]" ).Attr ("action" )
39+ link , exists = htmlDoc .doc .Find (` form.ui.form[action*="/ fork"]` ).Attr ("action" )
4040 assert .True (t , exists , "The template has changed" )
4141 _ , exists = htmlDoc .doc .Find (fmt .Sprintf (".owner.dropdown .item[data-value=\" %d\" ]" , forkOwner .ID )).Attr ("data-value" )
4242 assert .True (t , exists , fmt .Sprintf ("Fork owner '%s' is not present in select box" , forkOwnerName ))
@@ -70,6 +70,6 @@ func TestRepoForkToOrg(t *testing.T) {
7070 req := NewRequest (t , "GET" , "/user2/repo1" )
7171 resp := session .MakeRequest (t , req , http .StatusOK )
7272 htmlDoc := NewHTMLParser (t , resp .Body )
73- _ , exists := htmlDoc .doc .Find (" a.ui.button[href^= \" /repo/ fork/ \" ]" ).Attr ("href" )
73+ _ , exists := htmlDoc .doc .Find (` a.ui.button[href*="/ fork"]` ).Attr ("href" )
7474 assert .False (t , exists , "Forking should not be allowed anymore" )
7575}
0 commit comments