Skip to content

Commit

Permalink
TEST: try to fix testing for changes to plotly.js
Browse files Browse the repository at this point in the history
Recent plotly.js changed layout.title -> layout.title.text and layout.(x|y)axis.title -> layout.$1axis.title.text
  • Loading branch information
sglyon authored Dec 29, 2018
1 parent 86c6839 commit 17b5821
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/blink.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ end
end

@testset "relayout" begin
relayout!(p, title="This is a title")
relayout!(p, title_text="This is a title")
update_layout!()
@test p.scope["__gd_contents"][]["title"] == "This is a title"
@test p.scope["__gd_contents"][]["title"]["text"] == "This is a title"
end

@testset "update" begin
update!(p, marker_size=10, layout=Layout(xaxis_title="This is x"))
update!(p, marker_size=10, layout=Layout(xaxis_title_text="This is x"))
update_layout!()
@test p.scope["__gd_contents"][]["xaxis"]["title"] == "This is x"
@test p.scope["__gd_contents"][]["xaxis"]["title"]["text"] == "This is x"

update_data!()
for i in 1:4
Expand Down Expand Up @@ -109,7 +109,7 @@ end
@testset "react" begin
new_trace = scatter(x=1:10, y=(1:10.0).^2, name="New trace")
new_trace2 = t()
new_l = Layout(yaxis_title="This is y")
new_l = Layout(yaxis_title_text="This is y")
react!(p, [new_trace, new_trace2], new_l)

update_data!()
Expand All @@ -119,7 +119,7 @@ end
@test p.scope["__gd_contents"][][1]["name"] == "New trace"

update_layout!()
@test p.scope["__gd_contents"][]["yaxis"]["title"] == "This is y"
@test p.scope["__gd_contents"][]["yaxis"]["title"]["text"] == "This is y"
end

end

0 comments on commit 17b5821

Please sign in to comment.