import { browser, element, by, $, $$ } from 'protractor'; import { appHost } from '../protractor.conf'; import { CorTabsViewObject } from '../../js/directives/ui/cor-tabs/cor-tabs.view-object'; describe("Image Repository", () => { const username = 'devtable'; const password = 'password'; const repoTabs: CorTabsViewObject = new CorTabsViewObject(); beforeAll((done) => { browser.waitForAngularEnabled(false); // Sign in browser.get(appHost); $$('a[href="/signin/"]').get(1).click(); $('#signin-username').sendKeys(username); $('#signin-password').sendKeys(password); element(by.partialButtonText('Sign in')).click(); browser.sleep(4000); // Navigate to image repository browser.get(`${appHost}/repository/devtable/simple`).then(() => done()); }); afterAll(() => { browser.waitForAngularEnabled(true); }); describe("information tab", () => { beforeAll((done) => { repoTabs.selectTabByTitle('Information').then(() => done()); }); it("displays repository description", () => { expect(element(by.cssContainingText('h4', 'Description')).isDisplayed()).toBe(true); }); }); describe("tags tab", () => { beforeAll((done) => { repoTabs.selectTabByTitle('Tags').then(() => done()); }); it("displays repository description", () => { expect(element(by.cssContainingText('h4', 'Description')).isDisplayed()).toBe(true); }); }); });