123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247 |
- // Jest Snapshot v1, https://goo.gl/fbAQLP
-
- exports[`should render correctly 1`] = `
- <div
- id="security_hotspots"
- >
- <Connect(withCurrentUser(FilterBar))
- filters={
- Object {
- "assignedToMe": false,
- "sinceLeakPeriod": false,
- "status": "TO_REVIEW",
- }
- }
- isStaticListOfHotspots={true}
- onBranch={false}
- onChangeFilters={[MockFunction]}
- onShowAllHotspots={[MockFunction]}
- />
- <ScreenPositionHelper>
- <Component />
- </ScreenPositionHelper>
- </div>
- `;
-
- exports[`should render correctly with hotspots 1`] = `
- <div>
- <div
- className="wrapper"
- style={
- Object {
- "top": 0,
- }
- }
- >
- <Suggestions
- suggestions="security_hotspots"
- />
- <HelmetWrapper
- defer={true}
- encodeSpecialCharacters={true}
- title="hotspots.page"
- />
- <A11ySkipTarget
- anchor="security_hotspots_main"
- />
- <div
- className="layout-page"
- >
- <div
- className="sidebar"
- >
- <HotspotList
- hotspots={
- Array [
- Object {
- "author": "Developer 1",
- "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
- "creationDate": "2013-05-13T17:55:39+0200",
- "key": "h1",
- "line": 81,
- "message": "'3' is a magic number.",
- "project": "com.github.kevinsawicki:http-request",
- "resolution": undefined,
- "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
- "securityCategory": "command-injection",
- "status": "TO_REVIEW",
- "updateDate": "2013-05-13T17:55:39+0200",
- "vulnerabilityProbability": "HIGH",
- },
- Object {
- "author": "Developer 1",
- "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
- "creationDate": "2013-05-13T17:55:39+0200",
- "key": "h2",
- "line": 81,
- "message": "'3' is a magic number.",
- "project": "com.github.kevinsawicki:http-request",
- "resolution": undefined,
- "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
- "securityCategory": "command-injection",
- "status": "TO_REVIEW",
- "updateDate": "2013-05-13T17:55:39+0200",
- "vulnerabilityProbability": "HIGH",
- },
- ]
- }
- hotspotsTotal={2}
- isStaticListOfHotspots={true}
- loadingMore={false}
- onHotspotClick={[MockFunction]}
- onLoadMore={[MockFunction]}
- securityCategories={Object {}}
- statusFilter="TO_REVIEW"
- />
- </div>
- <div
- className="main"
- />
- </div>
- </div>
- </div>
- `;
-
- exports[`should render correctly with hotspots 2`] = `
- <div>
- <div
- className="wrapper"
- style={
- Object {
- "top": 0,
- }
- }
- >
- <Suggestions
- suggestions="security_hotspots"
- />
- <HelmetWrapper
- defer={true}
- encodeSpecialCharacters={true}
- title="hotspots.page"
- />
- <A11ySkipTarget
- anchor="security_hotspots_main"
- />
- <div
- className="layout-page"
- >
- <div
- className="sidebar"
- >
- <HotspotList
- hotspots={
- Array [
- Object {
- "author": "Developer 1",
- "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
- "creationDate": "2013-05-13T17:55:39+0200",
- "key": "h1",
- "line": 81,
- "message": "'3' is a magic number.",
- "project": "com.github.kevinsawicki:http-request",
- "resolution": undefined,
- "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
- "securityCategory": "command-injection",
- "status": "TO_REVIEW",
- "updateDate": "2013-05-13T17:55:39+0200",
- "vulnerabilityProbability": "HIGH",
- },
- Object {
- "author": "Developer 1",
- "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
- "creationDate": "2013-05-13T17:55:39+0200",
- "key": "h2",
- "line": 81,
- "message": "'3' is a magic number.",
- "project": "com.github.kevinsawicki:http-request",
- "resolution": undefined,
- "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
- "securityCategory": "command-injection",
- "status": "TO_REVIEW",
- "updateDate": "2013-05-13T17:55:39+0200",
- "vulnerabilityProbability": "HIGH",
- },
- ]
- }
- hotspotsTotal={3}
- isStaticListOfHotspots={true}
- loadingMore={false}
- onHotspotClick={[MockFunction]}
- onLoadMore={[MockFunction]}
- securityCategories={Object {}}
- selectedHotspotKey="h2"
- statusFilter="TO_REVIEW"
- />
- </div>
- <div
- className="main"
- >
- <HotspotViewer
- hotspotKey="h2"
- onUpdateHotspot={[MockFunction]}
- securityCategories={Object {}}
- />
- </div>
- </div>
- </div>
- </div>
- `;
-
- exports[`should render correctly: no hotspots 1`] = `
- <div>
- <div
- className="wrapper"
- style={
- Object {
- "top": 0,
- }
- }
- >
- <Suggestions
- suggestions="security_hotspots"
- />
- <HelmetWrapper
- defer={true}
- encodeSpecialCharacters={true}
- title="hotspots.page"
- />
- <A11ySkipTarget
- anchor="security_hotspots_main"
- />
- <EmptyHotspotsPage
- filtered={false}
- isStaticListOfHotspots={true}
- />
- </div>
- </div>
- `;
-
- exports[`should render correctly: no hotspots with filters 1`] = `
- <div>
- <div
- className="wrapper"
- style={
- Object {
- "top": 0,
- }
- }
- >
- <Suggestions
- suggestions="security_hotspots"
- />
- <HelmetWrapper
- defer={true}
- encodeSpecialCharacters={true}
- title="hotspots.page"
- />
- <A11ySkipTarget
- anchor="security_hotspots_main"
- />
- <EmptyHotspotsPage
- filtered={true}
- isStaticListOfHotspots={true}
- />
- </div>
- </div>
- `;
|