123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305 |
- // Jest Snapshot v1, https://goo.gl/fbAQLP
-
- exports[`should render ProjectCard correctly 1`] = `
- <div
- className="sc-project-card-container"
- style={
- Object {
- "order": 1,
- }
- }
- >
- <Link
- className="sc-project-card"
- onlyActiveOnIndex={false}
- style={Object {}}
- to={
- Object {
- "pathname": "/dashboard",
- "query": Object {
- "branch": undefined,
- "id": "sonarsource-jfrog.simple-js-php-project",
- },
- }
- }
- >
- <div
- className="sc-project-card-header"
- >
- <OrganizationAvatar
- className="no-border spacer-bottom"
- organization={
- Object {
- "avatar": undefined,
- "name": "SonarSource & JFrog",
- }
- }
- />
- <p
- className="sc-project-card-limited"
- title="SonarSource & JFrog"
- >
- SonarSource & JFrog
- </p>
- <h5
- className="sc-project-card-limited big-spacer-bottom"
- title="Simple JS & PHP project"
- >
- Simple JS & PHP project
- </h5>
- <Level
- level="OK"
- />
- </div>
- <ul
- className="sc-project-card-measures"
- >
- <ProjectIssues
- metric={0}
- metricKey="bugs"
- ratingMetric={1}
- viewable={false}
- />
- <ProjectIssues
- metric={0}
- metricKey="vulnerabilities"
- ratingMetric={1}
- viewable={false}
- />
- <ProjectIssues
- metric={7}
- metricKey="code_smells"
- ratingMetric={1}
- viewable={false}
- />
- <li>
- <span>
- overview.metric.coverage
- </span>
- <div>
- <CoverageRating
- value={9.7}
- />
- </div>
- </li>
- <li>
- <span>
- overview.metric.duplications
- </span>
- <div>
- <DuplicationsRating
- value={56.2}
- />
- </div>
- </li>
- </ul>
- <div
- className="sc-mention text-left big-spacer-top"
- >
- 324
- lines of code /
-
- <Connect(ProjectCardLanguages)
- className="display-inline-block"
- distribution="js;php"
- />
- </div>
- </Link>
- </div>
- `;
-
- exports[`should render ProjectIssues correctly 1`] = `
- <li>
- <span>
- overview.metric.foo
- </span>
- <div>
- <Rating
- value={20}
- />
- </div>
- </li>
- `;
-
- exports[`should render correctly 1`] = `
- <div
- className="sc-featured-projects sc-big-spacer-bottom"
- >
- <button
- className="js-prev sc-project-button"
- onClick={[Function]}
- type="button"
- >
- <img
- alt=""
- src="/images/sonarcloud/chevron-left.svg"
- />
- </button>
- <div
- className="sc-featured-projects-container"
- >
- <div
- className="sc-featured-projects-inner ready"
- >
- <ProjectCard
- key="example-js-4"
- order={0}
- project={
- Object {
- "avatarUrl": null,
- "bugs": 13,
- "codeSmells": 5,
- "coverage": 0,
- "duplications": 0,
- "gateStatus": "OK",
- "key": "example-js-4",
- "languages": Array [
- "go",
- "js",
- "php",
- "py",
- ],
- "maintainabilityRating": 1,
- "name": "example-js",
- "ncloc": 80,
- "organizationKey": "autoscan",
- "organizationName": "AutoScan",
- "reliabilityRating": 1,
- "securityRating": 1,
- "vulnerabilities": 0,
- }
- }
- viewable={false}
- />
- <ProjectCard
- key="sonarsource-jfrog.simple-js-php-project"
- order={1}
- project={
- Object {
- "avatarUrl": null,
- "bugs": 0,
- "codeSmells": 7,
- "coverage": 9.7,
- "duplications": 56.2,
- "gateStatus": "OK",
- "key": "sonarsource-jfrog.simple-js-php-project",
- "languages": Array [
- "js",
- "php",
- ],
- "maintainabilityRating": 1,
- "name": "Simple JS & PHP project",
- "ncloc": 324,
- "organizationKey": "sonarsource-jfrog",
- "organizationName": "SonarSource & JFrog",
- "reliabilityRating": 1,
- "securityRating": 1,
- "vulnerabilities": 0,
- }
- }
- viewable={false}
- />
- <ProjectCard
- key="example-js"
- order={2}
- project={
- Object {
- "avatarUrl": null,
- "bugs": 13,
- "codeSmells": 5,
- "coverage": 0,
- "duplications": 0,
- "gateStatus": "OK",
- "key": "example-js",
- "languages": Array [
- "go",
- "js",
- "php",
- "py",
- ],
- "maintainabilityRating": 1,
- "name": "example-js",
- "ncloc": 80,
- "organizationKey": "autoscan",
- "organizationName": "AutoScan",
- "reliabilityRating": 1,
- "securityRating": 1,
- "vulnerabilities": 0,
- }
- }
- viewable={false}
- />
- <ProjectCard
- key="example-js-2"
- order={3}
- project={
- Object {
- "avatarUrl": null,
- "bugs": 13,
- "codeSmells": 5,
- "coverage": 0,
- "duplications": 0,
- "gateStatus": "OK",
- "key": "example-js-2",
- "languages": Array [
- "go",
- "js",
- "php",
- "py",
- ],
- "maintainabilityRating": 1,
- "name": "example-js",
- "ncloc": 80,
- "organizationKey": "autoscan",
- "organizationName": "AutoScan",
- "reliabilityRating": 1,
- "securityRating": 1,
- "vulnerabilities": 0,
- }
- }
- viewable={false}
- />
- <ProjectCard
- key="example-js-3"
- order={4}
- project={
- Object {
- "avatarUrl": null,
- "bugs": 13,
- "codeSmells": 5,
- "coverage": 0,
- "duplications": 0,
- "gateStatus": "OK",
- "key": "example-js-3",
- "languages": Array [
- "go",
- "js",
- "php",
- "py",
- ],
- "maintainabilityRating": 1,
- "name": "example-js",
- "ncloc": 80,
- "organizationKey": "autoscan",
- "organizationName": "AutoScan",
- "reliabilityRating": 1,
- "securityRating": 1,
- "vulnerabilities": 0,
- }
- }
- viewable={false}
- />
- </div>
- </div>
- <button
- className="js-next sc-project-button"
- onClick={[Function]}
- type="button"
- >
- <img
- alt=""
- src="/images/sonarcloud/chevron-right.svg"
- />
- </button>
- </div>
- `;
|