Newer
Older
import { browser, ExpectedConditions as ec } from 'protractor';
import { NavBarPage, SignInPage } from '../../page-objects/jhi-page-objects';
import { LikesComponentsPage, LikesUpdatePage } from './likes.page-object';
const expect = chai.expect;
describe('Likes e2e test', () => {
let navBarPage: NavBarPage;
let signInPage: SignInPage;
let likesComponentsPage: LikesComponentsPage;
let likesUpdatePage: LikesUpdatePage;
const username = process.env.E2E_USERNAME ?? 'admin';
const password = process.env.E2E_PASSWORD ?? 'search@admin';
navBarPage = new NavBarPage();
signInPage = await navBarPage.getSignInPage();
await browser.wait(ec.visibilityOf(navBarPage.entityMenu), 5000);
});
it('should load Likes', async () => {
await navBarPage.goToEntity('likes');
likesComponentsPage = new LikesComponentsPage();
await browser.wait(ec.visibilityOf(likesComponentsPage.title), 5000);
expect(await likesComponentsPage.getTitle()).to.eq('gitsearchApp.likes.home.title');
await browser.wait(ec.or(ec.visibilityOf(likesComponentsPage.entities), ec.visibilityOf(likesComponentsPage.noResult)), 10000);
});
it('should load create Likes page', async () => {
await likesComponentsPage.clickOnCreateButton();
likesUpdatePage = new LikesUpdatePage();
expect(await likesUpdatePage.getPageTitle()).to.eq('gitsearchApp.likes.home.createOrEditLabel');
await likesUpdatePage.cancel();
});
after(async () => {
await navBarPage.autoSignOut();
});
});