diff options
author | Jonathan Tran <jonnytran@gmail.com> | 2021-05-07 17:10:05 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-07 23:10:05 +0200 |
commit | 9557b8603aa05458a9b262d254a809d083657e62 (patch) | |
tree | 25abc1db9983b7cc3ccc1c7e1d3e75a015022d91 /integrations | |
parent | 4900881924b3762e10b01d67565035faf7cb02da (diff) | |
download | gitea-9557b8603aa05458a9b262d254a809d083657e62.tar.gz gitea-9557b8603aa05458a9b262d254a809d083657e62.zip |
Add selecting tags on the compare page (#15723)
* Add selecting tags on the compare page
* Remove unused condition and change indentation
* Fix tag tab in dropdown to be black
* Add compare tag integration test
Co-authored-by: Jonathan Tran <jon@allspice.io>
Diffstat (limited to 'integrations')
-rw-r--r-- | integrations/compare_test.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/integrations/compare_test.go b/integrations/compare_test.go new file mode 100644 index 0000000000..08468cbfd6 --- /dev/null +++ b/integrations/compare_test.go @@ -0,0 +1,24 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package integrations + +import ( + "net/http" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestCompareTag(t *testing.T) { + defer prepareTestEnv(t)() + + session := loginUser(t, "user2") + req := NewRequest(t, "GET", "/user2/repo1/compare/v1.1...master") + resp := session.MakeRequest(t, req, http.StatusOK) + htmlDoc := NewHTMLParser(t, resp.Body) + selection := htmlDoc.doc.Find(".choose.branch .filter.dropdown") + // A dropdown for both base and head. + assert.Lenf(t, selection.Nodes, 2, "The template has changed") +} |