Skip to content

Commit

Permalink
fix(): progress bar fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Izak88 committed Aug 25, 2017
1 parent a291a86 commit e68fdb3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 21 deletions.
34 changes: 15 additions & 19 deletions e2e/060_build.e2e.ts
Expand Up @@ -169,7 +169,7 @@ describe('Build Details', () => {
return browser.wait(() => element.all(by.css('.yellow')).count()
.then(cnt => cnt === 1));
})
.then((): any => element.all(by.css('.progress')).count())
.then((): any => element.all(by.css('.progress-bar')).count())
.then(progress => progress === 0)
.then((): any => {
return browser.wait(() => element.all(by.css('.green')).count()
Expand All @@ -180,21 +180,17 @@ describe('Build Details', () => {
return browser.wait(() => element.all(by.css('.yellow')).count()
.then(cnt => cnt === 1));
})
.then((): any => {
return browser.wait(() => element.all(by.css('.progress')).count()
.then(cnt => cnt === 1));
})
.then((): any => browser.wait(() => {
return element.all(by.css('.progress')).count().then(cnt => cnt === 1);
return element.all(by.css('.progress-bar')).count().then(cnt => cnt === 1);
}))
/* .then((): any => {
return browser.wait(() => element.all(by.css('.progress')).first().getAttribute('innerHTML')
.then(value => value && Number(value) < 0.2));
/*.then((): any => {
return browser.wait(() => element(by.css('.progress-bar')).getAttribute('innerHTML')
.then(value => value && parseFloat(value) < 0.2));
})
.then((): any => {
return browser.wait(() => element.all(by.css('.progress')).first().getAttribute('innerHTML')
.then(value => value && Number(value) < 0.4));
}) */;
return browser.wait(() => element(by.css('.progress-bar')).getAttribute('innerHTML')
.then(value => value && parseFloat(value) < 0.4));
})*/;
});

it('should start new build (D3) and see progress bar in first job run', () => {
Expand All @@ -217,17 +213,17 @@ describe('Build Details', () => {
.then(cnt => cnt === 1));
})
.then((): any => {
return browser.wait(() => element.all(by.css('.progress')).count()
return browser.wait(() => element.all(by.css('.progress-bar')).count()
.then(cnt => cnt === 1));
})
/* .then((): any => {
return browser.wait(() => element.all(by.css('.progress')).first().getAttribute('innerHTML')
.then(value => value && Number(value) < 0.4));
/*.then((): any => {
return browser.wait(() => element(by.css('.progress-bar')).getAttribute('innerHTML')
.then(value => value && parseFloat(value) < 0.4));
})
.then((): any => {
return browser.wait(() => element.all(by.css('.progress')).first().getAttribute('innerHTML')
.then(value => value && Number(value) > 0.6));
}) */
return browser.wait(() => element(by.css('.progress-bar')).getAttribute('innerHTML')
.then(value => value && parseFloat(value) > 0.6));
})*/
.then((): any => {
return browser.wait(() => element(by.css(`[name="btn-stop"]`)).isPresent());
})
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/app-job/app-job.component.html
Expand Up @@ -78,7 +78,7 @@ <h2 *ngIf="tag">{{ job?.build?.data?.head_commit?.message }}</h2>
</div>
<div class="column is-2">
<p *ngIf="jobRun.status === 'running' && previousRuntime">
<progress class="progress is-success is-small" [value]="expectedProgress" max="1">{{ expectedProgress }}%</progress>
<progress class="progress-bar is-success is-small" [value]="expectedProgress" max="1">{{ expectedProgress }}%</progress>
</p>
</div>
<div class="column is-1">
Expand Down
2 changes: 1 addition & 1 deletion src/app/styles/overrides.sass
Expand Up @@ -29,7 +29,7 @@ a
&:hover
color: $white

.progress
.progress-bar
border-radius: 4px

.is-success
Expand Down

0 comments on commit e68fdb3

Please sign in to comment.