cor-tab-panel emits first registered tab ID if active tab is undefined
adding e2e tests for cor-tabs
This commit is contained in:
parent
57d49a5970
commit
8c03a6be31
9 changed files with 153 additions and 28 deletions
51
static/test/e2e/image-repo.scenario.ts
Normal file
51
static/test/e2e/image-repo.scenario.ts
Normal file
|
@ -0,0 +1,51 @@
|
|||
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);
|
||||
});
|
||||
});
|
||||
});
|
Reference in a new issue