diff --git a/Core/Tests/Functional/TestApplication.st b/Core/Tests/Functional/TestApplication.st deleted file mode 100644 index 09192ef..0000000 --- a/Core/Tests/Functional/TestApplication.st +++ /dev/null @@ -1,92 +0,0 @@ -Application subclass: TestApplication [ - | counterTest formTest multicounterTest sauTest | - - - - - TestApplication class >> path [ - ^'tests' - ] - - allTests [ - - ^ - {self counterTest. - self multicounterTest. - self formTest. - self sauTest} - ] - - counterTest [ - - ^counterTest ifNil: [counterTest := TestCounter new] - ] - - sauTest [ - - ^sauTest ifNil: [sauTest := TestSAU new] - ] - - formTest [ - - ^formTest ifNil: [formTest := TestForm new] - ] - - multicounterTest [ - - ^multicounterTest ifNil: [multicounterTest := TestMultiCounter new] - ] - - counter [ - - ^[:e | - e h2 text: 'Fonctional tests'. - e build: self list. - e horizontalRule. - e add: self counterTest build] - ] - - form [ - - ^[:e | - e h2 text: 'Fonctional tests'. - e build: self list. - e horizontalRule. - e add: self formTest build] - ] - - index [ - - ^self counter - ] - - multicounter [ - - ^[:e | - e h2 text: 'Fonctional tests'. - e build: self list. - e horizontalRule. - e add: self multicounterTest build] - ] - - scriptaculous [ - - ^[:e | - e h2 text: 'Fonctional tests'. - e build: self list. - e horizontalRule. - e add: self sauTest build] - ] - - list [ - - ^[:e || f select | - f := e form. - select := f select. - select - beSubmitOnChange; - action: [:val | self redirectToLocal: val]. - self allTests do: [:each | select option text: each class path]] - ] -] - diff --git a/Core/Tests/Functional/TestCounter.st b/Core/Tests/Functional/TestCounter.st deleted file mode 100644 index 9d51df8..0000000 --- a/Core/Tests/Functional/TestCounter.st +++ /dev/null @@ -1,22 +0,0 @@ -Widget subclass: TestCounter [ - | counters counter | - - - - TestCounter class >> path [ - ^'counter' - ] - - contents [ - ^[:e | e add: self counter build] - ] - - children [ - ^Array with: self counter - ] - - counter [ - ^counter ifNil: [counter := Counter new] - ] -] - diff --git a/Core/Tests/Functional/TestForm.st b/Core/Tests/Functional/TestForm.st deleted file mode 100644 index 91bed3f..0000000 --- a/Core/Tests/Functional/TestForm.st +++ /dev/null @@ -1,48 +0,0 @@ -Widget subclass: TestForm [ - | value1 value2 value3 | - - - - - TestForm class >> path [ - ^'form' - ] - - contents [ - ^[:e | - e build: self form. - e break. - e build: self result] - ] - - form [ - ^[:e || form | - value1 ifNil: [value1 := '']. - value2 ifNil: [value2 := '']. - value3 ifNil: [value3 := false]. - form := e form. - form input - action: [:val | self markDirty. value1 := val]; - value: value1. - form break. - form textArea - action: [:val | value2 := val]; - text: value2. - form break. - form checkbox - action: [:val | value3 := val]; - checked: value3. - form break. - form button text: 'go'] - ] - - result [ - ^[:e | - e text: 'value 1 = ' , value1. - e break. - e text: 'value 2 = ' , value2. - e break. - e text: 'value 3 = ' , value3 printString] - ] -] - diff --git a/Core/Tests/Functional/TestImage.st b/Core/Tests/Functional/TestImage.st deleted file mode 100644 index 9d6b173..0000000 --- a/Core/Tests/Functional/TestImage.st +++ /dev/null @@ -1,21 +0,0 @@ -Widget subclass: TestImage [ - - - - - TestImage class >> path [ - ^'image' - ] - - contents [ - ^[:e | - e image - source: '/files/reeb-logo.png' - alternativeText: 'logo'. - e break. - e image - source: 'http://planet.smalltalk.org/images/balloon_small.gif' - alternativeText: 'smalltalk'] - ] -] - diff --git a/Core/Tests/Functional/TestMultiCounter.st b/Core/Tests/Functional/TestMultiCounter.st deleted file mode 100644 index bb86e1a..0000000 --- a/Core/Tests/Functional/TestMultiCounter.st +++ /dev/null @@ -1,28 +0,0 @@ -Widget subclass: TestMultiCounter [ - | counters | - - - - - TestMultiCounter class >> path [ - ^'multicounter' - ] - - contents [ - ^[:e | self counters do: [:each | e add: each build]] - ] - - counters [ - ^counters ifNil: [counters := self initCounters] - ] - - initCounters [ - ^ - {Counter new. - Counter new. - Counter new. - Counter new. - Counter new} - ] -] - diff --git a/Core/Tests/Functional/TestSAU.st b/Core/Tests/Functional/TestSAU.st deleted file mode 100644 index 2ae815c..0000000 --- a/Core/Tests/Functional/TestSAU.st +++ /dev/null @@ -1,239 +0,0 @@ -Widget subclass: TestSAU [ - | counter count text editText checked dropped | - - - - - TestSAU class >> path [ - ^'scriptaculous' - ] - - buildDraggableOn: aCanvas [ - - | id1 id2 | - id1 := aCanvas draggableId. - id2 := aCanvas draggableId. - aCanvas h1 text: 'Draggable'. - (aCanvas div) - id: id1; - class: 'draggable'; - passenger: 'Drag me!'; - with: [aCanvas h2 text: 'Drag me!']. - (aCanvas div) - id: id2; - class: 'draggable'; - passenger: 'Drag me too!'; - with: [aCanvas h2 text: 'Drag me too!']. - aCanvas script: ((aCanvas draggable) - id: id1; - revert: true; - build). - aCanvas script: ((aCanvas draggable) - id: id2; - revert: true; - build). - (aCanvas div) - id: 'droppable'; - with: [aCanvas text: 'Drop here :)']. - aCanvas script: ((aCanvas droppable) - id: 'droppable'; - accept: 'draggable'; - hoverClass: 'hover'; - onDrop: ((aCanvas updater) - id: 'droppable'; - triggerPassenger: [:val | dropped := val]; - action: [:canvas | canvas text: dropped]; - yourself); - build) - ] - - contents [ - - self updatePage. - ^[:e | - e build: self effects. - "self buildDraggableOn: anElement." - e build: self sortable. - e build: self updater. - e build: self periodicalUpdater. - e build: self form. - e build: self inPlaceEditor] - ] - - count [ - - ^[:e | e text: count printString] - ] - - description [ - - ^'scriptaculous' - ] - - effects [ - - | div | - ^[:e | - e h1: 'Effects'. - div := e div. - div id: 'id'. - div add: counter build. - (e anchor) - href: 'javascript:void(0)'; - onClick: ((div scriptaculous effect) - id: 'id'; - duration: 2; - afterFinish: ((div scriptaculous effect) - id: 'id'; - highlight); - appear; - build); - text: 'Appear'. - e text: ' '. - (e anchor) - href: 'javascript:void(0)'; - onClick: ((div scriptaculous effect) - id: 'id'; - blindUp; - build); - text: 'BlindUp'. - e text: ' '. - (e anchor) - href: 'javascript:void(0)'; - onClick: ((div scriptaculous effect) - id: 'id'; - toggleBlind; - build); - text: 'ToggleBlind'] - ] - - form [ - - | form | - ^[:e | - text ifNil: [text := 'some text']. - e h1 text: 'Form'. - form := e form. - form id: 'form'. - (form input) - action: [:val | text := val]; - value: text. - (form button) - onClick: ((form prototype updater) - id: 'essai'; - triggerForm: 'form'; - return: false; - build); - text: 'go'. - (e div) - id: 'essai'; - text: text] - ] - - inPlaceEditor [ - - | div | - ^[:e | - editText := 'Edit me :)'. - e h1: 'In place Editor'. - div := e div. - div - id: 'edit'; - text: editText. - e javascript: ((div scriptaculous inPlaceEditor) - id: 'edit'; - triggerInPlaceEditor: [:val | editText := val]; - onComplete: ((e prototype updater) - id: 'edit'; - action: [:f | f text: editText]; - yourself); - build)] - ] - - periodicalUpdater [ - - | div | - ^[:e | - e h1 text: 'PeriodicalUpdater'. - div := e div. - div id: 'periodical_update'. - div build: self time. - div javascript: ((div prototype periodicalUpdater) - id: 'periodical_update'; - frequency: 1; - action: [:f | f build: self time]; - build)] - ] - - sortable [ - - | div1 | - ^[:e | - e h1 text: 'sortable1'. - div1 := e div id: 'sortable1'. - (div1 div) - id: div1 sortableId; - passenger: 'Sort me!'; - text: 'Sort me!'. - (div1 div) - id: div1 sortableId; - passenger: 'Sort me too!'; - text: 'Sort me too!'. - e javascript: ((e scriptaculous sortable) - id: 'sortable1'; - tag: 'div'; - constraint: false; - dropOnEmpty: true; - onUpdate: ((e prototype updater) - id: ''; - triggerSortable: 'sortable1' action: [:val | Transcript show: val]; - yourself); - build)] - ] - - time [ - - ^[:e | e text: SpTimestamp now printString] - ] - - updatePage [ - - self page headElement javascript source: '/prototype/prototype.js'. - self page headElement javascript source: '/scriptaculous/scriptaculous.js' - ] - - updater [ - - | div | - ^ - [:e | - e h1: 'Updater'. - count ifNil: [count := 0]. - div := e div. - div id: 'update'. - div build: self count. - (e anchor) - href: 'javascript:void(0)'; - onClick: ((e prototype updater) - id: 'update'; - action: - [:f | - count := count + 1. - f build: self count. - f]; - build); - text: 'increase'] - ] - - children [ - - ^Array with: counter - ] - - initialize [ - - super initialize. - counter := Counter new - ] -] - diff --git a/Core/package.xml b/Core/package.xml index c49bc65..aed1a5d 100644 --- a/Core/package.xml +++ b/Core/package.xml @@ -189,13 +189,6 @@ RequestHandlers/ApplicationHandler.st RequestHandlers/RedirectHandler.st - Tests/Functional/TestSAU.st - Tests/Functional/TestCounter.st - Tests/Functional/TestMultiCounter.st - Tests/Functional/TestForm.st - Tests/Functional/TestImage.st - Tests/Functional/TestApplication.st - Utilities/IliadObject.st Utilities/Support.st Utilities/Id.st @@ -339,10 +332,4 @@ lib/JSON/JsonObject.st lib/JSON/JsonTests.st - Tests/Functional/TestSAU.st - Tests/Functional/TestCounter.st - Tests/Functional/TestMultiCounter.st - Tests/Functional/TestForm.st - Tests/Functional/TestImage.st - Tests/Functional/TestApplication.st