Skip to content

Commit

Permalink
Added support for testing library deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
gcotelli committed Jul 3, 2017
1 parent d599fa5 commit 51c720a
Show file tree
Hide file tree
Showing 41 changed files with 158 additions and 42 deletions.
@@ -0,0 +1,8 @@
tests
testDeployFiles

self
useFileTestingPlatformDuring: [ JQuery2DeploymentMetadataLibrary default deployFiles.
self
assert: GRPlatform current createdFolders equals: #('jQuery-2.2.4');
assert: GRPlatform current createdFiles equals: #('jQuery-2.2.4/jquery-2.2.4.min.js') ]

This file was deleted.

This file was deleted.

@@ -1,8 +1,9 @@
{
"instance" : {
"testIsForDeplyment" : "isosa 6/27/2017 10:27",
"testIsForDeployment" : "ISosa 7/3/2017 10:38:59",
"testHandlesFolder" : "ISosa 7/3/2017 10:38:59",
"testUpdateRoot" : "isosa 6/27/2017 10:30",
"testHanldesFolder" : "isosa 6/27/2017 10:28"
"testDeployFiles" : "GabrielOmarCotelli 7/3/2017 15:03"
},
"class" : { }
}
@@ -1,6 +1,6 @@
{
"commentStamp" : "",
"super" : "TestCase",
"super" : "WillowLibraryTestCase",
"category" : "Willow-Tests-Libraries",
"classinstvars" : [ ],
"pools" : [ ],
Expand Down
@@ -0,0 +1,8 @@
tests
testDeployFiles

self
useFileTestingPlatformDuring: [ JQuery2DevelopmentMetadataLibrary default deployFiles.
self
assert: GRPlatform current createdFolders equals: #('jQuery-2.2.4');
assert: GRPlatform current createdFiles equals: #('jQuery-2.2.4/jquery-2.2.4.js') ]
Expand Up @@ -2,7 +2,8 @@
"instance" : {
"testIsForDevelopment" : "isosa 6/27/2017 10:25",
"testHandlesFolder" : "isosa 6/26/2017 20:54",
"testUpdateRoot" : "isosa 6/27/2017 10:20"
"testUpdateRoot" : "isosa 6/27/2017 10:20",
"testDeployFiles" : "GabrielOmarCotelli 7/3/2017 15:02"
},
"class" : { }
}
@@ -1,6 +1,6 @@
{
"commentStamp" : "",
"super" : "TestCase",
"super" : "WillowLibraryTestCase",
"category" : "Willow-Tests-Libraries",
"classinstvars" : [ ],
"pools" : [ ],
Expand Down
@@ -0,0 +1 @@
I'm a platform wrapping the installed one but providing facilities to test stuff related to the file system
@@ -0,0 +1,4 @@
Configuring
wrapping: aGRPlatform

^ self new initializeWrapping: aGRPlatform
@@ -0,0 +1,4 @@
comet
cometWait

^platform cometWait
@@ -0,0 +1,4 @@
accessing
createdFiles

^ createdFiles asArray
@@ -0,0 +1,4 @@
accessing
createdFolders

^ Array withAll: createdFolders
@@ -0,0 +1,5 @@
file library
ensureExistenceOfFolder: aString

createdFolders add: aString.
^ true
@@ -0,0 +1,6 @@
initialization
initializeWrapping: aGRPlatform

platform := aGRPlatform.
createdFolders := GRSmallOrderedSet new.
createdFiles := OrderedCollection new
@@ -0,0 +1,4 @@
file library
localNameOf: aString

^ platform localNameOf: aString
@@ -0,0 +1,4 @@
file library
pathSeparator

^ platform pathSeparator
@@ -0,0 +1,4 @@
file library
write: aStringOrByteArray toFile: aFileNameString inFolder: aFolderString

createdFiles add: ('<1s>/<2s>' expandMacrosWith: aFolderString with: aFileNameString)
@@ -0,0 +1,15 @@
{
"instance" : {
"ensureExistenceOfFolder:" : "GabrielOmarCotelli 7/3/2017 14:53",
"write:toFile:inFolder:" : "GabrielOmarCotelli 7/3/2017 14:55",
"cometWait" : "GabrielOmarCotelli 7/3/2017 14:43",
"initializeWrapping:" : "GabrielOmarCotelli 7/3/2017 14:56",
"createdFiles" : "GabrielOmarCotelli 7/3/2017 14:52",
"createdFolders" : "GabrielOmarCotelli 7/3/2017 14:59",
"localNameOf:" : "GabrielOmarCotelli 7/3/2017 14:44",
"pathSeparator" : "GabrielOmarCotelli 7/3/2017 14:43"
},
"class" : {
"wrapping:" : "GabrielOmarCotelli 7/3/2017 14:34"
}
}
@@ -0,0 +1,15 @@
{
"commentStamp" : "GabrielOmarCotelli 7/3/2017 14:29",
"super" : "GRPlatform",
"category" : "Willow-Tests",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [
"platform",
"createdFolders",
"createdFiles"
],
"name" : "WillowFileTestingPlatform",
"type" : "normal"
}
@@ -0,0 +1 @@
I'm an abstract test case adding support for testing libraries deployment
@@ -0,0 +1,4 @@
testing
isAbstract

^self name = #WillowLibraryTestCase
@@ -0,0 +1,9 @@
private
useFileTestingPlatformDuring: aBlock

| installedPlatform |

installedPlatform := GRPlatform current.
[ GRPlatform current: (WillowFileTestingPlatform wrapping: installedPlatform).
aBlock value ]
ensure: [ GRPlatform current: installedPlatform ]
@@ -0,0 +1,8 @@
{
"instance" : {
"useFileTestingPlatformDuring:" : "GabrielOmarCotelli 7/3/2017 14:33"
},
"class" : {
"isAbstract" : "GabrielOmarCotelli 7/3/2017 14:28"
}
}
@@ -0,0 +1,11 @@
{
"commentStamp" : "GabrielOmarCotelli 7/3/2017 14:27",
"super" : "WillowTestCase",
"category" : "Willow-Tests",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [ ],
"name" : "WillowLibraryTestCase",
"type" : "normal"
}
@@ -0,0 +1,8 @@
tests
testDeployFiles

self
useFileTestingPlatformDuring: [ WillowNamespaceFileMetadataLibrary default deployFiles.
self
assert: GRPlatform current createdFolders equals: #('willow-4.0.0' 'willow-4.0.0/js');
assert: GRPlatform current createdFiles equals: #('willow-4.0.0/js/willow.js') ]
@@ -1,8 +1,9 @@
{
"instance" : {
"testJavascriptCode" : "GabrielOmarCotelli 5/9/2017 14:43",
"testTesting" : "GabrielOmarCotelli 4/19/2017 15:30",
"testInstanceCreation" : "GabrielOmarCotelli 4/19/2017 15:29",
"testJavascriptCode" : "GabrielOmarCotelli 5/9/2017 14:43"
"testDeployFiles" : "GabrielOmarCotelli 7/3/2017 15:06"
},
"class" : { }
}
@@ -1,6 +1,6 @@
{
"commentStamp" : "<historical>",
"super" : "TestCase",
"super" : "WillowLibraryTestCase",
"category" : "Willow-Tests-Libraries",
"classinstvars" : [ ],
"pools" : [ ],
Expand Down
2 changes: 1 addition & 1 deletion source/Willow-Tests.package/monticello.meta/version

Large diffs are not rendered by default.

@@ -0,0 +1,4 @@
*Willow-SeasideExtensions
at: anIndex

^ table at: anIndex
@@ -0,0 +1,6 @@
{
"instance" : {
"at:" : "GabrielOmarCotelli 7/3/2017 15:00"
},
"class" : { }
}
@@ -0,0 +1,3 @@
{
"name" : "GRSmallOrderedSet"
}
@@ -1,9 +1,8 @@
uploaded metadata
jquery224minJs

<ignoreforCoverage>
^ WAFileLibraryResource
filepath: 'jquery-2.2.4.min.js'
mimeType: (WAMimeType main: 'application' sub: 'x-javascript')
cacheDuration: self defaultCacheDuration
cacheDuration: self class defaultCacheDuration
contents: (GRDelayedSend receiver: self selector: #jquery224minJsContent)

Large diffs are not rendered by default.

@@ -1,7 +1,7 @@
{
"instance" : {
"jquery224minJs" : "isosa 6/27/2017 10:22",
"jquery224minJsContent" : "isosa 6/27/2017 10:22",
"jquery224minJs" : "GabrielOmarCotelli 7/3/2017 15:06",
"jquery224minJsContent" : "GabrielOmarCotelli 7/3/2017 15:06",
"selectorsToInclude" : "isosa 6/27/2017 10:22"
},
"class" : {
Expand Down
@@ -1,9 +1,8 @@
uploaded metadata
jquery224Js

<ignoreForCoverage>
^ WAFileLibraryResource
filepath: 'jquery-2.2.4.js'
mimeType: (WAMimeType main: 'application' sub: 'x-javascript')
cacheDuration: self defaultCacheDuration
cacheDuration: self class defaultCacheDuration
contents: (GRDelayedSend receiver: self selector: #jquery224JsContent)
@@ -1,7 +1,6 @@
uploaded
jquery224JsContent

<ignoreForCoverage>
^ '/*!
* jQuery JavaScript Library v2.2.4
* http://jquery.com/
Expand Down
@@ -1,7 +1,7 @@
{
"instance" : {
"jquery224Js" : "isosa 6/27/2017 10:21",
"jquery224JsContent" : "isosa 6/27/2017 10:17",
"jquery224Js" : "GabrielOmarCotelli 7/3/2017 15:10",
"jquery224JsContent" : "GabrielOmarCotelli 7/3/2017 15:09",
"selectorsToInclude" : "isosa 6/27/2017 10:19"
},
"class" : {
Expand Down

This file was deleted.

@@ -1,7 +1,5 @@
{
"instance" : {
"defaultCacheDuration" : "isosa 6/21/2017 14:38"
},
"instance" : { },
"class" : {
"version" : "isosa 6/22/2017 15:16",
"libraryName" : "isosa 6/21/2017 14:35",
Expand Down
Binary file modified source/Willow.package/monticello.meta/version
Binary file not shown.

0 comments on commit 51c720a

Please sign in to comment.