diff --git a/src/.vscode/tasks.json b/src/.vscode/tasks.json index b07aa653..02f95997 100644 --- a/src/.vscode/tasks.json +++ b/src/.vscode/tasks.json @@ -7,7 +7,11 @@ "label": "Build Debug", "command": "./build.ps1", "type": "shell", - "args": ["-Configuration", "Debug", "-NoHelp"], + "args": [ + "-Configuration", + "Debug", + "-NoHelp" + ], "group": "build", "presentation": { "reveal": "always", @@ -18,7 +22,10 @@ "label": "Build Release", "command": "./build.ps1", "type": "shell", - "args": ["-Configuration", "Release"], + "args": [ + "-Configuration", + "Release" + ], "group": "build", "presentation": { "reveal": "always", @@ -33,13 +40,17 @@ "presentation": { "reveal": "always", "panel": "new" - } + }, + "problemMatcher": [] }, { "label": "Run Materialize Test", "command": "./UniversalDashboard.Materialize/Tests/driver.ps1", "type": "shell", - "args": ["-Control", "${input:control}"], + "args": [ + "-Control", + "${input:control}" + ], "group": "test", "presentation": { "reveal": "always", diff --git a/src/UniversalDashboard.Materialize/Components/ud-image-carousel.jsx b/src/UniversalDashboard.Materialize/Components/ud-image-carousel.jsx index 3c58ca23..cefdf56d 100644 --- a/src/UniversalDashboard.Materialize/Components/ud-image-carousel.jsx +++ b/src/UniversalDashboard.Materialize/Components/ud-image-carousel.jsx @@ -69,7 +69,7 @@ export default class UdImageCarousel extends React.Component { if(this.props.autoCycle){ this.onCarouselButtonClick(this.props) setTimeout(() => { - $(`#${this.props.id}`).carousel('next') + this.instance.instance.next(); },this.props.speed) } else{ @@ -100,7 +100,7 @@ export default class UdImageCarousel extends React.Component { return ( - + this.instance = x} carouselId={this.props.id} options={options} fixedItem={btn}> {carouselItems} diff --git a/src/UniversalDashboard.Materialize/Tests/image-carousel.tests.ps1 b/src/UniversalDashboard.Materialize/Tests/image-carousel.tests.ps1 index fd9d4527..200f383a 100644 --- a/src/UniversalDashboard.Materialize/Tests/image-carousel.tests.ps1 +++ b/src/UniversalDashboard.Materialize/Tests/image-carousel.tests.ps1 @@ -31,8 +31,8 @@ Describe "New-UDImageCarousel" { } - $carousel = Find-SeElement -Driver $driver -Id 'carousel-demo - ' + $carousel = Find-SeElement -Driver $driver -Id 'carousel-demo' + it "Should have image carousel component" { $carousel -eq $null | Should be $false }