Permalink
Browse files

Styles for FeedbackGhost. FeedbackGhost test (in the context of Compo…

…nentLoader).
  • Loading branch information...
Sergei Kozlov
Sergei Kozlov committed Jun 15, 2011
1 parent d5c3945 commit ebb2a449f8736a01d15cc2d45b4e5aed46eba7fb
View
@@ -2,11 +2,31 @@
This file gets loaded along with the rest of Ext library at the initial load
*/
-/* feedback */
-.netzke-feedback {
- position:fixed;
- left:25%;
- top:0;
+/* FeedbackGhost */
+.msg .x-box-mc {
+ font-size:14px;
+}
+#msg-div {
+ position:absolute;
+ left:35%;
+ top:10px;
width:300px;
z-index:20000;
}
+#msg-div .msg {
+ border-radius: 8px;
+ -moz-border-radius: 8px;
+ background: #F6F6F6;
+ border: 2px solid #ccc;
+ margin-top: 2px;
+ padding: 10px 15px;
+ color: #555;
+}
+#msg-div .msg h3 {
+ margin: 0 0 8px;
+ font-weight: bold;
+ font-size: 15px;
+}
+#msg-div .msg p {
+ margin: 0;
+}
@@ -73,10 +73,12 @@ class ComponentLoader < Netzke::Base
action :load_with_params
+ action :non_existing_component, :text => "Non-existing component"
+
js_properties(
:title => "Component Loader",
:layout => "fit",
- :bbar => [:load_component.action, :load_in_window.action, :load_with_feedback.action, :load_window_with_simple_component.action, :load_composite.action, :load_with_params.action, :load_with_generic_callback.action, :load_with_generic_callback_and_scope.action]
+ :bbar => [:load_component.action, :load_in_window.action, :load_with_feedback.action, :load_window_with_simple_component.action, :load_composite.action, :load_with_params.action, :load_with_generic_callback.action, :load_with_generic_callback_and_scope.action, :non_existing_component.action]
)
js_method :on_load_window_with_simple_component, <<-JS
@@ -103,6 +105,12 @@ class ComponentLoader < Netzke::Base
}
JS
+ js_method :on_non_existing_component, <<-JS
+ function(){
+ this.loadComponent({name: 'non_existing_component', container: this.getId()});
+ }
+ JS
+
js_method :on_load_in_window, <<-JS
function(){
var w = new Ext.window.Window({
@@ -43,3 +43,9 @@ Feature: Component loader
Given I am on the ComponentLoader test page
When I press "Load with params"
Then I should see "Simple Component with changed HTML"
+
+ @javascript
+ Scenario: Component loader should report that it can't load a component
+ Given I am on the ComponentLoader test page
+ When I press "Non-existing component"
+ Then I should see "Couldn't load component 'non_existing_component'"

0 comments on commit ebb2a44

Please sign in to comment.