From 73416c40dcdd5d199df5a1e4741167095650fd8b Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Thu, 27 Apr 2017 09:07:29 +0200 Subject: [PATCH] upgrade jest (#1981) --- server/sonar-web/package.json | 4 +- .../ComponentNavBreadcrumbs-test.js.snap | 36 +- .../ComponentNavMenu-test.js.snap | 46 +- .../__snapshots__/GlobalNavMenu-test.js.snap | 37 +- .../__snapshots__/SettingsNav-test.js.snap | 112 ++- .../GlobalNotifications-test.js.snap | 19 +- .../__snapshots__/Notifications-test.js.snap | 16 +- .../NotificationsList-test.js.snap | 28 +- .../ProjectNotifications-test.js.snap | 25 +- .../__snapshots__/Projects-test.js.snap | 70 +- .../__snapshots__/SearchSelect-test.js.snap | 9 +- .../__snapshots__/ConciseIssue-test.js.snap | 7 +- .../ConciseIssueComponent-test.js.snap | 7 +- .../ConciseIssueLocationBadge-test.js.snap | 10 +- .../ConciseIssueLocations-test.js.snap | 32 +- .../ConciseIssuesList-test.js.snap | 10 +- .../__snapshots__/AssigneeFacet-test.js.snap | 84 ++- .../__snapshots__/Sidebar-test.js.snap | 14 +- .../__snapshots__/FacetBox-test.js.snap | 7 +- .../__snapshots__/FacetFooter-test.js.snap | 10 +- .../__snapshots__/FacetHeader-test.js.snap | 71 +- .../__snapshots__/FacetItem-test.js.snap | 68 +- .../__snapshots__/FacetItemsList-test.js.snap | 7 +- .../__snapshots__/MembersList-test.js.snap | 13 +- .../MembersListHeader-test.js.snap | 21 +- .../MembersListItem-test.js.snap | 104 ++- .../MembersPageHeader-test.js.snap | 25 +- .../OrganizationAdmin-test.js.snap | 6 +- .../OrganizationDelete-test.js.snap | 101 ++- .../OrganizationEdit-test.js.snap | 236 ++++--- .../OrganizationGroupCheckbox-test.js.snap | 36 +- .../OrganizationMembers-test.js.snap | 45 +- .../OrganizationPage-test.js.snap | 11 +- .../__snapshots__/AddMemberForm-test.js.snap | 39 +- .../ManageMemberGroupsForm-test.js.snap | 57 +- .../RemoveMemberForm-test.js.snap | 35 +- .../OrganizationNavigation-test.js.snap | 173 +++-- .../LeakPeriodLegend-test.js.snap | 17 +- .../__snapshots__/MetaLink-test.js.snap | 40 +- .../__snapshots__/MetaTags-test.js.snap | 57 +- .../QualityGateCondition-test.js.snap | 186 +++-- .../__snapshots__/Defaults-test.js.snap | 22 +- .../__snapshots__/PageSidebar-test.js.snap | 12 +- .../__snapshots__/ProjectCard-test.js.snap | 50 +- .../ProjectCardMeasures-test.js.snap | 308 ++++++--- .../__snapshots__/ViewSelect-test.js.snap | 7 +- .../LanguagesFilter-test.js.snap | 85 ++- .../__snapshots__/SearchFilter-test.js.snap | 46 +- .../SearchableFilterFooter-test.js.snap | 22 +- .../__snapshots__/SortingFilter-test.js.snap | 58 +- .../__snapshots__/TagsFilter-test.js.snap | 96 ++- .../__snapshots__/UserSearch-test.js.snap | 53 +- .../UsersSelectSearch-test.js.snap | 18 +- .../UsersSelectSearchOption-test.js.snap | 36 +- .../UsersSelectSearchValue-test.js.snap | 41 +- .../ActionChangelog-test.js.snap | 19 +- .../__snapshots__/Domain-test.js.snap | 33 +- .../__snapshots__/Params-test.js.snap | 56 +- .../__snapshots__/LineCode-test.js.snap | 25 +- .../__snapshots__/LineCoverage-test.js.snap | 32 +- .../LineDuplicationBlock-test.js.snap | 21 +- .../LineDuplications-test.js.snap | 21 +- .../LineIssuesIndicator-test.js.snap | 29 +- .../__snapshots__/LineIssuesList-test.js.snap | 13 +- .../__snapshots__/LineNumber-test.js.snap | 12 +- .../__snapshots__/LineSCM-test.js.snap | 31 +- .../__snapshots__/BubbleChart-test.js.snap | 62 +- .../__snapshots__/BubblePopup-test.js.snap | 10 +- .../BubblePopupHelper-test.js.snap | 73 +- .../__snapshots__/MarkdownTips-test.js.snap | 19 +- .../__snapshots__/MultiSelect-test.js.snap | 112 +-- .../MultiSelectOption-test.js.snap | 34 +- .../__snapshots__/SelectList-test.js.snap | 47 +- .../__snapshots__/SelectListItem-test.js.snap | 28 +- .../__snapshots__/IssueAssign-test.js.snap | 61 +- .../__snapshots__/IssueChangelog-test.js.snap | 38 +- .../IssueCommentAction-test.js.snap | 36 +- .../IssueCommentLine-test.js.snap | 102 ++- .../__snapshots__/IssueMessage-test.js.snap | 10 +- .../__snapshots__/IssueSeverity-test.js.snap | 43 +- .../__snapshots__/IssueTags-test.js.snap | 37 +- .../__snapshots__/IssueTitleBar-test.js.snap | 72 +- .../IssueTransition-test.js.snap | 60 +- .../__snapshots__/IssueType-test.js.snap | 43 +- .../__snapshots__/ChangelogPopup-test.js.snap | 37 +- .../CommentDeletePopup-test.js.snap | 16 +- .../__snapshots__/CommentPopup-test.js.snap | 54 +- .../SetIssueTagsPopup-test.js.snap | 7 +- .../SetSeverityPopup-test.js.snap | 40 +- .../SetTransitionPopup-test.js.snap | 22 +- .../__snapshots__/SetTypePopup-test.js.snap | 28 +- .../__snapshots__/Organization-test.js.snap | 14 +- .../__snapshots__/QualifierIcon-test.js.snap | 19 +- .../__snapshots__/TagsSelector-test.js.snap | 18 +- .../__tests__/__snapshots__/duck-test.js.snap | 2 + .../__snapshots__/analyses-test.js.snap | 12 +- .../analysesByProject-test.js.snap | 14 +- .../__tests__/__snapshots__/duck-test.js.snap | 2 + .../__snapshots__/events-test.js.snap | 12 +- .../__snapshots__/paging-test.js.snap | 8 +- server/sonar-web/yarn.lock | 641 ++++++++---------- 101 files changed, 3099 insertions(+), 1811 deletions(-) diff --git a/server/sonar-web/package.json b/server/sonar-web/package.json index 592a9f901d0..29aef0c9ca6 100644 --- a/server/sonar-web/package.json +++ b/server/sonar-web/package.json @@ -44,7 +44,7 @@ "autoprefixer": "6.4.1", "babel-core": "^6.22.1", "babel-eslint": "6.1.2", - "babel-jest": "^18.0.0", + "babel-jest": "19.0.0", "babel-loader": "^6.2.10", "babel-plugin-transform-class-properties": "^6.22.0", "babel-plugin-transform-object-rest-spread": "^6.22.0", @@ -82,7 +82,7 @@ "handlebars-loader": "1.1.4", "html-webpack-plugin": "2.24.1", "imports-loader": "0.6.5", - "jest": "^18.0.0", + "jest": "19.0.2", "json-loader": "0.5.4", "less": "2.7.1", "less-loader": "2.2.3", diff --git a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/__snapshots__/ComponentNavBreadcrumbs-test.js.snap b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/__snapshots__/ComponentNavBreadcrumbs-test.js.snap index 810d438e08e..5d6110501ae 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/__snapshots__/ComponentNavBreadcrumbs-test.js.snap +++ b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/__snapshots__/ComponentNavBreadcrumbs-test.js.snap @@ -1,11 +1,16 @@ -exports[`test should not render breadcrumbs with one element 1`] = ` +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`should not render breadcrumbs with one element 1`] = `

+ className="navbar-context-title" +> + className="navbar-context-title-qualifier little-spacer-right" + > + qualifier="TRK" + /> + } + > My Project @@ -27,14 +33,17 @@ exports[`test should not render breadcrumbs with one element 1`] = `

`; -exports[`test should render organization 1`] = ` +exports[`should render organization 1`] = `

