# Generated by Selenium IDE
import pytest

from fixture.application import Application
from models.group import Group


@pytest.fixture
def app(request):
    fixture = Application()
    request.addfinalizer(fixture.destroy)
    return fixture


# class TestEmailtest():
#     def setup_method(self, method):
#         self.app = Application()
#         self.driver = webdriver.Chrome()
#         self.vars = {}
#
#     def teardown_method(self, method):
#         self.app.destroy()

def test_emailtest(app):
    app.session.login("testpython1111@gmail.com", "testpython")
    app.group.send_email(Group("Hello"))
    app.session.logout()
    app.driver.close()


def test_emailtest_2(app):
    app.session.login("testpython1111@gmail.com", "testpython")
    app.group.send_email(Group("World"))
    app.session.logout()
    app.driver.close()
