Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(5)

Unified Diff: test/test_charm_panel.js

Issue 6775058: Convert charm popup to full side display panel
Patch Set: Convert charm popup to full side display panel Created 12 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/index.html ('k') | test/test_environment_view.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/test_charm_panel.js
=== renamed file 'test/test_charm_search.js' => 'test/test_charm_panel.js'
--- test/test_charm_search.js 2012-10-29 10:01:29 +0000
+++ test/test_charm_panel.js 2012-11-01 13:21:53 +0000
@@ -1,6 +1,6 @@
'use strict';
-describe('charm search', function() {
+describe('charm panel', function() {
var Y, models, views, juju, ENTER,
searchResult = '{"results": [{"data_url": "this is my URL", ' +
'"name": "membase", "series": "precise", "summary": ' +
@@ -30,7 +30,7 @@
});
beforeEach(function() {
- // The "charms search" feature needs these elements
+ // The charms panel needs these elements
var docBody = Y.one(document.body);
Y.Node.create('<div id="charm-search-test">' +
'<div id="charm-search-icon"><i></i></div>' +
@@ -40,12 +40,12 @@
});
afterEach(function() {
- Y.namespace('juju.views').CharmSearchPopup.killInstance();
+ Y.namespace('juju.views').CharmPanel.killInstance();
Y.one('#charm-search-test').remove(true);
});
it('must be able to show and hide the panel', function() {
- var panel = Y.namespace('juju.views').CharmSearchPopup
+ var panel = Y.namespace('juju.views').CharmPanel
.getInstance({testing: true, app: {}}),
container = panel.node;
container.getStyle('display').should.equal('none');
@@ -61,7 +61,7 @@
it('must be able to search', function() {
var searchTriggered = false,
- panel = Y.namespace('juju.views').CharmSearchPopup.getInstance({
+ panel = Y.namespace('juju.views').CharmPanel.getInstance({
charm_store: new juju.CharmStore({datasource: {
sendRequest: function(params) {
searchTriggered = true;
@@ -91,7 +91,7 @@
it('must be able to trigger charm details', function() {
var db = new models.Database(),
- panel = Y.namespace('juju.views').CharmSearchPopup.getInstance({
+ panel = Y.namespace('juju.views').CharmPanel.getInstance({
charm_store: new juju.CharmStore({datasource: {
sendRequest: function(params) {
// Mocking the server callback value
@@ -122,7 +122,7 @@
it('must be able to deploy from the description panel by going to the ' +
'configuration panel', function() {
var db = new models.Database(),
- panel = Y.namespace('juju.views').CharmSearchPopup.getInstance({
+ panel = Y.namespace('juju.views').CharmPanel.getInstance({
charm_store: new juju.CharmStore({datasource: {
sendRequest: function(params) {
// Mocking the server callback value
@@ -254,12 +254,12 @@
html = container.one('.charm-description'),
section_container = html.one('div.charm-section:nth-of-type(3)');
section_container.one('div').getStyle('height').should.equal('0px');
- assert(section_container.one('h4 i').hasClass('icon-chevron-right'));
+ assert(section_container.one('h4 i').hasClass('icon-chevron-up'));
section_container.one('h4').simulate('click');
assert(section_container.one('h4 i').hasClass('icon-chevron-down'));
section_container.one('div').getStyle('height').should.not.equal('0px');
section_container.one('h4').simulate('click');
- assert(section_container.one('h4 i').hasClass('icon-chevron-right'));
+ assert(section_container.one('h4 i').hasClass('icon-chevron-up'));
// The transition is still running, so we can't check display.
});
« no previous file with comments | « test/index.html ('k') | test/test_environment_view.js » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b