mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Avoid the .label class because it conflicts with bootstrap
This commit is contained in:
@@ -49,7 +49,7 @@ class CommandPaletteView extends SelectList
|
||||
keyBindings = @keyBindings
|
||||
$$ ->
|
||||
@li class: 'event', 'data-event-name': eventName, =>
|
||||
@span eventDescription, class: 'label', title: eventName
|
||||
@span eventDescription, title: eventName
|
||||
@div class: 'right', =>
|
||||
for binding in keyBindings[eventName] ? []
|
||||
@kbd binding, class: 'key-binding'
|
||||
|
||||
@@ -24,8 +24,8 @@ describe "CommandPalette", ->
|
||||
eventLi = palette.list.children("[data-event-name='#{eventName}']")
|
||||
if description
|
||||
expect(eventLi).toExist()
|
||||
expect(eventLi.find('.label')).toHaveText(description)
|
||||
expect(eventLi.find('.label').attr('title')).toBe(eventName)
|
||||
expect(eventLi.find('span')).toHaveText(description)
|
||||
expect(eventLi.find('span').attr('title')).toBe(eventName)
|
||||
for binding in keyBindings[eventName] ? []
|
||||
expect(eventLi.find(".key-binding:contains(#{binding})")).toExist()
|
||||
else
|
||||
@@ -40,8 +40,8 @@ describe "CommandPalette", ->
|
||||
description = editorEvents[eventName] unless description
|
||||
if description
|
||||
expect(eventLi).toExist()
|
||||
expect(eventLi.find('.label')).toHaveText(description)
|
||||
expect(eventLi.find('.label').attr('title')).toBe(eventName)
|
||||
expect(eventLi.find('span')).toHaveText(description)
|
||||
expect(eventLi.find('span').attr('title')).toBe(eventName)
|
||||
else
|
||||
expect(eventLi).not.toExist()
|
||||
|
||||
@@ -92,8 +92,8 @@ describe "CommandPalette", ->
|
||||
eventLi = palette.list.children("[data-event-name='#{eventName}']")
|
||||
if description
|
||||
expect(eventLi).toExist()
|
||||
expect(eventLi.find('.label')).toHaveText(description)
|
||||
expect(eventLi.find('.label').attr('title')).toBe(eventName)
|
||||
expect(eventLi.find('span')).toHaveText(description)
|
||||
expect(eventLi.find('span').attr('title')).toBe(eventName)
|
||||
for binding in keyBindings[eventName] ? []
|
||||
expect(eventLi.find(".key-binding:contains(#{binding})")).toExist()
|
||||
else
|
||||
|
||||
@@ -59,7 +59,7 @@ class FuzzyFinderView extends SelectList
|
||||
else
|
||||
typeClass = 'text-name'
|
||||
|
||||
@span fsUtils.base(path), class: "file label #{typeClass}"
|
||||
@span fsUtils.base(path), class: "file #{typeClass}"
|
||||
if folder = project.relativize(fsUtils.directory(path))
|
||||
@span " - #{folder}/", class: 'directory'
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ class SymbolsView extends SelectList
|
||||
itemForElement: ({position, name, file}) ->
|
||||
$$ ->
|
||||
@li =>
|
||||
@div name, class: 'label'
|
||||
@span name
|
||||
if position
|
||||
text = "Line #{position.row + 1}"
|
||||
else
|
||||
|
||||
@@ -30,9 +30,9 @@ describe "SymbolsView", ->
|
||||
expect(symbolsView.find('.loading')).toBeEmpty()
|
||||
expect(rootView.find('.symbols-view')).toExist()
|
||||
expect(symbolsView.list.children('li').length).toBe 2
|
||||
expect(symbolsView.list.children('li:first').find('.label')).toHaveText 'quicksort'
|
||||
expect(symbolsView.list.children('li:first').find('span')).toHaveText 'quicksort'
|
||||
expect(symbolsView.list.children('li:first').find('.function-details')).toHaveText 'Line 1'
|
||||
expect(symbolsView.list.children('li:last').find('.label')).toHaveText 'quicksort.sort'
|
||||
expect(symbolsView.list.children('li:last').find('span')).toHaveText 'quicksort.sort'
|
||||
expect(symbolsView.list.children('li:last').find('.function-details')).toHaveText 'Line 2'
|
||||
expect(symbolsView).not.toHaveClass "error"
|
||||
expect(symbolsView.error).not.toBeVisible()
|
||||
@@ -175,7 +175,7 @@ describe "SymbolsView", ->
|
||||
editor.trigger 'symbols-view:go-to-declaration'
|
||||
symbolsView = rootView.find('.symbols-view').view()
|
||||
expect(symbolsView.list.children('li').length).toBe 1
|
||||
expect(symbolsView.list.children('li:first').find('.label')).toHaveText 'tagged.js'
|
||||
expect(symbolsView.list.children('li:first').find('span')).toHaveText 'tagged.js'
|
||||
|
||||
describe "project symbols", ->
|
||||
it "displays all tags", ->
|
||||
@@ -192,9 +192,9 @@ describe "SymbolsView", ->
|
||||
expect(symbolsView.find('.loading')).toBeEmpty()
|
||||
expect(rootView.find('.symbols-view')).toExist()
|
||||
expect(symbolsView.list.children('li').length).toBe 4
|
||||
expect(symbolsView.list.children('li:first').find('.label')).toHaveText 'callMeMaybe'
|
||||
expect(symbolsView.list.children('li:first').find('span')).toHaveText 'callMeMaybe'
|
||||
expect(symbolsView.list.children('li:first').find('.function-details')).toHaveText 'tagged.js'
|
||||
expect(symbolsView.list.children('li:last').find('.label')).toHaveText 'thisIsCrazy'
|
||||
expect(symbolsView.list.children('li:last').find('span')).toHaveText 'thisIsCrazy'
|
||||
expect(symbolsView.list.children('li:last').find('.function-details')).toHaveText 'tagged.js'
|
||||
expect(symbolsView).not.toHaveClass "error"
|
||||
expect(symbolsView.error).not.toBeVisible()
|
||||
|
||||
Reference in New Issue
Block a user