Browse Source

chore: Bump enzyme{,-adapter-react-16} to 3.5 / 1.3 (#9542)

Fragment's disappearing (or being renamed) is likely due to https://github.com/airbnb/enzyme/pull/1733
Evan Purkhiser 6 years ago
parent
commit
7796c20a89

+ 2 - 2
package.json

@@ -155,8 +155,8 @@
     "babel-eslint": "7.2.3",
     "babel-jest": "22.1.0",
     "chai": "3.4.1",
-    "enzyme": "3.2.0",
-    "enzyme-adapter-react-16": "npm:enzyme-react-adapter-future",
+    "enzyme": "3.5.0",
+    "enzyme-adapter-react-16": "1.3.0",
     "enzyme-to-json": "3.3.1",
     "eslint": "4.4.1",
     "eslint-config-prettier": "^2.3.0",

+ 2 - 2
tests/js/spec/components/__snapshots__/confirm.spec.jsx.snap

@@ -1,7 +1,7 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`Confirm renders 1`] = `
-<React.Fragment>
+<Fragment>
   <button
     onClick={[Function]}
   >
@@ -66,5 +66,5 @@ exports[`Confirm renders 1`] = `
       </Button>
     </div>
   </Modal>
-</React.Fragment>
+</Fragment>
 `;

+ 35 - 45
tests/js/spec/components/__snapshots__/eventOrGroupExtraDetails.spec.jsx.snap

@@ -15,15 +15,13 @@ exports[`EventOrGroupExtraDetails details when mentioned 1`] = `
     align="center"
     mr={2}
   >
-    <React.Fragment>
-      <GroupExtraIcon
-        className="icon icon-clock"
-      />
-      <TimeSince
-        date="2017-07-25T22:56:12Z"
-        suffix="ago"
-      />
-    </React.Fragment>
+    <GroupExtraIcon
+      className="icon icon-clock"
+    />
+    <TimeSince
+      date="2017-07-25T22:56:12Z"
+      suffix="ago"
+    />
     <span
       className="hidden-xs hidden-sm"
     >
@@ -116,15 +114,13 @@ exports[`EventOrGroupExtraDetails renders all details 1`] = `
     align="center"
     mr={2}
   >
-    <React.Fragment>
-      <GroupExtraIcon
-        className="icon icon-clock"
-      />
-      <TimeSince
-        date="2017-07-25T22:56:12Z"
-        suffix="ago"
-      />
-    </React.Fragment>
+    <GroupExtraIcon
+      className="icon icon-clock"
+    />
+    <TimeSince
+      date="2017-07-25T22:56:12Z"
+      suffix="ago"
+    />
     <span
       className="hidden-xs hidden-sm"
     >
@@ -213,15 +209,13 @@ exports[`EventOrGroupExtraDetails renders assignee and status 1`] = `
     align="center"
     mr={2}
   >
-    <React.Fragment>
-      <GroupExtraIcon
-        className="icon icon-clock"
-      />
-      <TimeSince
-        date="2017-07-25T22:56:12Z"
-        suffix="ago"
-      />
-    </React.Fragment>
+    <GroupExtraIcon
+      className="icon icon-clock"
+    />
+    <TimeSince
+      date="2017-07-25T22:56:12Z"
+      suffix="ago"
+    />
     <span
       className="hidden-xs hidden-sm"
     >
@@ -319,15 +313,13 @@ exports[`EventOrGroupExtraDetails renders last and first seen 1`] = `
     align="center"
     mr={2}
   >
-    <React.Fragment>
-      <GroupExtraIcon
-        className="icon icon-clock"
-      />
-      <TimeSince
-        date="2017-07-25T22:56:12Z"
-        suffix="ago"
-      />
-    </React.Fragment>
+    <GroupExtraIcon
+      className="icon icon-clock"
+    />
+    <TimeSince
+      date="2017-07-25T22:56:12Z"
+      suffix="ago"
+    />
     <span
       className="hidden-xs hidden-sm"
     >
@@ -369,15 +361,13 @@ exports[`EventOrGroupExtraDetails renders only last seen 1`] = `
     align="center"
     mr={2}
   >
