You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
653 B
28 lines
653 B
|
4 days ago
|
package tests_admin
|
||
|
7 months ago
|
|
||
|
|
import (
|
||
|
|
"testing"
|
||
|
2 months ago
|
"time"
|
||
|
7 months ago
|
// "github.com/stretchr/testify/require"
|
||
|
7 months ago
|
// "MY/webapp/data"
|
||
|
7 months ago
|
// sq "github.com/Masterminds/squirrel"
|
||
|
|
)
|
||
|
|
|
||
|
|
func TestTableListing(t *testing.T) {
|
||
|
2 months ago
|
z, cancel := Setup(t, 2 * time.Second);
|
||
|
7 months ago
|
defer cancel();
|
||
|
|
|
||
|
2 months ago
|
// confirm redirect if not logged in
|
||
|
|
z.GoTo("/admin/table/", `[data-testid="index-page"]`)
|
||
|
|
|
||
|
|
// now log in and go to admin
|
||
|
|
|
||
|
|
z.GoTo("/login/", `[data-testid="login-index-page"]`)
|
||
|
|
z.TypeIn(`#username`, `admin`)
|
||
|
|
z.TypeIn(`#password`, `testing123`)
|
||
|
|
z.ClickOn(`#login-submit`)
|
||
|
|
z.WaitFor(`[data-testid="index-page"]`)
|
||
|
|
|
||
|
|
z.GoTo("/admin/table/", `[data-testid="admin-table--page"]`)
|
||
|
7 months ago
|
}
|