2019-01-31 04:44:03 +07:00
|
|
|
import LoginAndRegisterTotp from "../../../helpers/LoginAndRegisterTotp";
|
|
|
|
import FullLogin from "../../../helpers/FullLogin";
|
2019-02-10 05:20:37 +07:00
|
|
|
import WithDriver from "../../../helpers/context/WithDriver";
|
|
|
|
import Logout from "../../../helpers/Logout";
|
2019-03-02 22:19:08 +07:00
|
|
|
import { composeFiles } from '../environment';
|
|
|
|
import DockerCompose from "../../../helpers/context/DockerCompose";
|
2019-11-16 17:38:21 +07:00
|
|
|
import sleep from "../../../helpers/utils/sleep";
|
2019-01-31 04:44:03 +07:00
|
|
|
|
2019-11-02 21:32:58 +07:00
|
|
|
export default function () {
|
2019-04-25 04:52:08 +07:00
|
|
|
const dockerCompose = new DockerCompose(composeFiles);
|
2019-02-10 05:20:37 +07:00
|
|
|
|
|
|
|
WithDriver();
|
|
|
|
|
2019-11-16 17:38:21 +07:00
|
|
|
it.only("should be able to login after mariadb restarts", async function () {
|
2019-01-31 04:44:03 +07:00
|
|
|
this.timeout(30000);
|
2019-11-02 21:32:58 +07:00
|
|
|
|
2019-02-22 16:27:54 +07:00
|
|
|
const secret = await LoginAndRegisterTotp(this.driver, "john", "password", true);
|
2019-11-16 17:38:21 +07:00
|
|
|
await dockerCompose.restart('mariadb');
|
|
|
|
await sleep(2000);
|
2019-04-25 04:52:08 +07:00
|
|
|
|
|
|
|
await Logout(this.driver);
|
2019-02-13 05:23:43 +07:00
|
|
|
await FullLogin(this.driver, "john", secret, "https://admin.example.com:8080/secret.html");
|
2019-04-25 04:52:08 +07:00
|
|
|
});
|
2019-01-31 04:44:03 +07:00
|
|
|
}
|