-    <React.Fragment>
-      <GroupExtraIcon
-        className="icon icon-clock"
-      />
-      <TimeSince
-        date="2017-07-25T22:56:12Z"
-        suffix="ago"
-      />
-    </React.Fragment>
+    <GroupExtraIcon
+      className="icon icon-clock"
+    />
+    <TimeSince
+      date="2017-07-25T22:56:12Z"
+      suffix="ago"
+    />
   </Flex>
   <GroupExtraCommentsAndLogger />
 </GroupExtra>

+ 2 - 2
tests/js/spec/components/__snapshots__/settingsLayout.spec.jsx.snap

@@ -1,7 +1,7 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`SettingsLayout renders 1`] = `
-<React.Fragment>
+<Fragment>
   <SettingsHeader>
     <SettingsSubheader>
       <Container>
@@ -33,5 +33,5 @@ exports[`SettingsLayout renders 1`] = `
     </Container>
   </ContentContainerWrapper>
   <Footer />
-</React.Fragment>
+</Fragment>
 `;

+ 86 - 90
tests/js/spec/components/forms/__snapshots__/radioBooleanField.spec.jsx.snap

@@ -10,54 +10,52 @@ exports[`RadioBooleanField render() renders with form context 1`] = `
     <div
       className="control-group radio-boolean"
     >
