diff --git a/CHANGELOG.md b/CHANGELOG.md index ad3e9d38..1ea1f903 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ - + +# [v2.1.2](https://github.com/DuneSt/MaterialDesignLite/compare/v2.1.1...v2.1.2) (2019-02-28) + +## Bug fix + +* Fix failing test (testDisplayDateOn) ([848315](https://github.com/DuneSt/MaterialDesignLite/commit/8483153286c64fb6cc1e127d9f71c19582c789d4)) + # [v2.1.1](https://github.com/DuneSt/MaterialDesignLite/compare/v2.1.0...v2.1.1) (2019-02-11) ## Bug fix diff --git a/src/Material-Design-Lite-Demo/MDLDemo.class.st b/src/Material-Design-Lite-Demo/MDLDemo.class.st index 20efdb19..772e8eec 100644 --- a/src/Material-Design-Lite-Demo/MDLDemo.class.st +++ b/src/Material-Design-Lite-Demo/MDLDemo.class.st @@ -81,7 +81,7 @@ MDLDemo class >> open [ { #category : #versions } MDLDemo class >> version [ - ^ 'v2.1.1' + ^ 'v2.1.2' ] { #category : #hooks } diff --git a/src/Material-Design-Lite-Widgets-Tests/MDLCalendarWidgetTest.class.st b/src/Material-Design-Lite-Widgets-Tests/MDLDatePickerTest.class.st similarity index 86% rename from src/Material-Design-Lite-Widgets-Tests/MDLCalendarWidgetTest.class.st rename to src/Material-Design-Lite-Widgets-Tests/MDLDatePickerTest.class.st index 33d7e3fe..61c77e14 100644 --- a/src/Material-Design-Lite-Widgets-Tests/MDLCalendarWidgetTest.class.st +++ b/src/Material-Design-Lite-Widgets-Tests/MDLDatePickerTest.class.st @@ -1,20 +1,20 @@ Class { - #name : #MDLCalendarWidgetTest, + #name : #MDLDatePickerTest, #superclass : #MDLAbstractSeasideTestCase, #instVars : [ 'calendar' ], - #category : 'Material-Design-Lite-Widgets-Tests-Calendar' + #category : #'Material-Design-Lite-Widgets-Tests-Calendar' } { #category : #running } -MDLCalendarWidgetTest >> setUp [ +MDLDatePickerTest >> setUp [ super setUp. calendar := MDLDatePicker new ] { #category : #tests } -MDLCalendarWidgetTest >> testDisplayDateOn [ +MDLDatePickerTest >> testDisplayDateOn [ | today tommorrow afterTommorrow nextMonth | today := Date today. tommorrow := (DateAndTime today + 1 days) asDate. @@ -28,11 +28,13 @@ MDLCalendarWidgetTest >> testDisplayDateOn [ self assert: [ :html | calendar displayDate: tommorrow on: html ] generatedIncludes: 'mdl-color-text--primary-contrast mdl-color--primary'. self deny: [ :html | calendar displayDate: tommorrow on: html ] generatedIncludes: 'disabled'. + + calendar currentDate: today. self assert: [ :html | calendar displayDate: nextMonth on: html ] generatedIncludes: 'disabled' ] { #category : #tests } -MDLCalendarWidgetTest >> testGoToNextMonth [ +MDLDatePickerTest >> testGoToNextMonth [ calendar currentDate: (Date year: 2016 month: 4 day: 10). calendar goToNextMonth. self assert: calendar currentDate asMonth equals: (Month month: 5 year: 2016). @@ -40,7 +42,7 @@ MDLCalendarWidgetTest >> testGoToNextMonth [ ] { #category : #tests } -MDLCalendarWidgetTest >> testGoToPreviousMonth [ +MDLDatePickerTest >> testGoToPreviousMonth [ calendar currentDate: (Date year: 2016 month: 4 day: 10). calendar goToPreviousMonth. self assert: calendar currentDate asMonth equals: (Month month: 3 year: 2016). @@ -48,26 +50,26 @@ MDLCalendarWidgetTest >> testGoToPreviousMonth [ ] { #category : #tests } -MDLCalendarWidgetTest >> testId [ +MDLDatePickerTest >> testId [ self deny: [ :html | html render: calendar ] generatedIncludes: 'id="testId"'. calendar id: 'testId'. self assert: [ :html | html render: calendar ] generatedIncludes: 'id="testId"' ] { #category : #tests } -MDLCalendarWidgetTest >> testIdIsEnsured [ +MDLDatePickerTest >> testIdIsEnsured [ self assert: [ :html | html render: calendar ] generatedIncludes: 'id="id1"' ] { #category : #tests } -MDLCalendarWidgetTest >> testIsInCurrentMonth [ +MDLDatePickerTest >> testIsInCurrentMonth [ calendar currentDate: (Date year: 2018 month: 6 day: 5). self assert: (calendar isInCurrentMonth: (Date year: 2018 month: 6 day: 5)). self deny: (calendar selectedDateIs: (Date year: 2018 month: 7 day: 4)) ] { #category : #tests } -MDLCalendarWidgetTest >> testIsTodayAndNotSelected [ +MDLDatePickerTest >> testIsTodayAndNotSelected [ | today tommorow | today := Date today. tommorow := (DateAndTime today + 1 days) asDate. @@ -79,7 +81,7 @@ MDLCalendarWidgetTest >> testIsTodayAndNotSelected [ ] { #category : #tests } -MDLCalendarWidgetTest >> testJsOnCompleteScript [ +MDLDatePickerTest >> testJsOnCompleteScript [ calendar onCompleteScript: 'console.log("test")' js. self assert: (calendar jsOnCompleteScript isKindOf: JSStream). self assert: calendar jsOnCompleteScript contents equals: 'console.log("test")'. @@ -89,21 +91,21 @@ MDLCalendarWidgetTest >> testJsOnCompleteScript [ ] { #category : #tests } -MDLCalendarWidgetTest >> testRenderMonthesOn [ +MDLDatePickerTest >> testRenderMonthesOn [ self assert: [ :html | calendar renderMonthesOn: html ] generatedIncludesAll: Date monthNames. calendar currentDate: (Date year: 2018 month: 6 day: 5). self assert: [ :html | calendar renderMonthesOn: html ] generatedIncludes: 'May
> testRenderYearsOn [ +MDLDatePickerTest >> testRenderYearsOn [ self assert: [ :html | calendar renderYearsOn: html ] generatedIncludesAll: (calendar calendar yearsInterval collect: #asString). calendar currentDate: (Date year: 2018 month: 6 day: 5). self assert: [ :html | calendar renderYearsOn: html ] generatedIncludes: '2017
> testSelectedDateIs [ +MDLDatePickerTest >> testSelectedDateIs [ calendar currentDate: (Date year: 2018 month: 6 day: 5). self assert: (calendar selectedDateIs: (Date year: 2018 month: 6 day: 5)). self deny: (calendar selectedDateIs: (Date year: 2018 month: 6 day: 4))