nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: DevExpress/devextreme-react
Pull request #239 (2018-11-07 15:52:21)

Fix widget appearance if Template component is used and nested templates are set


Patch:
diff --git a/src/core/component.ts b/src/core/component.ts
index f0c2df5..99a1cf3 100644
--- a/src/core/component.ts
+++ b/src/core/component.ts
@@ -180,9 +180,14 @@ abstract class ComponentBase<P extends IHtmlOptions> extends React.PureComponent
       propsGetter: (prop) => this.props[prop]
     });
 
-    const integrationOptions = Object.keys(templateOptions.templates).length ? {
+    const templates = {
+      ...rawProps.integrationOptions && rawProps.integrationOptions.templates,
+      ...templateOptions.templates
+    };
+
+    const integrationOptions = Object.keys(templates).length ? {
       integrationOptions: {
-        templates: templateOptions.templates
+        templates
       },
       ...templateOptions.templateStubs
     } : undefined;


Test patch:
diff --git a/src/core/__tests__/template.test.tsx b/src/core/__tests__/template.test.tsx
index bf409e1..f678d95 100644
--- a/src/core/__tests__/template.test.tsx
+++ b/src/core/__tests__/template.test.tsx
@@ -347,6 +347,29 @@ describe("component/render in nested options", () => {
         expect(typeof integrationOptions.templates.optionitem.render).toBe("function");
     });
 
+    it("pass integrationOptions to widget with Template component", () => {
+        const ItemTemplate = () => <div>Template</div>;
+        mount(
+            <ComponentWithTemplates itemComponent={ItemTemplate}>
+                <NestedComponent itemComponent={ItemTemplate} />
+                <Template name={"nested"} render={ItemTemplate} />
+            </ComponentWithTemplates >
+        );
+
+        const options = WidgetClass.mock.calls[0][1];
+
+        const integrationOptions = options.integrationOptions;
+
+        expect(integrationOptions.templates.nested).toBeDefined();
+        expect(typeof integrationOptions.templates.nested.render).toBe("function");
+
+        expect(integrationOptions.templates.item).toBeDefined();
+        expect(typeof integrationOptions.templates.item.render).toBe("function");
+
+        expect(integrationOptions.templates.optionitem).toBeDefined();
+        expect(typeof integrationOptions.templates.optionitem.render).toBe("function");
+    });
+
     it("pass integrationOptions options to widget with several templates", () => {
         const UserTemplate = () => <div>Template</div>;
         mount(
Repository: DevExpress/devextreme-react
Pull request #240 (2018-11-07 15:54:11)

Fix widget appearance if Template component is used and nested templates are set


Patch:
diff --git a/src/core/component.ts b/src/core/component.ts
index f0c2df5..99a1cf3 100644
--- a/src/core/component.ts
+++ b/src/core/component.ts
@@ -180,9 +180,14 @@ abstract class ComponentBase<P extends IHtmlOptions> extends React.PureComponent
       propsGetter: (prop) => this.props[prop]
     });
 
-    const integrationOptions = Object.keys(templateOptions.templates).length ? {
+    const templates = {
+      ...rawProps.integrationOptions && rawProps.integrationOptions.templates,
+      ...templateOptions.templates
+    };
+
+    const integrationOptions = Object.keys(templates).length ? {
       integrationOptions: {
-        templates: templateOptions.templates
+        templates
       },
       ...templateOptions.templateStubs
     } : undefined;


Test patch:
diff --git a/src/core/__tests__/template.test.tsx b/src/core/__tests__/template.test.tsx
index bf409e1..f678d95 100644
--- a/src/core/__tests__/template.test.tsx
+++ b/src/core/__tests__/template.test.tsx
@@ -347,6 +347,29 @@ describe("component/render in nested options", () => {
         expect(typeof integrationOptions.templates.optionitem.render).toBe("function");
     });
 
+    it("pass integrationOptions to widget with Template component", () => {
+        const ItemTemplate = () => <div>Template</div>;
+        mount(
+            <ComponentWithTemplates itemComponent={ItemTemplate}>
+                <NestedComponent itemComponent={ItemTemplate} />
+                <Template name={"nested"} render={ItemTemplate} />
+            </ComponentWithTemplates >
+        );
+
+        const options = WidgetClass.mock.calls[0][1];
+
+        const integrationOptions = options.integrationOptions;
+
+        expect(integrationOptions.templates.nested).toBeDefined();
+        expect(typeof integrationOptions.templates.nested.render).toBe("function");
+
+        expect(integrationOptions.templates.item).toBeDefined();
+        expect(typeof integrationOptions.templates.item.render).toBe("function");
+
+        expect(integrationOptions.templates.optionitem).toBeDefined();
+        expect(typeof integrationOptions.templates.optionitem.render).toBe("function");
+    });
+
     it("pass integrationOptions options to widget with several templates", () => {
         const UserTemplate = () => <div>Template</div>;
         mount(
Repository: DevExpress/devextreme-react
Pull request #270 (2018-12-27 11:22:40)

Clear all guard timeouts (T700669)


Patch:
diff --git a/src/core/component-base.ts b/src/core/component-base.ts
index 6327f6d..1b3aeff 100644
--- a/src/core/component-base.ts
+++ b/src/core/component-base.ts
@@ -74,6 +74,7 @@ abstract class ComponentBase<P extends IHtmlOptions> extends React.PureComponent
       events.triggerHandler(this._element, DX_REMOVE_EVENT);
       this._instance.dispose();
     }
+    this._optionsManager.dispose();
   }
 
   protected _prepareChildren(args: any[] = []): any[] {
diff --git a/src/core/options-manager.ts b/src/core/options-manager.ts
index d098fd1..eb97e90 100644
--- a/src/core/options-manager.ts
+++ b/src/core/options-manager.ts
@@ -153,6 +153,13 @@ class OptionsManager {
         return this._registerNestedOption(component, expectedChildren, this._nestedOptions);
     }
 
+    public dispose() {
+        for (const optionName of Object.keys(this._guards)) {
+            window.clearTimeout(this._guards[optionName]);
+            delete this._guards[optionName];
+        }
+    }
+
     private _setOption(name: string, value: any): void {
         let actualValue = value;
         if (isEventHanlder(name, value)) {


Test patch:
diff --git a/src/core/__tests__/component.test.tsx b/src/core/__tests__/component.test.tsx
index 4f8c1e1..07f724d 100644
--- a/src/core/__tests__/component.test.tsx
+++ b/src/core/__tests__/component.test.tsx
@@ -1,7 +1,7 @@
 import * as events from "devextreme/events";
 
 import { mount, React, shallow } from "./setup";
-import { TestComponent, Widget, WidgetClass } from "./test-component";
+import { fireOptionChange, TestComponent, Widget, WidgetClass } from "./test-component";
 
 describe("rendering", () => {
 
@@ -161,4 +161,16 @@ describe("disposing", () => {
         expect(handleDxRemove).toHaveBeenCalledTimes(1);
     });
 
+    it("remove option guards", () => {
+        const component = shallow(
+            <TestComponent option1={true} />
+        );
+
+        fireOptionChange("option1", false);
+        component.unmount();
+        jest.runAllTimers();
+
+        expect(Widget.option.mock.calls.length).toBe(0);
+    });
+
 });
Repository: DevExpress/devextreme-react
Pull request #271 (2018-12-27 11:32:05)

Clear all guard timeouts (T700669) (#270)


Patch:
diff --git a/src/core/component-base.ts b/src/core/component-base.ts
index 6327f6d..1b3aeff 100644
--- a/src/core/component-base.ts
+++ b/src/core/component-base.ts
@@ -74,6 +74,7 @@ abstract class ComponentBase<P extends IHtmlOptions> extends React.PureComponent
       events.triggerHandler(this._element, DX_REMOVE_EVENT);
       this._instance.dispose();
     }
+    this._optionsManager.dispose();
   }
 
   protected _prepareChildren(args: any[] = []): any[] {
diff --git a/src/core/options-manager.ts b/src/core/options-manager.ts
index d098fd1..eb97e90 100644
--- a/src/core/options-manager.ts
+++ b/src/core/options-manager.ts
@@ -153,6 +153,13 @@ class OptionsManager {
         return this._registerNestedOption(component, expectedChildren, this._nestedOptions);
     }
 
+    public dispose() {
+        for (const optionName of Object.keys(this._guards)) {
+            window.clearTimeout(this._guards[optionName]);
+            delete this._guards[optionName];
+        }
+    }
+
     private _setOption(name: string, value: any): void {
         let actualValue = value;
         if (isEventHanlder(name, value)) {


Test patch:
diff --git a/src/core/__tests__/component.test.tsx b/src/core/__tests__/component.test.tsx
index 4f8c1e1..07f724d 100644
--- a/src/core/__tests__/component.test.tsx
+++ b/src/core/__tests__/component.test.tsx
@@ -1,7 +1,7 @@
 import * as events from "devextreme/events";
 
 import { mount, React, shallow } from "./setup";
-import { TestComponent, Widget, WidgetClass } from "./test-component";
+import { fireOptionChange, TestComponent, Widget, WidgetClass } from "./test-component";
 
 describe("rendering", () => {
 
@@ -161,4 +161,16 @@ describe("disposing", () => {
         expect(handleDxRemove).toHaveBeenCalledTimes(1);
     });
 
+    it("remove option guards", () => {
+        const component = shallow(
+            <TestComponent option1={true} />
+        );
+
+        fireOptionChange("option1", false);
+        component.unmount();
+        jest.runAllTimers();
+
+        expect(Widget.option.mock.calls.length).toBe(0);
+    });
+
 });
Repository: DevExpress/devextreme-react
Pull request #276 (2018-12-28 11:41:12)

Remove setTimeout from template rendering (#274)


Patch:
diff --git a/src/core/component-base.ts b/src/core/component-base.ts
index 53d52c5..3800af0 100644
--- a/src/core/component-base.ts
+++ b/src/core/component-base.ts
@@ -1,4 +1,7 @@
 import * as events from "devextreme/events";
+
+import * as commonUtils from "devextreme/core/utils/common";
+
 import * as React from "react";
 
 import OptionsManager, { INestedOption } from "./options-manager";
@@ -34,7 +37,7 @@ abstract class ComponentBase<P extends IHtmlOptions> extends React.PureComponent
   protected readonly _expectedChildren: Record<string, INestedOption>;
 
   private _templateCallbacks: any[] = [];
-  private _templateTimeout: any;
+  private _isTemplatePostponed: boolean = false;
 
   private readonly _templateHost: TemplateHost;
   private readonly _optionsManager: OptionsManager;
@@ -132,9 +135,10 @@ abstract class ComponentBase<P extends IHtmlOptions> extends React.PureComponent
   private _updateTemplatesState(callback: any) {
     this._templateCallbacks.push(callback);
 
-    if (this._templateTimeout) { return; }
+    if (this._isTemplatePostponed) { return; }
 
-    this._templateTimeout = setTimeout(() => {
+    this._isTemplatePostponed = true;
+    commonUtils.deferUpdate(() => {
       this.setState((state: IState) => {
         const templates = { ...state.templates };
         for (const cb of this._templateCallbacks) {
@@ -148,10 +152,7 @@ abstract class ComponentBase<P extends IHtmlOptions> extends React.PureComponent
 
   private _clearTemplates() {
     this._templateCallbacks.length = 0;
-    if (this._templateTimeout) {
-      clearTimeout(this._templateTimeout);
-      this._templateTimeout = undefined;
-    }
+    this._isTemplatePostponed = false;
   }
 
   private _getElementProps(): Record<string, any> {


Test patch:
diff --git a/src/core/__tests__/template.test.tsx b/src/core/__tests__/template.test.tsx
index ebb1045..cdaea21 100644
--- a/src/core/__tests__/template.test.tsx
+++ b/src/core/__tests__/template.test.tsx
@@ -24,11 +24,10 @@ function renderTemplate(name: string, model?: any, container?: any, onRendered?:
     model = model || {};
     container = container || document.createElement("div");
     const render = WidgetClass.mock.calls[0][1].integrationOptions.templates[name].render;
-    const result = render({
+
+    return render({
         container, model, onRendered
     });
-    jest.runAllTimers();
-    return result;
 }
 
 function renderItemTemplate(model?: any, container?: any, onRendered?: () => void): Element {
@@ -219,7 +218,6 @@ function testTemplateOption(testedOption: string) {
         parentElement.removeChild(removeListener);
         parentElement.removeChild(templateContent);
         events.triggerHandler(removeListener, "dxremove");
-        jest.runAllTimers();
         component.update();
         expect(Object.getOwnPropertyNames(component.state("templates")).length).toBe(0);
     });
Repository: react-materialize/react-materialize
Pull request #543 (2018-05-06 16:07:42)

Adding Icon dependency to chip component
# How Has This Been Tested?

Running `yarn test`

# Checklist:

- [x] I have commented my code, particularly in hard-to-understand areas
- [x] My changes generate no new warnings
- [x] I have not generated a new package version. (the maintainers will handle that)



Patch:
diff --git a/src/Chip.js b/src/Chip.js
index c4d0e3c..7232858 100644
--- a/src/Chip.js
+++ b/src/Chip.js
@@ -1,15 +1,14 @@
 import React from 'react';
 import PropTypes from 'prop-types';
 import cx from 'classnames';
+import Icon from './Icon';
 
-const Chip = ({ children, close, className, ...props }) => {
-  return (
-    <div className={cx('chip', className)} {...props}>
-      {children}
-      {close ? <i className="close material-icons">close</i> : null}
-    </div>
-  );
-};
+const Chip = ({ children, close, className, ...props }) => (
+  <div className={cx('chip', className)} {...props}>
+    {children}
+    {close && <Icon>close</Icon>}
+  </div>
+);
 
 Chip.propTypes = {
   className: PropTypes.string,


Test patch:
diff --git a/test/Chip.spec.js b/test/Chip.spec.js
index dd6e1aa..92773b7 100644
--- a/test/Chip.spec.js
+++ b/test/Chip.spec.js
@@ -12,7 +12,7 @@ describe('<Chip />', () => {
 
   test('accepts a close prop', () => {
     wrapper = shallow(<Chip close />);
-    expect(wrapper.find('i.material-icons.close')).toHaveLength(1);
+    expect(wrapper.find('Icon')).toHaveLength(1);
   });
 
   test('accepts children', () => {
diff --git a/test/__snapshots__/Chip.spec.js.snap b/test/__snapshots__/Chip.spec.js.snap
index 650fd54..bf1b804 100644
--- a/test/__snapshots__/Chip.spec.js.snap
+++ b/test/__snapshots__/Chip.spec.js.snap
@@ -9,11 +9,9 @@ exports[`<Chip /> accepts children 1`] = `
   >
     Child
   </p>
-  <i
-    className="close material-icons"
-  >
+  <Icon>
     close
-  </i>
+  </Icon>
 </div>
 `;
Repository: react-materialize/react-materialize
Pull request #564 (2018-06-27 10:01:37)

Fixes non-flashing Preloader #563
Color variable was not defined in function scope

# Description

Please include a summary of the change and which issue is fixed/what was added. Please also include relevant motivation and context.

## Type of change

Please delete options that are not relevant.

- [x] Bug fix (non-breaking change which fixes an issue)

# How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Jest test

# Checklist:

- [x] My changes generate no new warnings
- [x] I have not generated a new package version. (the maintainers will handle that)



Patch:
diff --git a/src/Preloader.js b/src/Preloader.js
index 4257956..82193d2 100644
--- a/src/Preloader.js
+++ b/src/Preloader.js
@@ -7,7 +7,7 @@ let colors = ['blue', 'red', 'yellow', 'green'];
 
 class Preloader extends Component {
   render() {
-    const { active, size, flashing, className } = this.props;
+    const { active, size, color, flashing, className } = this.props;
 
     let classes = cx('preloader-wrapper', { active: active, size: size });
 


Test patch:
diff --git a/test/Preloader.spec.js b/test/Preloader.spec.js
index 9fda36c..fa0b686 100644
--- a/test/Preloader.spec.js
+++ b/test/Preloader.spec.js
@@ -16,4 +16,10 @@ describe('<Preloader />', () => {
 
     expect(wrapper).toMatchSnapshot();
   });
+
+  test('should render a Preloader with default properties', () => {
+    const wrapper = shallow(<Preloader />);
+
+    expect(wrapper).toMatchSnapshot();
+  });
 });
diff --git a/test/__snapshots__/Preloader.spec.js.snap b/test/__snapshots__/Preloader.spec.js.snap
index 38f5a54..1f24e1f 100644
--- a/test/__snapshots__/Preloader.spec.js.snap
+++ b/test/__snapshots__/Preloader.spec.js.snap
@@ -26,3 +26,14 @@ exports[`<Preloader /> should render a Preloader 1`] = `
   />
 </div>
 `;
+
+exports[`<Preloader /> should render a Preloader with default properties 1`] = `
+<div
+  className="preloader-wrapper active"
+>
+  <Spinner
+    color="blue"
+    only={true}
+  />
+</div>
+`;
Repository: react-materialize/react-materialize
Pull request #720 (2018-12-14 16:37:44)

Collapsible fix
As per https://materializecss.com/collapsible.html, accordion effect should be on by default


Patch:
diff --git a/src/Collapsible.js b/src/Collapsible.js
index 05db7ad..e5725b7 100644
--- a/src/Collapsible.js
+++ b/src/Collapsible.js
@@ -109,7 +109,7 @@ Collapsible.propTypes = {
 };
 
 Collapsible.defaultProps = {
-  accordion: false
+  accordion: true
 };
 
 export default Collapsible;


Test patch:
diff --git a/test/__snapshots__/Collapsible.spec.js.snap b/test/__snapshots__/Collapsible.spec.js.snap
index d61a68b..b96eff5 100644
--- a/test/__snapshots__/Collapsible.spec.js.snap
+++ b/test/__snapshots__/Collapsible.spec.js.snap
@@ -125,7 +125,7 @@ exports[`<Collapsible /> defaultActiveKey 2`] = `
 exports[`<Collapsible /> renders 1`] = `
 <ul
   className="collapsible"
-  data-collapsible="expandable"
+  data-collapsible="accordion"
 />
 `;
 
@@ -402,11 +402,11 @@ exports[`<Collapsible /> with accordion 1`] = `
 
 exports[`<Collapsible /> with expanded prop 1`] = `
 <Collapsible
-  accordion={false}
+  accordion={true}
 >
   <ul
     className="collapsible"
-    data-collapsible="expandable"
+    data-collapsible="accordion"
   >
     <CollapsibleItem
       eventKey={0}
@@ -463,7 +463,7 @@ exports[`<Collapsible /> with expanded prop 1`] = `
 exports[`<Collapsible /> with invalid elements 1`] = `
 <ul
   className="collapsible"
-  data-collapsible="expandable"
+  data-collapsible="accordion"
 >
   <CollapsibleItem
     eventKey={1}
Repository: react-materialize/react-materialize
Pull request #741 (2019-01-04 12:32:00)

3.0.0-beta.0-Button-Fab-Styles
# Description

Summary: Change FAB button so it can receive custom styles in its declaration.
Motivation: Now we can customize FAB and change its position on screen (not only on bottom right)

## Type of change

- [x] New feature (non-breaking change which adds functionality)

# How Has This Been Tested?

- unit testing
- browser testing

# Checklist:

- [x] I have commented my code, particularly in hard-to-understand areas
- [x] My changes generate no new warnings
- [x] I have not generated a new package version. (the maintainers will handle that)



Patch:
diff --git a/src/Button.js b/src/Button.js
index 60a984a..d1274aa 100644
--- a/src/Button.js
+++ b/src/Button.js
@@ -88,13 +88,15 @@ class Button extends Component {
     }
   }
 
-  renderFab(className) {
+  renderFab(classes) {
+    const { fab, floating, large, className, ...other } = this.props;
     return (
       <div
+        {...other}
         ref={el => (this._floatingActionBtn = el)}
         className={cx('fixed-action-btn')}
       >
-        <a className={className}>{this.renderIcon()}</a>
+        <a className={classes}>{this.renderIcon()}</a>
         <ul>
           {React.Children.map(this.props.children, child => {
             return <li key={idgen()}>{child}</li>;


Test patch:
diff --git a/test/Button.spec.js b/test/Button.spec.js
index 5630ad8..b585e47 100644
--- a/test/Button.spec.js
+++ b/test/Button.spec.js
@@ -138,17 +138,8 @@ describe('Button', () => {
       toolbarEnabled: true
     };
     let wrapper;
-    const FabButton = (fabOptions = true) => (
-      <Button
-        floating
-        fab={fabOptions}
-        className="red"
-        large
-        style={{
-          bottom: '45px',
-          right: '24px'
-        }}
-      >
+    const FabButton = (fabOptions = true, style = {}) => (
+      <Button floating fab={fabOptions} className="red" large style={style}>
         <Button floating icon="insert_chart" className="red" />
         <Button floating icon="format_quote" className="yellow darken-1" />
         <Button floating icon="publish" className="green" />
@@ -177,5 +168,10 @@ describe('Button', () => {
       wrapper.unmount();
       expect(fabInstanceDestroyMock).toHaveBeenCalled();
     });
+    test('renders FloatingActionButton with passed styles', () => {
+      const style = { bottom: '45px', right: '24px' };
+      wrapper = shallow(FabButton(true, style));
+      expect(Object.keys(wrapper.props().style).length).toBeGreaterThan(0);
+    });
   });
 });
Repository: react-materialize/react-materialize
Pull request #783 (2019-03-24 11:38:37)

Fixes dropdown warning on destroy
Dropdown was not destroying properly, fixed


Patch:
diff --git a/src/Dropdown.js b/src/Dropdown.js
index 4cb65aa..40b026d 100644
--- a/src/Dropdown.js
+++ b/src/Dropdown.js
@@ -16,7 +16,7 @@ class Dropdown extends Component {
 
     if (typeof M !== undefined) {
       const selector = document.querySelectorAll(this._trigger);
-      this.instance = M.Dropdown.init(selector, options);
+      this.instance = M.Dropdown.init(selector, options)[0];
     }
   }
 


Test patch:
diff --git a/test/DropdownButton.spec.js b/test/DropdownButton.spec.js
index 60274a3..0db2491 100644
--- a/test/DropdownButton.spec.js
+++ b/test/DropdownButton.spec.js
@@ -43,7 +43,7 @@ describe('<Dropdown />', () => {
     const dropdownMock = {
       init: (el, options) => {
         dropdownInitMock(options);
-        return { destroy: dropdownInstanceDestroyMock };
+        return [{ destroy: dropdownInstanceDestroyMock }];
       }
     };
Repository: react-materialize/react-materialize
Pull request #806 (2019-04-02 23:45:36)

Fix textarea custom css classes
# Description

It was reported on issue #798 that Textarea component was losing its styles when custom classNames were passed to it. This pr fixes that behavior.

## Type of change

Please delete options that are not relevant.

- [x] Bug fix (non-breaking change which fixes an issue)

# How Has This Been Tested?

- unit testing
- browser testing

# Checklist:

- [x] I have commented my code, particularly in hard-to-understand areas
- [x] My changes generate no new warnings
- [x] I have not generated a new package version. (the maintainers will handle that)



Patch:
diff --git a/src/Textarea.js b/src/Textarea.js
index 5f67af5..e17dfab 100644
--- a/src/Textarea.js
+++ b/src/Textarea.js
@@ -18,6 +18,7 @@ class Textarea extends Component {
 
   render() {
     const {
+      className,
       s,
       m,
       l,
@@ -49,13 +50,13 @@ class Textarea extends Component {
       <div className={wrapperClasses}>
         {icon && this.renderIcon(icon, iconClassName)}
         <textarea
+          {...other}
           ref={input => {
             this._textarea = input;
           }}
           onChange={onChange}
           id={computedId}
-          className="materialize-textarea"
-          {...other}
+          className={cx('materialize-textarea', className)}
         />
         <label htmlFor={computedId}>{label}</label>
       </div>
@@ -114,7 +115,7 @@ Textarea.propTypes = {
   */
   value: PropTypes.string,
   /*
-  * predefined value
+  * textarea classname
   */
   className: PropTypes.string
 };


Test patch:
diff --git a/test/Textarea.spec.js b/test/Textarea.spec.js
index 045da9a..da5e18b 100644
--- a/test/Textarea.spec.js
+++ b/test/Textarea.spec.js
@@ -47,4 +47,11 @@ describe('<Textarea />', () => {
     wrapper = shallow(<Textarea icon="mode_edit" iconClassName="red" />);
     expect(wrapper).toMatchSnapshot();
   });
+
+  test('with custom className', () => {
+    wrapper = shallow(<Textarea className="custom-class" />);
+    const textareaElement = wrapper.find('textarea');
+    expect(textareaElement.hasClass('materialize-textarea')).toBeTruthy();
+    expect(textareaElement.hasClass('custom-class')).toBeTruthy();
+  });
 });