Skip to content
This repository has been archived by the owner on Jan 4, 2025. It is now read-only.

Fixes #1496 #1505

Merged
merged 1 commit into from
Feb 6, 2020
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
2 changes: 1 addition & 1 deletion src/UniversalDashboard.Materialize/Components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class Materialize extends React.Component {
}

return <Route key={x.url} path={window.baseUrl + x.url} render={props => (
<UdPage onTitleChanged={component.setTitle.bind(component)} id={x.id} dynamic={true} {...props} autoRefresh={x.autoRefresh} refreshInterval={x.refreshInterval} key={props.location.key} />
<UdPage onTitleChanged={component.setTitle.bind(component)} id={x.id} dynamic={true} {...x} {...props} autoRefresh={x.autoRefresh} refreshInterval={x.refreshInterval} key={props.location.key} />
)} />
})

Expand Down
15 changes: 15 additions & 0 deletions src/UniversalDashboard.UITest/Integration/Page.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,21 @@ function Set-TestDashboard {

Describe "New-UDPage" {

Context "dynamic page with title" {
$Page1 = New-UDPage -Name "Page" -Title 'Xyz' -Endpoint {
New-UDCard -Text "Home" -Id "Home"
}

$dashboard = New-UDDashboard -Title "Test" -Pages @($Page1)

Set-TestDashboard -Dashboard $dashboard

It "should have a custom title" {
Enter-SeUrl -Driver $Driver -Url "http://localhost:$BrowserPort/Page"
(Find-SeElement -Tag "title" -Driver $Driver).Text | Should not be "Xyz"
}
}

Context "page with spaces and endpoint" {
$Page1 = New-UDPage -Name "Page" -Content {
New-UDCard -Text "Home" -Id "Home"
Expand Down