forked from netzke/netzke-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added tests for dynamically loading some view containing a Netzke com…
…ponent into a Ext.Panel
- Loading branch information
Sergei Kozlov
committed
Nov 17, 2010
1 parent
29cccb4
commit f17d507
Showing
9 changed files
with
50 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Feature: Nested views | ||
In order to value | ||
As a role | ||
I want feature | ||
|
||
@javascript | ||
Scenario: A component with auto loaded content should render properly | ||
When I go to the "panel with autoload" view | ||
Then I should see "Autoloaded Panel" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
class SimplePanel < Netzke::Base | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
test/rails_app/app/views/components/panel_with_autoload.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<%# This is just a panel that has +autoload+ option to load some content from the autoloaded_content action, which in its turn renders a view with a Netzke component in it %> | ||
<%= netzke :panel_with_autoload, :class_name => "SimplePanel", :html => "Some content", :autoLoad => {:url => "autoloaded_content", :scripts => true}%> |
11 changes: 11 additions & 0 deletions
11
test/rails_app/app/views/components/some_tab_panel.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<%= netzke :tabs, | ||
:class_name => "SimpleTabPanel", | ||
:active_tab => 0, | ||
:items => [{ | ||
:html => "I'm a simple Ext.Panel", | ||
:title => "Panel One" | ||
},{ | ||
:html => "I'm a second simple Ext.Panel", | ||
:title => "Panel Two" | ||
}] | ||
%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<%# Use this layout when you dynamically load views with other Netzke components into some Ext.Panel, e.g. with Ext.updater. | ||
Because the main Netzke/Ext code is already loaded, all we need to load is the JavaScript for components that are | ||
embedded in the loaded view. TODO: fix class caching in this scenario. %> | ||
<%= netzke_js %> | ||
<%= yield %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters