Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

Commit

Permalink
1696 footer white space (#1762)
Browse files Browse the repository at this point in the history
* Fixed white space at the bottom of screen problem
- make footer absolutely positioned
- create new class "main-view-content" which adds a scrollbar at the appropriate time (which doesn't include the footer)
- wrap the sidebar-menu with a scroll bar

* fix protractor tests for slow page load, and historian in safari

* fixes for safari styles
  • Loading branch information
nklincoln authored and cazfletch committed Aug 7, 2017
1 parent 1ff1866 commit 8f981c6
Show file tree
Hide file tree
Showing 14 changed files with 577 additions and 523 deletions.
4 changes: 2 additions & 2 deletions packages/composer-playground/e2e/component/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class Editor {
return OperationsHelper.retriveMatchingElementsByCSS('.side-bar-nav', '.flex-container')
.map((elm) => { browser.executeScript(scrollMe, elm);
browser.wait(ExpectedConditions.visibilityOf(elm), 5000);
return elm.getText(); });
return OperationsHelper.retriveTextFromElement(elm); });
}

// Retrieve Editor Side Navigation File Action buttons (Add/Deploy)
Expand All @@ -61,7 +61,7 @@ export class Editor {
}

// Retrieve current 'active' file from navigator
static retrieveNavigatorActiveFile() {
static retrieveNavigatorActiveFiles() {
return OperationsHelper.retriveMatchingElementsByCSS('.files', '.active')
.map((elm) => { browser.executeScript(scrollMe, elm);
browser.wait(ExpectedConditions.visibilityOf(elm), 5000);
Expand Down
18 changes: 9 additions & 9 deletions packages/composer-playground/e2e/specs/editor-define.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ describe('Editor Define', (() => {
});

// -active file
Editor.retrieveNavigatorActiveFile()
Editor.retrieveNavigatorActiveFiles()
.then((list: any) => {
expect(list).to.be.an('array').lengthOf(1);
expect(list).to.include('Script File\nlib/script.js');
Expand Down Expand Up @@ -330,7 +330,7 @@ describe('Editor Define', (() => {
expect(buttonlist[1]).to.deep.equal({text: 'Deploy', enabled: true});
});
// -active file
Editor.retrieveNavigatorActiveFile()
Editor.retrieveNavigatorActiveFiles()
.then((list: any) => {
expect(list).to.be.an('array').lengthOf(1);
expect(list).to.include('Script File\nlib/importScript.js');
Expand All @@ -349,7 +349,7 @@ describe('Editor Define', (() => {
})
.then((startFiles) => {
// -active file
Editor.retrieveNavigatorActiveFile()
Editor.retrieveNavigatorActiveFiles()
.then((list: any) => {
expect(list).to.be.an('array').lengthOf(1);
expect(list).to.include('Model File\nmodels/org.acme.model.cto');
Expand Down Expand Up @@ -397,7 +397,7 @@ describe('Editor Define', (() => {
})
.then((startFiles) => {
// -active file
Editor.retrieveNavigatorActiveFile()
Editor.retrieveNavigatorActiveFiles()
.then((list: any) => {
expect(list).to.be.an('array').lengthOf(1);
expect(list).to.include('Model File\nmodels/importModel.cto');
Expand Down Expand Up @@ -444,7 +444,7 @@ describe('Editor Define', (() => {
})
.then((startFiles) => {
// -active file
Editor.retrieveNavigatorActiveFile()
Editor.retrieveNavigatorActiveFiles()
.then((list: any) => {
expect(list).to.be.an('array').lengthOf(1);
expect(list).to.include('Access Control\npermissions.acl');
Expand Down Expand Up @@ -502,7 +502,7 @@ describe('Editor Define', (() => {
})
.then((startFiles) => {
// -active file
Editor.retrieveNavigatorActiveFile()
Editor.retrieveNavigatorActiveFiles()
.then((list: any) => {
expect(list).to.be.an('array').lengthOf(1);
expect(list).to.include('Access Control\npermissions.acl');
Expand Down Expand Up @@ -551,7 +551,7 @@ describe('Editor Define', (() => {
.then((startFiles) => {
// Check for new contents (we only have one readme file)
// -active file
Editor.retrieveNavigatorActiveFile()
Editor.retrieveNavigatorActiveFiles()
.then((list: any) => {
expect(list).to.be.an('array').lengthOf(1);
expect(list).to.include('About\nREADME.md');
Expand Down Expand Up @@ -602,7 +602,7 @@ describe('Editor Define', (() => {
})
.then((startFiles) => {
// -active file
Editor.retrieveNavigatorActiveFile()
Editor.retrieveNavigatorActiveFiles()
.then((list: any) => {
expect(list).to.be.an('array').lengthOf(1);
expect(list).to.include('Query File\nqueries.qry');
Expand Down Expand Up @@ -648,7 +648,7 @@ describe('Editor Define', (() => {
})
.then((startFiles) => {
// -active file
Editor.retrieveNavigatorActiveFile()
Editor.retrieveNavigatorActiveFiles()
.then((list: any) => {
expect(list).to.be.an('array').lengthOf(1);
expect(list).to.include('Query File\nqueries.qry');
Expand Down
19 changes: 14 additions & 5 deletions packages/composer-playground/e2e/utils/operations-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class OperationsHelper {
});
}

// Retrieve text
// Retrieve text from an element
static retriveTextFromElement(elm: ElementFinder) {
browser.wait(ExpectedConditions.presenceOf(elm), 10000);
browser.wait(ExpectedConditions.visibilityOf(elm), 10000);
Expand All @@ -28,14 +28,23 @@ export class OperationsHelper {
});
}

// Retrieve text
// Retrieve an array of matching elements
static retriveMatchingElementsByCSS(type: string, subset: string) {
let elm = element(by.css(type));
browser.wait(ExpectedConditions.presenceOf(elm), 10000);
browser.wait(ExpectedConditions.visibilityOf(elm), 10000);
browser.wait(this.elementsPresent(element(by.css(type)).all(by.css(subset))), 5000);
return element(by.css(type)).all(by.css(subset));
}

// Custom ExpectedCondition to be used to ensure that ArrayFinder count is non-zero
static elementsPresent(elementArrayFinder) {
let hasCount = (() => {
return elementArrayFinder.count()
.then((count) => {
return count > 0;
});
});
return ExpectedConditions.and(ExpectedConditions.presenceOf(elementArrayFinder), hasCount);
};

// Navigate to Editor base page and move past welcome splash
static navigatePastWelcome() {
browser.get(browser.baseUrl);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
</div>
</section>
<section class="main-view">
<div class="flex">
<div class="main-view-content">
<div class="flex">
<div class="playground-profile-warning" *ngIf="warningVisible">
<div class="profile-warning-content">
<div>
Expand Down Expand Up @@ -54,5 +55,6 @@ <h3>Connection Profiles are not available in Web Playground</h3>
<connection-profile-data (profileUpdated)="profileUpdated($event)" [connectionProfile]="currentConnectionProfile"></connection-profile-data>
</div>
</div>
</div>
<app-footer></app-footer>
</section>
Loading

0 comments on commit 8f981c6

Please sign in to comment.