Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 2.5.0 #27

Merged
merged 5 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 109 additions & 0 deletions source/Willow-SemanticUI-Tests/SemanticStyleTest.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
Class {
#name : #SemanticStyleTest,
#superclass : #TestCase,
#category : #'Willow-SemanticUI-Tests-WebViews'
}

{ #category : #tests }
SemanticStyleTest >> testCards [

self assert: SemanticStyle for attached bottom asString equals: 'attached bottom'
]

{ #category : #tests }
SemanticStyleTest >> testColor [

self
assert: SemanticStyle for approve brown error inverted ok olive orange success yellow asString
equals: 'approve brown error inverted ok olive orange success yellow'
]

{ #category : #tests }
SemanticStyleTest >> testContainer [

self
assert: SemanticStyle for container list message modal segment segments asString
equals: 'container list message modal segment segments'
]

{ #category : #tests }
SemanticStyleTest >> testGeneral [

self
assert: SemanticStyle for action actions active author basic button buttons close compact default
description disabled divided dividing doubling dropdown field fields fitted fluid form header
hidden icon image info item items label labeled longer metadata negative pointing positive
primary relaxed reply selection stackable sub submit text ui asString
equals:
'action actions active author basic button buttons close compact default description disabled divided dividing doubling dropdown field fields fitted fluid form header hidden icon image info item items label labeled longer metadata negative pointing positive primary relaxed reply selection stackable sub submit text ui'
]

{ #category : #tests }
SemanticStyleTest >> testGrid [

self assert: SemanticStyle for divider equal grid width asString equals: 'divider equal grid width'
]

{ #category : #tests }
SemanticStyleTest >> testIcons [

self
assert: SemanticStyle for alternate cloud download edit file outline signOut trash upload asString
equals: 'alternate cloud download edit file outline sign-out trash upload'
]

{ #category : #tests }
SemanticStyleTest >> testInput [

self
assert: SemanticStyle for checkbox input radio slider toggle asString
equals: 'checkbox input radio slider toggle'
]

{ #category : #tests }
SemanticStyleTest >> testMenu [

self
assert: SemanticStyle for borderless menu secondary top asString
equals: 'borderless menu secondary top'
]

{ #category : #tests }
SemanticStyleTest >> testNumbers [

self
assert: SemanticStyle for eight five four one seven six thirteen three two asString
equals: 'eight five four one seven six thirteen three two'
]

{ #category : #tests }
SemanticStyleTest >> testPositioning [

self
assert: SemanticStyle for aligned fixed floated inline left middle right vertical asString
equals: 'aligned fixed floated inline left middle right vertical'
]

{ #category : #tests }
SemanticStyleTest >> testSizes [

self
assert: SemanticStyle for big circular huge large mini rounded small tiny wide asString
equals: 'big circular huge large mini rounded small tiny wide'
]

{ #category : #tests }
SemanticStyleTest >> testTable [

self
assert: SemanticStyle for column definition row selectable striped table asString
equals: 'column definition row selectable striped table'
]

{ #category : #tests }
SemanticStyleTest >> testViews [

self
assert: SemanticStyle for avatar card cards comment comments content asString
equals: 'avatar card cards comment comments content'
]
Original file line number Diff line number Diff line change
Expand Up @@ -242,20 +242,54 @@ SemanticUIComponentSupplierTest >> testSingleSelectionListBoxDisplayingAtOnceApp
equals: '<select name="1" size="15" class="willow"></select>'
]

{ #category : #'tests-Supplying' }
SemanticUIComponentSupplierTest >> testSynchronicButtonLabeledApplyingEvaluating [

self
assertRenderingOf: [ :supplier |
supplier
synchronicButtonLabeled: 'Search'
applying: [ :button | button addClass willow ]
evaluating: [ self fail ]
]
equals: '<button name="1" class="ui button willow" type="submit">Search</button>'
]

{ #category : #'tests-Supplying' }
SemanticUIComponentSupplierTest >> testTableBuilderForHeadlessTable [

self
assertRenderingOf: [ :supplier |
| table |

table := supplier tableBuilder
addColumn: [ :column | column rendering: [ :number | number ] ];
addColumn: [ :column | column rendering: [ :number | number + 1 ] ];
styledWith: 'fixed';
build.

table changeContentsTo: #( 1 2 3 ).

table
]
equals:
'<table class="ui table fixed"><tbody><tr><td>1</td><td>2</td></tr><tr><td>2</td><td>3</td></tr><tr><td>3</td><td>4</td></tr></tbody></table>'
]

{ #category : #'tests-Processing' }
SemanticUIComponentSupplierTest >> testUpdateRoot [

| html |

html := WAHtmlCanvas builder
fullDocument: true;
rootBlock: [ :root | SemanticUIComponentSupplier online updateRoot: root ];
render: [ :canvas | ].
fullDocument: true;
rootBlock: [ :root | SemanticUIComponentSupplier online updateRoot: root ];
render: [ :canvas | ].

self
assert: html
equals:
'<!DOCTYPE html><html><head><title></title><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.13/semantic.min.css" integrity="sha256-/Z28yXtfBv/6/alw+yZuODgTbKZm86IKbPE/5kjO/xY=" crossorigin="anonymous"/><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.13/semantic.min.js" integrity="sha256-Bhi6GMQ/72uYZcJXCJ2LToOIcN3+Cx47AZnq/Bw1f7A=" crossorigin="anonymous"></script></head><body onload="onLoad()"><script type="text/javascript">function onLoad(){};</script></body></html>'
'<!DOCTYPE html><html><head><title></title><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.5.0/semantic.min.css" integrity="sha256-cDGQ39yChhpN5vzgHbjIdGEtQ5kXE9tttCsI7VR9TuY=" crossorigin="anonymous"/><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.5.0/semantic.min.js" integrity="sha256-fN8vcX2ULyTDspVTHEteK8hd3rQAb5thNiwakjAW75Q=" crossorigin="anonymous"></script></head><body onload="onLoad()"><script type="text/javascript">function onLoad(){};</script></body></html>'
]

{ #category : #'tests-Processing' }
Expand All @@ -264,14 +298,15 @@ SemanticUIComponentSupplierTest >> testUpdateRootWithSelfHostedLibraries [
| html |

html := WAHtmlCanvas builder
fullDocument: true;
rootBlock: [ :root |
(SemanticUIComponentSupplier
withSemanticUILibrary: SemanticUIDevelopmentMetadataLibrary default) updateRoot: root ];
render: [ :canvas | ].
fullDocument: true;
rootBlock: [ :root |
( SemanticUIComponentSupplier withSemanticUILibrary:
SemanticUIDevelopmentMetadataLibrary default ) updateRoot: root
];
render: [ :canvas | ].

self
assert: html
equals:
'<!DOCTYPE html><html><head><title></title><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="stylesheet" type="text/css" href="/files/semantic-ui-2.2.13/semantic.css"/><script type="text/javascript" src="/files/semantic-ui-2.2.13/semantic.js"></script></head><body onload="onLoad()"><script type="text/javascript">function onLoad(){};</script></body></html>'
'<!DOCTYPE html><html><head><title></title><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="stylesheet" type="text/css" href="/files/semantic-ui-2.5.0/semantic.css"/><script type="text/javascript" src="/files/semantic-ui-2.5.0/semantic.js"></script></head><body onload="onLoad()"><script type="text/javascript">function onLoad(){};</script></body></html>'
]
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
Class {
#name : #SemanticUIDeploymentMetadataLibraryTest,
#superclass : #BWRenderingTest,
#category : 'Willow-SemanticUI-Tests-Libraries'
#category : #'Willow-SemanticUI-Tests-Libraries'
}

{ #category : #tests }
SemanticUIDeploymentMetadataLibraryTest >> testDeployFiles [

self
assertFileDeploymentOf: SemanticUIDeploymentMetadataLibrary default
createsAsFolders: #('semantic-ui-2.2.13' 'semantic-ui-2.2.13/themes/default/assets/fonts' 'semantic-ui-2.2.13/themes/default/assets/images')
createsAsFolders: #('semantic-ui-2.5.0' 'semantic-ui-2.5.0/themes/default/assets/fonts' 'semantic-ui-2.5.0/themes/default/assets/images')
andFileContentsMatching:
{('semantic-ui-2.2.13/LatoLatin-Medium.eot' -> '233bea35f0aaedc48fdf6c98e8624b20d8455afd').
('semantic-ui-2.2.13/LatoLatin-Medium.ttf' -> '4120fa743b3cfce5e4e32423c55aa4a63c338b9e').
('semantic-ui-2.2.13/LatoLatin-Medium.woff' -> 'af3616d6e989baa6f49c8faac0a8d61d042d9bc8').
('semantic-ui-2.2.13/LatoLatin-Medium.woff2' -> '944b38f9c7883df6d16eda00d5deb81813465ffb').
('semantic-ui-2.2.13/latolatinfonts.css' -> '98526ca0c32bb1e6809275bfda13e6f520f4ce2b').
('semantic-ui-2.2.13/semantic.min.css' -> '380405d16e944ea8c6632f0cedcca46f49232c94').
('semantic-ui-2.2.13/semantic.min.js' -> 'f274c77554ff6aabead8e1a31087c8441cc030b9').
('semantic-ui-2.2.13/themes/default/assets/fonts/icons.eot' -> 'd980c2ce873dc43af460d4d572d441304499f400').
('semantic-ui-2.2.13/themes/default/assets/fonts/icons.otf' -> 'cde9eb92c8a3ba23d648f76ea3931511f30813f4').
('semantic-ui-2.2.13/themes/default/assets/fonts/icons.svg' -> '98a8aa5cf7d62c2eff5f07ede8d844b874ef06ed').
('semantic-ui-2.2.13/themes/default/assets/fonts/icons.ttf' -> '13b1eab65a983c7a73bc7997c479d66943f7c6cb').
('semantic-ui-2.2.13/themes/default/assets/fonts/icons.woff' -> '28b782240b3e76db824e12c02754a9731a167527').
('semantic-ui-2.2.13/themes/default/assets/fonts/icons.woff2' -> 'd6f48cba7d076fb6f2fd6ba993a75b9dc1ecbf0c').
('semantic-ui-2.2.13/themes/default/assets/images/flags.png' -> '4a552ecb123ded5040ddda01d626103cc65db055')}
{('semantic-ui-2.5.0/LatoLatin-Medium.eot' -> '233bea35f0aaedc48fdf6c98e8624b20d8455afd').
('semantic-ui-2.5.0/LatoLatin-Medium.ttf' -> '4120fa743b3cfce5e4e32423c55aa4a63c338b9e').
('semantic-ui-2.5.0/LatoLatin-Medium.woff' -> 'af3616d6e989baa6f49c8faac0a8d61d042d9bc8').
('semantic-ui-2.5.0/LatoLatin-Medium.woff2' -> '944b38f9c7883df6d16eda00d5deb81813465ffb').
('semantic-ui-2.5.0/latolatinfonts.css' -> '98526ca0c32bb1e6809275bfda13e6f520f4ce2b').
('semantic-ui-2.5.0/semantic.min.css' -> '1781383876cb8612d7030c32f4fd6cf3df5343ae').
('semantic-ui-2.5.0/semantic.min.js' -> '7b695d16ef9a19fbea0644e2f4e52d85b08da92d').
('semantic-ui-2.5.0/themes/default/assets/fonts/icons.eot' -> 'b7de2e1d65766852486de24b36a46240f4ae5994').
('semantic-ui-2.5.0/themes/default/assets/fonts/icons.otf' -> 'cde9eb92c8a3ba23d648f76ea3931511f30813f4').
('semantic-ui-2.5.0/themes/default/assets/fonts/icons.svg' -> 'c74bfaa0b440a2c13463aabcdbb349fa412268cb').
('semantic-ui-2.5.0/themes/default/assets/fonts/icons.ttf' -> 'cedd7227091b22f873e3856d84c3dfd974745048').
('semantic-ui-2.5.0/themes/default/assets/fonts/icons.woff' -> '9c293328f39dc54bd654d273d0cc5af0d11905c6').
('semantic-ui-2.5.0/themes/default/assets/fonts/icons.woff2' -> '6ec6d36cb2464b4e821cfabb532f310bd342601c').
('semantic-ui-2.5.0/themes/default/assets/images/flags.png' -> '4a552ecb123ded5040ddda01d626103cc65db055')}
]

{ #category : #tests }
Expand All @@ -41,12 +41,12 @@ SemanticUIDeploymentMetadataLibraryTest >> testUpdateRoot [
| html |

html := WAHtmlCanvas builder
fullDocument: true;
rootBlock: [ :root | SemanticUIDeploymentMetadataLibrary default updateRoot: root ];
render: [ :canvas | ].
fullDocument: true;
rootBlock: [ :root | SemanticUIDeploymentMetadataLibrary default updateRoot: root ];
render: [ :canvas | ].

self
assert: html
equals:
'<html><head><title></title><link rel="stylesheet" type="text/css" href="/files/semantic-ui-2.2.13/semantic.min.css"/><script type="text/javascript" src="/files/semantic-ui-2.2.13/semantic.min.js"></script></head><body onload="onLoad()"><script type="text/javascript">function onLoad(){};</script></body></html>'
'<html><head><title></title><link rel="stylesheet" type="text/css" href="/files/semantic-ui-2.5.0/semantic.min.css"/><script type="text/javascript" src="/files/semantic-ui-2.5.0/semantic.min.js"></script></head><body onload="onLoad()"><script type="text/javascript">function onLoad(){};</script></body></html>'
]
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
Class {
#name : #SemanticUIDevelopmentMetadataLibraryTest,
#superclass : #BWRenderingTest,
#category : 'Willow-SemanticUI-Tests-Libraries'
#category : #'Willow-SemanticUI-Tests-Libraries'
}

{ #category : #tests }
SemanticUIDevelopmentMetadataLibraryTest >> testDeployFiles [

self
assertFileDeploymentOf: SemanticUIDevelopmentMetadataLibrary default
createsAsFolders: #('semantic-ui-2.2.13' 'semantic-ui-2.2.13/themes/default/assets/fonts' 'semantic-ui-2.2.13/themes/default/assets/images')
createsAsFolders: #('semantic-ui-2.5.0' 'semantic-ui-2.5.0/themes/default/assets/fonts' 'semantic-ui-2.5.0/themes/default/assets/images')
andFileContentsMatching:
{('semantic-ui-2.2.13/LatoLatin-Medium.eot' -> '233bea35f0aaedc48fdf6c98e8624b20d8455afd').
('semantic-ui-2.2.13/LatoLatin-Medium.ttf' -> '4120fa743b3cfce5e4e32423c55aa4a63c338b9e').
('semantic-ui-2.2.13/LatoLatin-Medium.woff' -> 'af3616d6e989baa6f49c8faac0a8d61d042d9bc8').
('semantic-ui-2.2.13/LatoLatin-Medium.woff2' -> '944b38f9c7883df6d16eda00d5deb81813465ffb').
('semantic-ui-2.2.13/latolatinfonts.css' -> '98526ca0c32bb1e6809275bfda13e6f520f4ce2b').
('semantic-ui-2.2.13/semantic.css' -> 'd3af6b04626e8ad098f6644986e3ac46b39fcaaa').
('semantic-ui-2.2.13/semantic.js' -> 'c12255678fb74a3b8aba17eadc7624b91b7e6efd').
('semantic-ui-2.2.13/themes/default/assets/fonts/icons.eot' -> 'd980c2ce873dc43af460d4d572d441304499f400').
('semantic-ui-2.2.13/themes/default/assets/fonts/icons.otf' -> 'cde9eb92c8a3ba23d648f76ea3931511f30813f4').
('semantic-ui-2.2.13/themes/default/assets/fonts/icons.svg' -> '98a8aa5cf7d62c2eff5f07ede8d844b874ef06ed').
('semantic-ui-2.2.13/themes/default/assets/fonts/icons.ttf' -> '13b1eab65a983c7a73bc7997c479d66943f7c6cb').
('semantic-ui-2.2.13/themes/default/assets/fonts/icons.woff' -> '28b782240b3e76db824e12c02754a9731a167527').
('semantic-ui-2.2.13/themes/default/assets/fonts/icons.woff2' -> 'd6f48cba7d076fb6f2fd6ba993a75b9dc1ecbf0c').
('semantic-ui-2.2.13/themes/default/assets/images/flags.png' -> '4a552ecb123ded5040ddda01d626103cc65db055')}
{('semantic-ui-2.5.0/LatoLatin-Medium.eot' -> '233bea35f0aaedc48fdf6c98e8624b20d8455afd').
('semantic-ui-2.5.0/LatoLatin-Medium.ttf' -> '4120fa743b3cfce5e4e32423c55aa4a63c338b9e').
('semantic-ui-2.5.0/LatoLatin-Medium.woff' -> 'af3616d6e989baa6f49c8faac0a8d61d042d9bc8').
('semantic-ui-2.5.0/LatoLatin-Medium.woff2' -> '944b38f9c7883df6d16eda00d5deb81813465ffb').
('semantic-ui-2.5.0/latolatinfonts.css' -> '98526ca0c32bb1e6809275bfda13e6f520f4ce2b').
('semantic-ui-2.5.0/semantic.css' -> '8719d2eeaa7ec8da5b5596a63fc71d3e83547fa5').
('semantic-ui-2.5.0/semantic.js' -> 'c937ddd23de8bb7c8119634720eed7f58be1b940').
('semantic-ui-2.5.0/themes/default/assets/fonts/icons.eot' -> 'b7de2e1d65766852486de24b36a46240f4ae5994').
('semantic-ui-2.5.0/themes/default/assets/fonts/icons.otf' -> 'cde9eb92c8a3ba23d648f76ea3931511f30813f4').
('semantic-ui-2.5.0/themes/default/assets/fonts/icons.svg' -> 'c74bfaa0b440a2c13463aabcdbb349fa412268cb').
('semantic-ui-2.5.0/themes/default/assets/fonts/icons.ttf' -> 'cedd7227091b22f873e3856d84c3dfd974745048').
('semantic-ui-2.5.0/themes/default/assets/fonts/icons.woff' -> '9c293328f39dc54bd654d273d0cc5af0d11905c6').
('semantic-ui-2.5.0/themes/default/assets/fonts/icons.woff2' -> '6ec6d36cb2464b4e821cfabb532f310bd342601c').
('semantic-ui-2.5.0/themes/default/assets/images/flags.png' -> '4a552ecb123ded5040ddda01d626103cc65db055')}
]

{ #category : #tests }
Expand All @@ -51,12 +51,12 @@ SemanticUIDevelopmentMetadataLibraryTest >> testUpdateRoot [
| html |

html := WAHtmlCanvas builder
fullDocument: true;
rootBlock: [ :root | SemanticUIDevelopmentMetadataLibrary default updateRoot: root ];
render: [ :canvas | ].
fullDocument: true;
rootBlock: [ :root | SemanticUIDevelopmentMetadataLibrary default updateRoot: root ];
render: [ :canvas | ].

self
assert: html
equals:
'<html><head><title></title><link rel="stylesheet" type="text/css" href="/files/semantic-ui-2.2.13/semantic.css"/><script type="text/javascript" src="/files/semantic-ui-2.2.13/semantic.js"></script></head><body onload="onLoad()"><script type="text/javascript">function onLoad(){};</script></body></html>'
'<html><head><title></title><link rel="stylesheet" type="text/css" href="/files/semantic-ui-2.5.0/semantic.css"/><script type="text/javascript" src="/files/semantic-ui-2.5.0/semantic.js"></script></head><body onload="onLoad()"><script type="text/javascript">function onLoad(){};</script></body></html>'
]
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Class {
#name : #SemanticUIOnlineLibraryTest,
#superclass : #BWRenderingTest,
#category : 'Willow-SemanticUI-Tests-Libraries'
#category : #'Willow-SemanticUI-Tests-Libraries'
}

{ #category : #'tests-Updating' }
Expand All @@ -10,12 +10,12 @@ SemanticUIOnlineLibraryTest >> testUpdateRoot [
| html |

html := WAHtmlCanvas builder
fullDocument: true;
rootBlock: [ :root | SemanticUIOnlineLibrary default updateRoot: root ];
render: [ :canvas | ].
fullDocument: true;
rootBlock: [ :root | SemanticUIOnlineLibrary default updateRoot: root ];
render: [ :canvas | ].

self
assert: html
equals:
'<html><head><title></title><link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.13/semantic.min.css" integrity="sha256-/Z28yXtfBv/6/alw+yZuODgTbKZm86IKbPE/5kjO/xY=" crossorigin="anonymous"/><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.13/semantic.min.js" integrity="sha256-Bhi6GMQ/72uYZcJXCJ2LToOIcN3+Cx47AZnq/Bw1f7A=" crossorigin="anonymous"></script></head><body onload="onLoad()"><script type="text/javascript">function onLoad(){};</script></body></html>'
'<html><head><title></title><link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.5.0/semantic.min.css" integrity="sha256-cDGQ39yChhpN5vzgHbjIdGEtQ5kXE9tttCsI7VR9TuY=" crossorigin="anonymous"/><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.5.0/semantic.min.js" integrity="sha256-fN8vcX2ULyTDspVTHEteK8hd3rQAb5thNiwakjAW75Q=" crossorigin="anonymous"></script></head><body onload="onLoad()"><script type="text/javascript">function onLoad(){};</script></body></html>'
]
Loading