aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2016-05-11 16:20:03 +0200
committerSiri Hansen <[email protected]>2016-05-20 09:40:55 +0200
commitc17d02df4184e2e1425827b2e469936c686049ed (patch)
treec6276c7f98e731ef8c35eb499de244993bab33e3 /lib/observer
parentddbe6a2d2531abfc7c72b07442a585f2649faedd (diff)
downloadotp-c17d02df4184e2e1425827b2e469936c686049ed.tar.gz
otp-c17d02df4184e2e1425827b2e469936c686049ed.tar.bz2
otp-c17d02df4184e2e1425827b2e469936c686049ed.zip
[observer] Add test of new Ports tab
Diffstat (limited to 'lib/observer')
-rw-r--r--lib/observer/test/observer_SUITE.erl26
1 files changed, 25 insertions, 1 deletions
diff --git a/lib/observer/test/observer_SUITE.erl b/lib/observer/test/observer_SUITE.erl
index 3dc3e4772b..212fd08532 100644
--- a/lib/observer/test/observer_SUITE.erl
+++ b/lib/observer/test/observer_SUITE.erl
@@ -171,6 +171,7 @@ test_page("Applications" ++ _, _Window) ->
test_page("Processes" ++ _, _Window) ->
timer:sleep(500), %% Give it time to refresh
Active = get_active(),
+ Active ! refresh_interval,
ChangeSort = fun(N) ->
FakeEv = #wx{event=#wxList{type=command_list_col_click, col=N}},
Active ! FakeEv,
@@ -184,7 +185,23 @@ test_page("Processes" ++ _, _Window) ->
timer:sleep(1000), %% Give it time to refresh
ok;
-test_page(_Title = "Table" ++ _, _Window) ->
+test_page("Ports" ++ _, _Window) ->
+ timer:sleep(500), %% Give it time to refresh
+ Active = get_active(),
+ Active ! refresh_interval,
+ ChangeSort = fun(N) ->
+ FakeEv = #wx{event=#wxList{type=command_list_col_click, col=N}},
+ Active ! FakeEv,
+ timer:sleep(200)
+ end,
+ [ChangeSort(N) || N <- lists:seq(1,4) ++ [0]],
+ Activate = #wx{event=#wxList{type=command_list_item_activated,
+ itemIndex=2}},
+ Active ! Activate,
+ timer:sleep(1000), %% Give it time to refresh
+ ok;
+
+test_page("Table" ++ _, _Window) ->
Tables = [ets:new(list_to_atom("Test-" ++ [C]), [public]) || C <- lists:seq($A, $Z)],
Table = lists:nth(3, Tables),
ets:insert(Table, [{N,100-N} || N <- lists:seq(1,100)]),
@@ -208,6 +225,13 @@ test_page(_Title = "Table" ++ _, _Window) ->
timer:sleep(1000),
ok;
+test_page("Trace Overview" ++ _, _Window) ->
+ timer:sleep(500), %% Give it time to refresh
+ Active = get_active(),
+ Active ! refresh_interval,
+ timer:sleep(1000), %% Give it time to refresh
+ ok;
+
test_page(Title, Window) ->
io:format("Page ~p: ~p~n", [Title, Window]),
%% Just let it display some info and hopefully it doesn't crash