Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#12910 closed defect (fixed)

Alerts in dojox.mobile code block automated testing

Reported by: Chris Mitchell Owned by: ykami
Priority: high Milestone: 1.7
Component: DojoX Mobile Version: 1.6.1
Keywords: Cc:
Blocked By: Blocking:

Description

When the dojox.mobile tests run in DOH, if there is an error in a component, the component creates an alert dialog to show the user what went wrong. In the automated test environment, these alert dialogs prevent the remaining tests from finishing.

The correct behavior should be to print these messages to the console using the "console.log" method.

The following code is defective:

./app/_base.js: &n bsp; & nbsp; alert("Error: invalid JavaScript? resource " + dojo.toJson(resource)); ./app/_base.js : &nbs p; alert("Fa iled to load resource " + url); ./deviceTheme.js: &nb sp; if(!dojo. isArray(t)){ alert("loadDeviceTheme: array is expected but found: "+t); } ./View.js: &n bsp; & nbsp;if(!toNode){ alert("dojox.mobile.View#performTransitio n: destination view not found: "+moveTo); return; } ./ViewController?.js: &nbs p; &nb sp; &n bsp; & nbsp; alert ("Failed to load "+evt.detail.url+"\n"+(error.description| |error)); ./ViewController?.js: &n bsp; & nbsp; alert("dojox. mobile._ItemBase#transitionTo: invalid view content"); ./tests/doh/ToolBarButton.h tml: & nbsp; <di v dojoType="dojox.mobile.ToolBarButton?" class="mblDomButton mblDomButtonPlus_2" style="float:right;" onclick="alert('+ was clicked')"></div> ./tests/doh/ ToolBarButton_Programmatic.html: &nb sp; &n bsp; & nbsp;childWidget = new dojox.mobile.ToolBarButton?({class:"mblDom Button mblDomButtonPlus_2", style:"float:right;", onclick:"alert('+ was clicked')"}); ./tests/test_Accessibility_Support. html: ; &nbs p;alert(this.label + " button was clicked"); ./tests/test_Accessibility_Support. html: ; <div id="btn2" dojoType="dojox.mobile.ToolBarButton?" title="+" role="button" tabindex="0" class="mblDomButtonWhitePlus" style="float:right;" onclick="alert('+ was clicked')"></div> ./tests/test_Android- Heading.html: &nbs p; &nb sp; &n bsp; alert(this.label + " button was clicked"); ./tests/test_Android-Heading. html: <d iv dojoType="dojox.mobile.ToolBarButton?" class="mblDomButton mblDomButtonWhitePlus" style="float:right;" onclick="alert('+ was clicked')"></div> ./tests/test_ BlackBerry?-Heading.html: ; &nbs p; &nb sp; alert(this.label + " button was clicked"); ./tests/test_BlackBerry-Heading. html: <d iv dojoType="dojox.mobile.ToolBarButton?" class="mblDomButton mblDomButtonWhitePlus" style="float:right;" onclick="alert('+ was clicked')"></div> ./tests/test_css- sprite.html: ; &nbs p; alert("CSS Sprite is not supported for the BlackBerry? browser"); ./tests/test_Custom-css-sprite. html: ; alert("CSS Sprite is not supported for the BlackBerry? browser"); ./tests/test_Custom-Heading. html: ; &nbs p;alert(this.label + " button was clicked"); ./tests/test_Custom-Heading. html: <d iv dojoType="dojox.mobile.ToolBarButton?" class="mblDomButtonWhitePlus" style="float:right;" onclick="alert('+ was clicked')"></div> ./tests/test_Custom- list-domButtons.html: &n bsp; & nbsp; ;alert(this); ./tests/test_Custom-list-domButtons. html: ; &nbs p; alert(this); . /tests/test_iPhone-Heading.html: &nb sp; &n bsp; & nbsp; alert(this.l abel + " button was clicked"); ./tests/test_iPhone-Heading. html: <d iv dojoType="dojox.mobile.ToolBarButton?" class="mblDomButtonWhitePlus" style="float:right;" onclick="alert('+ was clicked')"></div> ./tests/test_list- domButtons.html: & nbsp; ; aler t(this); ./tests/test_list-domButtons. html: ; &nbs p; alert(this); . /tests/test_SpinWheelDatePicker.html:&nbs p; &nb sp; &n bsp; alert(w.slots[0].getValue()+ ":" + w.slots[1].getValue() + ":" + w.slots[2].getValue()); ./tests/test_S pinWheelTimePicker.html: ; &nbs p; alert(w. slots[0].getValue()+ ":" + w.slots[1].getValue());

Change History (2)

comment:1 Changed 9 years ago by ykami

Resolution: fixed
Status: newclosed

(In [24831]) Fixes #12910 !strict. Changed alert() to console.log().

comment:2 Changed 9 years ago by haysmark

(In [25023]) Fixed syntax error in mobile test, blocking testing. Refs #12910.

Note: See TracTickets for help on using tickets.