Skip to content

Commit

Permalink
fix(tests): Error setting style property of DOM element
Browse files Browse the repository at this point in the history
Fixes the following error in e2e tests: "Cannot set property style of
\#<HTMLElement> which has only a getter".
  • Loading branch information
alfonso-presa committed Jul 4, 2015
1 parent ad506a7 commit 957e2bf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions modules/benchmarks/src/naive_infinite_scroll/cells.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ export class HasStyle {
}

@Component({selector: 'company-name', properties: ['width: cell-width', 'company']})
@View({directives: [], template: `<div [style]="style">{{company.name}}</div>`})
@View({directives: [], template: `<div ng-style="style">{{company.name}}</div>`})
export class CompanyNameComponent extends HasStyle {
company: Company;
}

@Component({selector: 'opportunity-name', properties: ['width: cell-width', 'opportunity']})
@View({directives: [], template: `<div [style]="style">{{opportunity.name}}</div>`})
@View({directives: [], template: `<div ng-style="style">{{opportunity.name}}</div>`})
export class OpportunityNameComponent extends HasStyle {
opportunity: Opportunity;
}

@Component({selector: 'offering-name', properties: ['width: cell-width', 'offering']})
@View({directives: [], template: `<div [style]="style">{{offering.name}}</div>`})
@View({directives: [], template: `<div ng-style="style">{{offering.name}}</div>`})
export class OfferingNameComponent extends HasStyle {
offering: Offering;
}
Expand All @@ -41,10 +41,10 @@ export class Stage {
@View({
directives: [NgFor],
template: `
<div [style]="style">
<div ng-style="style">
<button template="ng-for #stage of stages"
[disabled]="stage.isDisabled"
[style]="stage.style"
ng-style="stage.style"
on-click="setStage(stage)">
{{stage.name}}
</button>
Expand Down Expand Up @@ -88,7 +88,7 @@ export class StageButtonsComponent extends HasStyle {
@View({
directives: [],
template: `
<div [style]="style">
<div ng-style="style">
<a href="/account/{{account.accountId}}">
{{account.accountId}}
</a>
Expand All @@ -99,7 +99,7 @@ export class AccountCellComponent extends HasStyle {
}

@Component({selector: 'formatted-cell', properties: ['width: cell-width', 'value']})
@View({directives: [], template: `<div [style]="style">{{formattedValue}}</div>`})
@View({directives: [], template: `<div ng-style="style">{{formattedValue}}</div>`})
export class FormattedCellComponent extends HasStyle {
formattedValue: string;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {NgFor} from 'angular2/directives';
template: `
<div>
<div id="scrollDiv"
[style]="scrollDivStyle"
ng-style="scrollDivStyle"
on-scroll="onScroll($event)">
<div id="padding"></div>
<div id="inner">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import {
FormattedCellComponent
],
template: `
<div class="row" [style]="itemStyle">
<div class="row" ng-style="itemStyle">
<company-name [company]="offering.company"
[cell-width]="companyNameWidth">
</company-name>
Expand Down

0 comments on commit 957e2bf

Please sign in to comment.