Update to use Bootstrap 3 instead of Bootstrap 4. Fixes #3562

This commit is contained in:
Aditya Toshniwal
2018-10-10 12:43:26 +01:00
committed by Dave Page
parent bdf90e67a7
commit 0565f8dd78
82 changed files with 2559 additions and 2486 deletions

View File

@@ -1,67 +0,0 @@
/////////////////////////////////////////////////////////////
//
// pgAdmin 4 - PostgreSQL Tools
//
// Copyright (C) 2013 - 2018, The pgAdmin Development Team
// This software is released under the PostgreSQL Licence
//
//////////////////////////////////////////////////////////////
define([
'pgadmin',
'browser/menu',
], function (pgAdmin) {
describe('MenuItem', function () {
var MenuItem = pgAdmin.Browser.MenuItem;
var menuItem;
describe('when we create a menu item', function () {
describe('and it is disabled', function () {
beforeEach(function () {
menuItem = new MenuItem({enable: false, icon: 'fa fa-car'});
menuItem.create_el({}, {});
});
it('should change the text color to gray', function () {
expect(menuItem.$el.find('span').hasClass('text-gray')).toBeTruthy();
});
describe('when becomes enabled', function () {
beforeEach(function () {
menuItem.enable = true;
menuItem.update({},{});
});
it('should change the text color to white', function () {
expect(menuItem.$el.find('span').hasClass('text-gray')).toBeFalsy();
expect(menuItem.$el.find('span').hasClass('text-fg-inverse')).toBeTruthy();
});
});
});
describe('and it is enabled', function () {
beforeEach(function () {
menuItem = new MenuItem({enable: true, icon: 'fa fa-car'});
menuItem.create_el({}, {});
});
it('should change the text color to white', function () {
expect(menuItem.$el.find('span').hasClass('text-fg-inverse')).toBeTruthy();
});
describe('when becomes disabled', function () {
beforeEach(function () {
menuItem.enable = false;
menuItem.update({},{});
});
it('should change the text color to gray', function () {
expect(menuItem.$el.find('span').hasClass('text-gray')).toBeTruthy();
expect(menuItem.$el.find('span').hasClass('text-fg-inverse')).toBeFalsy();
});
});
});
});
});
});

View File

@@ -8,7 +8,7 @@ describe('ExplainStatistics', () => {
beforeEach(function() {
statsModel = new StatisticsModel();
statsDiv = '<div class="pg-explain-stats-area btn-group hidden"></div>';
statsDiv = '<div class="pg-explain-stats-area btn-group d-none"></div>';
tooltipContainer = $('<div></div>', {
id: 'toolTip',
class: 'pgadmin-explain-tooltip',
@@ -23,7 +23,7 @@ describe('ExplainStatistics', () => {
statsModel.set('Triggers', []);
statsModel.set_statistics(tooltipContainer);
expect($('.pg-explain-stats-area').hasClass('hidden')).toBe(true);
expect($('.pg-explain-stats-area').hasClass('d-none')).toBe(true);
});
});
@@ -36,7 +36,7 @@ describe('ExplainStatistics', () => {
});
it('Statistics button should be visible', () => {
expect($('.pg-explain-stats-area').hasClass('hidden')).toBe(false);
expect($('.pg-explain-stats-area').hasClass('d-none')).toBe(false);
});
it('Mouse over event should be trigger', () => {
@@ -65,7 +65,7 @@ describe('ExplainStatistics', () => {
});
it('Statistics button should be visible', () => {
expect($('.pg-explain-stats-area').hasClass('hidden')).toBe(false);
expect($('.pg-explain-stats-area').hasClass('d-none')).toBe(false);
});
it('Mouse over event should be trigger', () => {