mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Handle invalid issues (#18111)
* Handle invalid issues - When you hover over a issue reference, and the issue doesn't exist, it will just hang on the loading animation. - This patch fixes that by showing them the pop-up with a "Error occured" message. * Add I18N * refactor * fix comment for lint * fix unit test for i18n * fix unit test for i18n * add comments Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
		@@ -207,7 +207,7 @@ func TestAPIGetReleaseByTag(t *testing.T) {
 | 
			
		||||
 | 
			
		||||
	var err *api.APIError
 | 
			
		||||
	DecodeJSON(t, resp, &err)
 | 
			
		||||
	assert.EqualValues(t, "Not Found", err.Message)
 | 
			
		||||
	assert.NotEmpty(t, err.Message)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func TestAPIDeleteReleaseByTagName(t *testing.T) {
 | 
			
		||||
 
 | 
			
		||||
@@ -141,7 +141,7 @@ func TestCreateBranchInvalidCSRF(t *testing.T) {
 | 
			
		||||
	resp = session.MakeRequest(t, NewRequest(t, "GET", loc), http.StatusOK)
 | 
			
		||||
	htmlDoc := NewHTMLParser(t, resp.Body)
 | 
			
		||||
	assert.Equal(t,
 | 
			
		||||
		"Bad Request: Invalid CSRF token",
 | 
			
		||||
		"Bad Request: invalid CSRF token",
 | 
			
		||||
		strings.TrimSpace(htmlDoc.doc.Find(".ui.message").Text()),
 | 
			
		||||
	)
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user