Merge branch 'main' into avm99963-monorail

Merged commit 4137ed7879acadbf891e8c471108acb874dae886.

GitOrigin-RevId: b6100ffc5b1da355a35f37b13fcaaf746ee8b307
diff --git a/static_src/react/tests/IssueWizardDescriptionUtils.test.tsx b/static_src/react/tests/IssueWizardDescriptionUtils.test.tsx
new file mode 100644
index 0000000..6e5edae
--- /dev/null
+++ b/static_src/react/tests/IssueWizardDescriptionUtils.test.tsx
@@ -0,0 +1,34 @@
+// Copyright 2021 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+import {assert, expect} from 'chai';
+import {expandDescriptions} from 'react/issue-wizard/IssueWizardDescriptionsUtils.tsx';
+
+describe('IssueWizardDescriptionsUtils', () => {
+  it('get expandDescription and labels', () => {
+    const {expandDescription, expandLabels} = expandDescriptions(
+      'Network / Downloading',
+      ['test url'],
+      false,
+      'test',
+      [],
+    )
+    assert.equal(expandLabels.length, 1);
+    expect(expandDescription).to.contain("test url");
+  });
+
+  it('get proper component value base on user answer', () => {
+    const {expandDescription, expandLabels, compVal} = expandDescriptions(
+      'Content',
+      ['test url', 'LABELS: Yes - this is'],
+      false,
+      'test',
+      [],
+    )
+    assert.equal(expandLabels.length, 1);
+    assert.equal(expandLabels[0].label, 'Type-Bug');
+    assert.equal(compVal, 'Blink');
+    expect(expandDescription).to.contain("test url");
+  });
+});