#9 assertBodyEndsWith: aString

Closed
opened 8 years ago by herby · 0 comments

Originally at 2015-03-04T04:13:10Z by Hannes Hirzel closed at 2015-03-04T09:29:35Z

The following test fails

testDivContainerWithButtons
    | s |

    s := '#fixture' asSilk.
    s:= s DIV: {'id' -> 'container'}.
    (s BUTTON: 'hello1') on: 'click' bind: [Transcript show: 'Hello1'].
    (s BUTTON: 'hello2') on: 'click' bind: [Transcript show: 'Hello2'].
    (s BUTTON: 'hello3') on: 'click' bind: [Transcript show: 'Hello3'].
    
    Transcript show: document body innerHTML.
    self assertBodyEndsWith: '>sentinel<div id="container"><button>hello1</button><button>hello2</button><button>hello3</button></div></div>'.

To make it work I have to change the last line to

self assertBodyEndsWith: '>sentinel<divid="container"><button>hello1</button><button>hello2</button><button>hello3</button></div></div>'.

The problem is with the space method assertBodyEndsWith eliminates.

This method is a copy of the method used in domite.

Originally at 2015-03-04T04:13:10Z by Hannes Hirzel closed at 2015-03-04T09:29:35Z The following test fails ```` testDivContainerWithButtons | s | s := '#fixture' asSilk. s:= s DIV: {'id' -> 'container'}. (s BUTTON: 'hello1') on: 'click' bind: [Transcript show: 'Hello1']. (s BUTTON: 'hello2') on: 'click' bind: [Transcript show: 'Hello2']. (s BUTTON: 'hello3') on: 'click' bind: [Transcript show: 'Hello3']. Transcript show: document body innerHTML. self assertBodyEndsWith: '>sentinel<div id="container"><button>hello1</button><button>hello2</button><button>hello3</button></div></div>'. ```` To make it work I have to change the last line to ```` self assertBodyEndsWith: '>sentinel<divid="container"><button>hello1</button><button>hello2</button><button>hello3</button></div></div>'. ```` The problem is with the space method ``assertBodyEndsWith`` eliminates. This method is a copy of the method used in domite.
Sign in to join this conversation.
No Label
No Milestone
No assignee
1 Participants
Loading...
Cancel
Save
There is no content yet.