Working on school subscription regression test
This commit is contained in:
parent
14491cea14
commit
37e7c528ae
5 changed files with 16 additions and 6 deletions
2
Makefile
2
Makefile
|
@ -17,7 +17,7 @@ test:
|
||||||
docker-compose -f docker/oef_test/docker-compose.yaml down
|
docker-compose -f docker/oef_test/docker-compose.yaml down
|
||||||
docker-compose -f docker/oef_test/docker-compose.yaml up -d db
|
docker-compose -f docker/oef_test/docker-compose.yaml up -d db
|
||||||
docker-compose -f docker/oef_test/docker-compose.yaml up -d smtp
|
docker-compose -f docker/oef_test/docker-compose.yaml up -d smtp
|
||||||
go run -race main.go --config=docker/oef_test/config/config.yaml &
|
go run -race main.go --config=config/config.test.yaml &
|
||||||
|
|
||||||
regression_test:
|
regression_test:
|
||||||
go build .
|
go build .
|
||||||
|
|
|
@ -10,7 +10,7 @@ handlers:
|
||||||
allow_session_url_query: true
|
allow_session_url_query: true
|
||||||
|
|
||||||
orm:
|
orm:
|
||||||
connection: "oef:oef@tcp(localhost:3307)/oef_dev"
|
connection: "oef:oef@tcp(localhost:3307)/oef_test"
|
||||||
options: "charset=utf8&parseTime=True&loc=Local"
|
options: "charset=utf8&parseTime=True&loc=Local"
|
||||||
automigrate: true
|
automigrate: true
|
||||||
regenerate: false
|
regenerate: false
|
||||||
|
|
4
dist/main.bundle.js
vendored
4
dist/main.bundle.js
vendored
File diff suppressed because one or more lines are too long
|
@ -2,7 +2,6 @@ package regression_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/remogatto/prettytest"
|
"github.com/remogatto/prettytest"
|
||||||
|
@ -167,7 +166,6 @@ func (t *testSuite) TestSchoolSubscription() {
|
||||||
}
|
}
|
||||||
|
|
||||||
credentials := findElements("dd")
|
credentials := findElements("dd")
|
||||||
log.Println("DD", credentials)
|
|
||||||
if len(credentials) == 0 {
|
if len(credentials) == 0 {
|
||||||
panic("Can't find credentials in the renderered HTML page")
|
panic("Can't find credentials in the renderered HTML page")
|
||||||
}
|
}
|
||||||
|
@ -197,7 +195,15 @@ func (t *testSuite) TestSchoolSubscription() {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
err = findElement("a.list-group-item").Click()
|
err = findElement("a.oef-selected-by-search").Click()
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
err = findElement("button.karmen-ajax-delete").Click()
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
err = findElement("#karmen-modal-btn-confirm").Click()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,8 +26,10 @@ $(function () {
|
||||||
a = li[i]; //li[i].getElementsByTagName("a")[0];
|
a = li[i]; //li[i].getElementsByTagName("a")[0];
|
||||||
if (a.innerHTML.toUpperCase().indexOf(filter) > -1) {
|
if (a.innerHTML.toUpperCase().indexOf(filter) > -1) {
|
||||||
li[i].style.display = "";
|
li[i].style.display = "";
|
||||||
|
li[i].classList.add("oef-selected-by-search");
|
||||||
} else {
|
} else {
|
||||||
li[i].style.display = "none";
|
li[i].style.display = "none";
|
||||||
|
li[i].classList.remove("oef-selected-by-search");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue