Skip to content
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
3 changes: 1 addition & 2 deletions test/test_explorer_compositecomp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ close(w)
# dim_name::Union{Nothing, Symbol} = nothing)
items = [:fooA1, :fooA2, :foo3, :foo4, :var_3_1, :par_1_1]
for item in items
p = Mimi.plot(m, :top, item)
p_type = _is_VegaLite_v3() ? VegaLite.VLSpec : VegaLite.VLSpec{:plot}
@test typeof(p) == p_type
@test typeof(Mimi.plot(m, :top, item)) == p_type
end
3 changes: 1 addition & 2 deletions test/test_explorer_model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,8 @@ close(w)
# dim_name::Union{Nothing, Symbol} = nothing)
items = [:a, :b, :c, :d, :e, :f, :x]
for item in items
p = Mimi.plot(m, :MyComp, item)
p_type = _is_VegaLite_v3() ? VegaLite.VLSpec : VegaLite.VLSpec{:plot}
@test typeof(p) == p_type
@test typeof(Mimi.plot(m, :MyComp, item)) == p_type
end

#6. errors and warnings
Expand Down
9 changes: 7 additions & 2 deletions test/test_explorer_sim.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ using CSVFiles
import Mimi:
_spec_for_sim_item, menu_item_list, getdataframe, get_sim_results

# Helper function returns true if VegaLite is verison 3 or above, and false otherwise
function _is_VegaLite_v3()
return isdefined(VegaLite, :vlplot) ? true : false
end

# Get the example
include("mcs/test-model-2/multi-region-model.jl")
using .MyModel
Expand Down Expand Up @@ -71,7 +76,7 @@ w = explore(si_disk, title="Testing Window", results_output_dir = results_output
@test typeof(w) == Electron.Window
close(w)

@test_throws ErrorException w = explore(si_disk) #should error, no in-memory results
@test_throws ErrorException explore(si_disk) #should error, no in-memory results

## 3. Plots

Expand All @@ -94,7 +99,7 @@ plot_type_test(p)
p = Mimi.plot(si_disk, :emissions, :E_Global; interactive = true, results_output_dir = results_output_dir)
plot_type_test(p)

@test_throws ErrorException p = Mimi.plot(si_disk, :emissions, :E_Global) #should error, no in-memory results
@test_throws ErrorException Mimi.plot(si_disk, :emissions, :E_Global) #should error, no in-memory results

# mulitrumpet plot
p = Mimi.plot(si, :emissions, :E)
Expand Down