Skip to content

Commit

Permalink
Clean up some localizationService tests and unused code (#2333)
Browse files Browse the repository at this point in the history
@bug W-4653989@
  • Loading branch information
chengli-sfdc authored and GitHub Enterprise committed Feb 12, 2018
1 parent 5458e40 commit d5952dc
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 404 deletions.
3 changes: 1 addition & 2 deletions WHOISRESPONSIBLE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ aura-impl/src/main/resources/aura/controller/ @kgray
aura-impl/src/main/resources/aura/error/ @kgray @yungcheng-chen
aura-impl/src/main/resources/aura/event/ @kgray
aura-impl/src/main/resources/aura/flavors/ @kgray
aura-impl/src/main/resources/aura/l10n/ @kgray
aura-impl/src/main/resources/aura/library/ @kgray
aura-impl/src/main/resources/aura/method/ @kgray
aura-impl/src/main/resources/aura/metrics/ @kgray @mrafique
Expand All @@ -37,4 +36,4 @@ aura-impl/src/main/resources/aura/modules/ @dval
aura-impl/src/main/resources/aura/polyfill/ @dval

# Locker Service
aura-impl/src/main/resources/aura/lockerservice/ @jparadis @ravi-jayaramappa
aura-impl/src/main/resources/aura/lockerservice/ @jparadis @ravi-jayaramappa
Original file line number Diff line number Diff line change
Expand Up @@ -26,79 +26,59 @@
<aura:attribute name="timezone1" type="String" description="ACCESS CHECK FIX. PLEASE INVESTIGATE."/>
<aura:attribute name="timezone2" type="String" description="ACCESS CHECK FIX. PLEASE INVESTIGATE."/>

<aura:attribute name="renderItem" type="String" default="" description="used to selectively pick the right block to run the tests" />
<aura:attribute name="renderItem" type="String" default="" description="used to selectively pick the right block to run the tests" />

<aura:if isTrue="{! v.renderItem == 'testShowTodayDatepickerFlag'}">
<div class="block">
<div>
<h1>Datepicker Show Today Button Tests - showToday=true</h1>
</div>
<div class="subtitle">
<div style="color:red"><b>Initial Attr</b></div>
<div><b>showToday:</b> true</div>
<div style="color:red"><b>Run-Time Attr</b></div>
<div><b>selectedDate:</b> value={!v.selectedDate.value} hours={!v.selectedDate.hours} minutes={!v.selectedDate.minutes}</div>
</div>
<div>
<ui:datePicker aura:id="datePicker" showToday="true" selectDate="{!c.handleSelectedDate}" visible="true"/>
</div>
</div>
</aura:if>
<aura:if isTrue="{! v.renderItem == 'testShowTodayDatepickerFlag'}">
<div class="block">
<div>
<h1>Datepicker Show Today Button Tests - showToday=true</h1>
</div>
<div class="subtitle">
<div style="color:red"><b>Initial Attr</b></div>
<div><b>showToday:</b> true</div>
<div style="color:red"><b>Run-Time Attr</b></div>
<div><b>selectedDate:</b> value={!v.selectedDate.value} hours={!v.selectedDate.hours} minutes={!v.selectedDate.minutes}</div>
</div>
<div>
<ui:datePicker aura:id="datePicker" showToday="true" selectDate="{!c.handleSelectedDate}" visible="true"/>
</div>
</div>
</aura:if>


<aura:if isTrue="{! v.renderItem == 'testHideTodayDatepickerFlag'}">
<div class="block">
<div>
<h1>Datepicker Show Today Button Tests - showToday=false</h1>
</div>
<div class="subtitle">
<div style="color:red"><b>Initial Attr</b></div>
<div><b>showToday:</b> false</div>
<div style="color:red"><b>Run-Time Attr</b></div>
<div><b>selectedDate:</b> value={!v.selectedDate.value} hours={!v.selectedDate.hours} minutes={!v.selectedDate.minutes}</div>
</div>
<div>
<ui:datePicker aura:id="datePicker" showToday="false" selectDate="{!c.handleSelectedDate}" visible="true"/>
</div>
</div>
</aura:if>
<aura:if isTrue="{! v.renderItem == 'testHideTodayDatepickerFlag'}">
<div class="block">
<div>
<h1>Datepicker Show Today Button Tests - showToday=false</h1>
</div>
<div class="subtitle">
<div style="color:red"><b>Initial Attr</b></div>
<div><b>showToday:</b> false</div>
<div style="color:red"><b>Run-Time Attr</b></div>
<div><b>selectedDate:</b> value={!v.selectedDate.value} hours={!v.selectedDate.hours} minutes={!v.selectedDate.minutes}</div>
</div>
<div>
<ui:datePicker aura:id="datePicker" showToday="false" selectDate="{!c.handleSelectedDate}" visible="true"/>
</div>
</div>
</aura:if>

<aura:if isTrue="{! v.renderItem == 'testDefaultValueOfDatePicker'}">
<div class="block">
<div>
<h1>Datepicker Show Today Button Tests - <br />
with predefined date - 2015-7-15</h1>
</div>
<div class="subtitle">
<div style="color:red"><b>Initial Attr</b></div>
<div><b>showToday:</b> false</div>
<div style="color:red"><b>Run-Time Attr</b></div>
<div><b>selectedDate:</b> value={!v.selectedDate.value} hours={!v.selectedDate.hours} minutes={!v.selectedDate.minutes}</div>
</div>
<div>
<ui:datePicker aura:id="datePicker" showToday="true" selectDate="{!c.handleSelectedDate}" visible="true" value="2015-7-15"/>
</div>
</div>
</aura:if>

<aura:if isTrue="{! v.renderItem == 'testDefaultValueOfDatePicker'}">
<div class="block">
<div>
<h1>Datepicker Show Today Button Tests - <br />
with predefined date - 2015-7-15</h1>
</div>
<div class="subtitle">
<div style="color:red"><b>Initial Attr</b></div>
<div><b>showToday:</b> false</div>
<div style="color:red"><b>Run-Time Attr</b></div>
<div><b>selectedDate:</b> value={!v.selectedDate.value} hours={!v.selectedDate.hours} minutes={!v.selectedDate.minutes}</div>
</div>
<div>
<ui:datePicker aura:id="datePicker" showToday="true" selectDate="{!c.handleSelectedDate}" visible="true" value="2015-7-15"/>
</div>
</div>
</aura:if>

<aura:if isTrue="{! v.renderItem == 'testLocalizedTodayWithTimezoneAPI'}">
<div class="block">
<div>
<h1>
Datepicker Show Today Button Tests<br/>
{!v.expectedDiffCase}
</h1>
</div>
<div class="subtitle">
<div style="color:red"><b>Runtime Attr:</b></div>
<div><b>Time Diff Case:</b> {!v.timeDiffCase}</div>
<div><b>Today Time Full:</b> {!v.todayDate_str}</div>
<div style="color:red"><b>Time Zone 1:</b> {!v.timezone1}</div>
<div><b>todayDate1:</b> {!v.todayDate1}</div>
<div style="color:red"><b>Time Zone 2:</b> {!v.timezone2}</div>
<div><b>todayDate2:</b> {!v.todayDate2}</div>
</div>
</div>
</aura:if>
</aura:component>
</aura:component>
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
({
handleSelectedDate: function(cmp, evt, helper){
var value = evt.getParam("value");
var hours = evt.getParam("hours");
var minutes = evt.getParam("minutes");
handleSelectedDate: function(cmp, evt, helper) {
var value = evt.getParam("value");
var hours = evt.getParam("hours");
var minutes = evt.getParam("minutes");

cmp.set('v.selectedDate', {
value : value,
hours : hours,
minutes : minutes
})
}
})
cmp.set('v.selectedDate', {
value : value,
hours : hours,
minutes : minutes
})
}
})
Loading

0 comments on commit d5952dc

Please sign in to comment.