-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ui: incorporate new changes from Prometheus React UI
Signed-off-by: Prem Kumar <[email protected]>
- Loading branch information
Showing
26 changed files
with
227 additions
and
103 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
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,30 @@ | ||
import * as React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
import Navigation from './Navbar'; | ||
import { NavItem, NavLink } from 'reactstrap'; | ||
|
||
describe('Navbar should contain console Link', () => { | ||
it('with non-empty consoleslink', () => { | ||
const app = shallow(<Navigation pathPrefix="/path/prefix" consolesLink="/path/consoles" />); | ||
expect( | ||
app.contains( | ||
<NavItem> | ||
<NavLink href="/path/consoles">Consoles</NavLink> | ||
</NavItem> | ||
) | ||
).toBeTruthy(); | ||
}); | ||
}); | ||
|
||
describe('Navbar should not contain consoles link', () => { | ||
it('with empty string in consolesLink', () => { | ||
const app = shallow(<Navigation pathPrefix="/path/prefix" consolesLink={null} />); | ||
expect( | ||
app.contains( | ||
<NavItem> | ||
<NavLink>Consoles</NavLink> | ||
</NavItem> | ||
) | ||
).toBeFalsy(); | ||
}); | ||
}); |
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
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
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
Oops, something went wrong.