import {LoginPo} from '../login/login.po';
import {NavBarPo} from './nav-bar.po';


describe('NavBar Module', () => {
  let navBarPo: NavBarPo;
  let loginPo: LoginPo

  beforeEach(async () => {
    navBarPo = new NavBarPo();
    loginPo = new LoginPo();
    await loginPo.navigateTo();
    await loginPo.processForm();
  });

  afterEach(async () => {
    await loginPo.logout();
  });

  it('Add user!', async () => {
    await navBarPo.showUserInsert();
    expect(await navBarPo.popupShown()).toEqual(true);
    await navBarPo.sendUserForm();
    expect(await navBarPo.success()).toEqual(true);
  });
});