-      <React.Fragment>
-        <div
-          className="radio"
-          key="yes"
-        >
-          <label
-            style={
-              Object {
-                "fontWeight": "normal",
-              }
+      <div
+        className="radio"
+        key="yes"
+      >
+        <label
+          style={
+            Object {
+              "fontWeight": "normal",
             }
-          >
-            <input
-              checked={true}
-              disabled={false}
-              name="fieldName"
-              onChange={[Function]}
-              type="radio"
-              value="true"
-            />
-             
-            Yes
-          </label>
-        </div>
-        <div
-          className="radio"
-          key="no"
+          }
         >
-          <label
-            style={
-              Object {
-                "fontWeight": "normal",
-              }
+          <input
+            checked={true}
+            disabled={false}
+            name="fieldName"
+            onChange={[Function]}
+            type="radio"
+            value="true"
+          />
+           
+          Yes
+        </label>
+      </div>
+      <div
+        className="radio"
+        key="no"
+      >
+        <label
+          style={
+            Object {
+              "fontWeight": "normal",
             }
-          >
-            <input
-              checked={false}
-              disabled={false}
-              name="fieldName"
-              onChange={[Function]}
-              type="radio"
-              value="false"
-            />
-             
-            No
-          </label>
-        </div>
-      </React.Fragment>
+          }
+        >
+          <input
+            checked={false}
+            disabled={false}
+            name="fieldName"
+            onChange={[Function]}
+            type="radio"
+            value="false"
+          />
+           
+          No
+        </label>
+      </div>
     </div>
   </div>
 </div>
@@ -73,54 +71,52 @@ exports[`RadioBooleanField render() renders without form context 1`] = `
     <div
       className="control-group radio-boolean"
     >
-      <React.Fragment>
-        <div
-          className="radio"
-          key="yes"
-        >
-          <label
-            style={
-              Object {
-                "fontWeight": "normal",
-              }
+      <div
+        className="radio"
+        key="yes"
+      >
+        <label
+          style={
+            Object {
+              "fontWeight": "normal",
             }
-          >
-            <input
-              checked={false}
-              disabled={false}
-              name="fieldName"
-              onChange={[Function]}
-              type="radio"
-              value="true"
-            />
-             
-            Yes
-          </label>
-        </div>
-        <div
-          className="radio"
-          key="no"
+          }
         >
-          <label
-            style={
-              Object {
-                "fontWeight": "normal",
-              }
+          <input
+            checked={false}
+            disabled={false}
+            name="fieldName"
+            onChange={[Function]}
+            type="radio"
+            value="true"
+          />
+           
+          Yes
+        </label>
+      </div>
+      <div
+        className="radio"
+        key="no"
+      >
+        <label
+          style={
+            Object {
+              "fontWeight": "normal",
             }
-          >
-            <input
-              checked={false}
-              disabled={false}
-              name="fieldName"
-              onChange={[Function]}
-              type="radio"
-              value="false"
-            />
-             
-            No
-          </label>
-        </div>
-      </React.Fragment>
+          }
+        >
+          <input
+            checked={false}
+            disabled={false}
+            name="fieldName"
+            onChange={[Function]}
+            type="radio"
+            value="false"
+          />
+           
+          No
+        </label>
+      </div>
     </div>
   </div>
 </div>

+ 2 - 2
tests/js/spec/components/modals/__snapshots__/integrationDetailsModal.spec.jsx.snap

@@ -1,7 +1,7 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`IntegrationDetailsModal renders simple integration 1`] = `
-<React.Fragment>
+<Fragment>
   <Flex
     align="center"
     mb={2}
@@ -119,5 +119,5 @@ exports[`IntegrationDetailsModal renders simple integration 1`] = `
       size="small"
     />
   </div>
-</React.Fragment>
+</Fragment>
 `;

+ 181 - 183
tests/js/spec/views/__snapshots__/projectAlertSettings.spec.jsx.snap

@@ -4,196 +4,194 @@ exports[`ProjectAlertSettings render() renders 1`] = `
 <SideEffect(DocumentTitle)
   title="Project Alert Settings - Sentry"
 >
-  <React.Fragment>
-    <SettingsPageHeading
-      action={
-        <Tooltip
-          disabled={true}
-          title="You do not have permission to edit alert rules."
+  <SettingsPageHeading
+    action={
+      <Tooltip
+        disabled={true}
+        title="You do not have permission to edit alert rules."
+      >
+        <Button
+          disabled={false}
+          icon="icon-circle-add"
+          priority="primary"
+          size="small"
+          to="rules/new/"
         >
-          <Button
-            disabled={false}
-            icon="icon-circle-add"
-            priority="primary"
-            size="small"
-            to="rules/new/"
-          >
-            New Alert Rule
-          </Button>
-        </Tooltip>
-      }
-      tabs={
-        <ul
-          className="nav nav-tabs"
-          style={
-            Object {
-              "borderBottom": "1px solid #ddd",
-            }
+          New Alert Rule
+        </Button>
+      </Tooltip>
+    }
+    tabs={
+      <ul
+        className="nav nav-tabs"
+        style={
+          Object {
+            "borderBottom": "1px solid #ddd",
           }
-        >
-          <ListLink
-            activeClassName="active"
-            index={true}
-            to=""
-          >
-            Settings
-          </ListLink>
-          <ListLink
-            activeClassName="active"
-            index={false}
-            to="rules/"
-          >
-            Rules
-          </ListLink>
-        </ul>
-      }
-      title="Alerts"
-    />
-    <AlertLink
-      icon="icon-mail"
-      priority="warning"
-      to="/settings/account/notifications/"
-    >
-      Looking to fine-tune your personal notification preferences? Visit your Account Settings
-    </AlertLink>
-    <Form
-      allowUndo={true}
-      apiEndpoint="/projects/org-slug/project-slug/"
-      apiMethod="PUT"
-      cancelLabel="Cancel"
-      className="form-stacked"
-      footerClass="form-actions align-right"
-      initialData={
-        Object {
-          "digestsMaxDelay": 60,
-          "digestsMinDelay": 5,
-          "subjectTemplate": "[$project] \${tag:level}: $title",
         }
+      >
+        <ListLink
+          activeClassName="active"
+          index={true}
+          to=""
+        >
+          Settings
+        </ListLink>
+        <ListLink
+          activeClassName="active"
+          index={false}
+          to="rules/"
+        >
+          Rules
+        </ListLink>
+      </ul>
+    }
+    title="Alerts"
+  />
+  <AlertLink
+    icon="icon-mail"
+    priority="warning"
+    to="/settings/account/notifications/"
+  >
+    Looking to fine-tune your personal notification preferences? Visit your Account Settings
+  </AlertLink>
+  <Form
+    allowUndo={true}
+    apiEndpoint="/projects/org-slug/project-slug/"
+    apiMethod="PUT"
+    cancelLabel="Cancel"
+    className="form-stacked"
+    footerClass="form-actions align-right"
+    initialData={
+      Object {
+        "digestsMaxDelay": 60,
+        "digestsMinDelay": 5,
+        "subjectTemplate": "[$project] \${tag:level}: $title",
       }
-      onSubmitError={[Function]}
-      onSubmitSuccess={[Function]}
-      requireChanges={false}
-      saveOnBlur={true}
-      submitDisabled={false}
-      submitLabel="Save Changes"
-      submitPriority="primary"
-    >
-      <JsonForm
-        additionalFieldProps={Object {}}
-        fields={
-          Array [
-            Object {
-              "help": "The email subject to use (excluding the prefix) for individual alerts. Usable variables include: $title, $shortID, $projectID, $orgID, and \${tag:key}, such as \${tag:environment} or \${tag:release}.",
-              "label": "Subject Template",
-              "name": "subjectTemplate",
-              "placeholder": "e.g. $shortID - $title",
-              "type": "string",
-            },
-          ]
-        }
-        title="Email Settings"
-      />
-      <JsonForm
-        additionalFieldProps={Object {}}
-        fields={
-          Array [
-            Object {
-              "defaultValue": 300,
-              "formatLabel": [Function],
-              "help": "Notifications will be delivered at most this often.",
-              "label": "Minimum delivery interval",
-              "max": 3600,
-              "min": 60,
-              "name": "digestsMinDelay",
-              "step": 60,
-              "type": "range",
-            },
-            Object {
-              "defaultValue": 300,
-              "formatLabel": [Function],
-              "help": "Notifications will be delivered at least this often.",
-              "label": "Maximum delivery interval",
-              "max": 3600,
-              "min": 60,
-              "name": "digestsMaxDelay",
-              "step": 60,
-              "type": "range",
-            },
-          ]
-        }
-        renderHeader={[Function]}
-        title="Digests"
-      />
-    </Form>
-    <PluginList
-      onDisablePlugin={[Function]}
-      onEnablePlugin={[Function]}
-      organization={
-        Object {
-          "access": Array [
-            "org:read",
-            "org:write",
-            "org:admin",
-            "project:read",
-            "project:write",
-            "project:admin",
-            "team:read",
-            "team:write",
-            "team:admin",
-          ],
-          "features": Array [],
-          "id": "3",
-          "name": "Organization Name",
-          "onboardingTasks": Array [],
-          "projects": Array [],
-          "scrapeJavaScript": true,
-          "slug": "org-slug",
-          "status": Object {
-            "id": "active",
-            "name": "active",
+    }
+    onSubmitError={[Function]}
+    onSubmitSuccess={[Function]}
+    requireChanges={false}
+    saveOnBlur={true}
+    submitDisabled={false}
+    submitLabel="Save Changes"
+    submitPriority="primary"
+  >
+    <JsonForm
+      additionalFieldProps={Object {}}
+      fields={
+        Array [
+          Object {
+            "help": "The email subject to use (excluding the prefix) for individual alerts. Usable variables include: $title, $shortID, $projectID, $orgID, and \${tag:key}, such as \${tag:environment} or \${tag:release}.",
+            "label": "Subject Template",
+            "name": "subjectTemplate",
+            "placeholder": "e.g. $shortID - $title",
+            "type": "string",
           },
-          "teams": Array [],
-        }
+        ]
       }
-      pluginList={Array []}
-      project={
-        Object {
-          "allowedDomains": Array [
-            "example.com",
-            "https://example.com",
-          ],
-          "dataScrubber": false,
-          "dataScrubberDefaults": false,
-          "digestsMaxDelay": 60,
-          "digestsMinDelay": 5,
-          "features": Array [],
-          "hasAccess": true,
-          "id": "2",
-          "isBookmarked": false,
-          "isMember": true,
-          "name": "Project Name",
-          "resolveAge": 48,
-          "safeFields": Array [
-            "business-email",
-            "company",
-          ],
-          "scrapeJavaScript": true,
-          "scrubIPAddresses": false,
-          "securityToken": "security-token",
-          "securityTokenHeader": "x-security-header",
-          "sensitiveFields": Array [
-            "creditcard",
-            "ssn",
-          ],
-          "slug": "project-slug",
-          "storeCrashReports": false,
-          "subjectPrefix": "[my-org]",
-          "subjectTemplate": "[$project] \${tag:level}: $title",
-          "teams": Array [],
-          "verifySSL": true,
-        }
+      title="Email Settings"
+    />
+    <JsonForm
+      additionalFieldProps={Object {}}
+      fields={
+        Array [
+          Object {
+            "defaultValue": 300,
+            "formatLabel": [Function],
+            "help": "Notifications will be delivered at most this often.",
+            "label": "Minimum delivery interval",
+            "max": 3600,
+            "min": 60,
+            "name": "digestsMinDelay",
+            "step": 60,
+            "type": "range",
+          },
+          Object {
+            "defaultValue": 300,
+            "formatLabel": [Function],
+            "help": "Notifications will be delivered at least this often.",
+            "label": "Maximum delivery interval",
+            "max": 3600,
+            "min": 60,
+            "name": "digestsMaxDelay",
+            "step": 60,
+            "type": "range",
+          },
+        ]
       }
+      renderHeader={[Function]}
+      title="Digests"
     />
-  </React.Fragment>
+  </Form>
+  <PluginList
+    onDisablePlugin={[Function]}
+    onEnablePlugin={[Function]}
+    organization={
+      Object {
+        "access": Array [
+          "org:read",
+          "org:write",
+          "org:admin",
+          "project:read",
+          "project:write",
+          "project:admin",
+          "team:read",
+          "team:write",
+          "team:admin",
+        ],
+        "features": Array [],
+        "id": "3",
+        "name": "Organization Name",
+        "onboardingTasks": Array [],
+        "projects": Array [],
+        "scrapeJavaScript": true,
+        "slug": "org-slug",
+        "status": Object {
+          "id": "active",
+          "name": "active",
+        },
+        "teams": Array [],
+      }
+    }
+    pluginList={Array []}
+    project={
+      Object {
+        "allowedDomains": Array [
+          "example.com",
+          "https://example.com",
+        ],
+        "dataScrubber": false,
+        "dataScrubberDefaults": false,
+        "digestsMaxDelay": 60,
+        "digestsMinDelay": 5,
+        "features": Array [],
+        "hasAccess": true,
+        "id": "2",
+        "isBookmarked": false,
+        "isMember": true,
+        "name": "Project Name",
+        "resolveAge": 48,
+        "safeFields": Array [
+          "business-email",
+          "company",
+        ],
+        "scrapeJavaScript": true,
+        "scrubIPAddresses": false,
+        "securityToken": "security-token",
+        "securityTokenHeader": "x-security-header",
+        "sensitiveFields": Array [
+          "creditcard",
+          "ssn",
+        ],
+        "slug": "project-slug",
+        "storeCrashReports": false,
+        "subjectPrefix": "[my-org]",
+        "subjectTemplate": "[$project] \${tag:level}: $title",
+        "teams": Array [],
+        "verifySSL": true,
+      }
+    }
+  />
 </SideEffect(DocumentTitle)>
 `;

+ 3 - 1
tests/js/spec/views/__snapshots__/projectTeams.spec.jsx.snap

@@ -62,7 +62,9 @@ exports[`ProjectTeams renders 1`] = `
               </StyledTeamsLabel>
             }
             onSelect={[Function]}
-          />
+          >
+            <Component />
+          </DropdownAutoComplete>
         </div>
       </PanelHeader>
       <PanelBody

+ 3 - 1
tests/js/spec/views/__snapshots__/teamMembers.spec.jsx.snap

@@ -33,7 +33,9 @@ exports[`TeamMembers renders 1`] = `
         onChange={[Function]}
         onClose={[Function]}
         onSelect={[Function]}
-      />
+      >
+        <Component />
+      </DropdownAutoComplete>
     </div>
   </PanelHeader>
   <StyledMemberContainer

+ 3 - 1
tests/js/spec/views/projectPlugins/__snapshots__/projectPlugins.spec.jsx.snap

@@ -24,7 +24,9 @@ exports[`ProjectPlugins renders 1`] = `
             "org:integrations",
           ]
         }
-      />
+      >
+        <Component />
+      </FeatureContainer>
     </PanelAlert>
     <PanelItem
       key="amazon-sqs"

Some files were not shown because too many files changed in this diff