This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/static/test/e2e/image-repo.scenario.ts
2017-06-26 16:53:12 -07:00

51 lines
1.4 KiB
TypeScript

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);
});
});
});