+ className="navbar-context-title" +> + className="navbar-context-title-qualifier little-spacer-right" + > + qualifier="TRK" + /> + } + > The Foo Organization + className="slash-separator" + /> + } + > My Project diff --git a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/__snapshots__/ComponentNavMenu-test.js.snap b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/__snapshots__/ComponentNavMenu-test.js.snap index 898c8de040f..2bc14b3ac35 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/__snapshots__/ComponentNavMenu-test.js.snap +++ b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/__snapshots__/ComponentNavMenu-test.js.snap @@ -1,6 +1,9 @@ -exports[`test should work with extensions 1`] = ` +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`should work with extensions 1`] = `
    + className="nav navbar-nav nav-tabs" +>
  • + } + > + className="icon-home" + />
  • @@ -31,7 +36,8 @@ exports[`test should work with extensions 1`] = ` "resolved": "false", }, } - }> + } + > issues.page
  • @@ -47,7 +53,8 @@ exports[`test should work with extensions 1`] = ` "id": "foo", }, } - }> + } + > layout.measures @@ -63,7 +70,8 @@ exports[`test should work with extensions 1`] = ` "id": "foo", }, } - }> + } + > code.page @@ -79,24 +87,29 @@ exports[`test should work with extensions 1`] = ` "id": "foo", }, } - }> + } + > project_activity.page
  • + className="dropdown" + > + id="component-navigation-admin" + > layout.settings   + className="icon-dropdown" + />
      + className="dropdown-menu" + >
    • + } + > project_settings.page
    • @@ -125,7 +139,8 @@ exports[`test should work with extensions 1`] = ` "id": "foo", }, } - }> + } + > Foo @@ -141,7 +156,8 @@ exports[`test should work with extensions 1`] = ` "id": "foo", }, } - }> + } + > deletion.page diff --git a/server/sonar-web/src/main/js/app/components/nav/global/__tests__/__snapshots__/GlobalNavMenu-test.js.snap b/server/sonar-web/src/main/js/app/components/nav/global/__tests__/__snapshots__/GlobalNavMenu-test.js.snap index 30ec923b76a..bc69019f7a0 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/__tests__/__snapshots__/GlobalNavMenu-test.js.snap +++ b/server/sonar-web/src/main/js/app/components/nav/global/__tests__/__snapshots__/GlobalNavMenu-test.js.snap @@ -1,12 +1,16 @@ -exports[`test should work with extensions 1`] = ` +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`should work with extensions 1`] = `
        + className="nav navbar-nav" +>
      • + to="/projects" + > projects.page
      • @@ -21,7 +25,8 @@ exports[`test should work with extensions 1`] = ` "resolved": "false", }, } - }> + } + > issues.page @@ -30,7 +35,8 @@ exports[`test should work with extensions 1`] = ` className={null} onlyActiveOnIndex={false} style={Object {}} - to="/coding_rules"> + to="/coding_rules" + > coding_rules.page @@ -39,7 +45,8 @@ exports[`test should work with extensions 1`] = ` activeClassName="active" onlyActiveOnIndex={false} style={Object {}} - to="/profiles"> + to="/profiles" + > quality_profiles.page @@ -48,29 +55,35 @@ exports[`test should work with extensions 1`] = ` activeClassName="active" onlyActiveOnIndex={false} style={Object {}} - to="/quality_gates"> + to="/quality_gates" + > quality_gates.page
      • + className="dropdown" + > + id="global-navigation-more" + > more   + className="icon-dropdown" + />
          + className="dropdown-menu" + >
        • + to="/extension/foo" + > Foo
        • diff --git a/server/sonar-web/src/main/js/app/components/nav/settings/__tests__/__snapshots__/SettingsNav-test.js.snap b/server/sonar-web/src/main/js/app/components/nav/settings/__tests__/__snapshots__/SettingsNav-test.js.snap index ad7c6f975e1..1efd658114f 100644 --- a/server/sonar-web/src/main/js/app/components/nav/settings/__tests__/__snapshots__/SettingsNav-test.js.snap +++ b/server/sonar-web/src/main/js/app/components/nav/settings/__tests__/__snapshots__/SettingsNav-test.js.snap @@ -1,68 +1,85 @@ -exports[`test should work with extensions 1`] = ` +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`should work with extensions 1`] = `