is(scalar @outputs, 1, 'exactly one output (testcase not multi-monitor capable)');
my $output = $outputs[0];
# get the first (and only) CT_CON
- return first { $_->{type} == 2 } @{$output->{nodes}};
+ return first { $_->{type} eq 'con' } @{$output->{nodes}};
}
$tmp = fresh_workspace;
cmd 'layout stacked';
is(get_output_content()->{layout}, 'splith', 'content container layout still ok');
+######################################################################
+# Splitting a workspace that has more than one child
+######################################################################
+
+$tmp = fresh_workspace;
+
+cmd 'open';
+cmd 'open';
+cmd 'focus parent';
+cmd 'split v';
+cmd 'open';
+
+my $content = get_ws_content($tmp);
+my $fst = $content->[0];
+my $snd = $content->[1];
+
+is(@{$content}, 2, 'two containers on workspace');
+is(@{$fst->{nodes}}, 2, 'first child has two children');
+is(@{$snd->{nodes}}, 0, 'second child has no children');
+
done_testing;