!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/wincloud_gateway/node_modules/@buffetjs/core/build/esm/components/Table/tests/   drwxr-xr-x
Free 13.34 GB of 57.97 GB (23.01%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     index.js (3.69 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
import React from 'react';
import { mount } from 'enzyme';
import { TableRowEmpty } from '@buffetjs/styles';
import TableRow from '../../TableRow';
import Table from '../index';
import ActionCollapse from '../ActionCollapse';
describe('<Table />', function () {
  // eslint-disable-next-line jest/expect-expect
  it('Should not crash', function () {
    mount( /*#__PURE__*/React.createElement(Table, null));
  });
  it('Should display the Empty row if there is no data', function () {
    var wrapper = mount( /*#__PURE__*/React.createElement(Table, null));
    expect(wrapper.find(TableRow)).toHaveLength(0);
    expect(wrapper.find(TableRowEmpty)).toHaveLength(1);
  });
  it('Should display a custom component if given', function () {
    var Custom = function Custom() {
      return /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null, "Test"));
    };

    var headers = [{
      value: 'test'
    }];
    var rows = [{
      test: 'test1',
      other: 'other'
    }];
    var wrapper = mount( /*#__PURE__*/React.createElement(Table, {
      customRow: Custom,
      rows: rows,
      headers: headers
    }));
    expect(wrapper.find(TableRow)).toHaveLength(0);
    expect(wrapper.find(TableRowEmpty)).toHaveLength(0);
    expect(wrapper.find(Custom)).toHaveLength(1);
  });
  it('Should display the ActionCollapse correctly without the rowLinks', function () {
    var headers = [{
      value: 'test'
    }];
    var rows = [{
      test: 'test1',
      other: 'other',
      _isChecked: true
    }];
    var wrapper = mount( /*#__PURE__*/React.createElement(Table, {
      rows: rows,
      headers: headers,
      withBulkAction: true
    }));
    var collapse = wrapper.find(ActionCollapse);
    expect(collapse).toHaveLength(1);
    expect(collapse.prop('colSpan')).toBe(2);
  });
  it('Should display the ActionCollapse correctly with the bulkAction', function () {
    var headers = [{
      value: 'test'
    }];
    var rows = [{
      test: 'test1',
      other: 'other',
      _isChecked: true
    }];
    var rowLinks = [{
      icon: 'trash',
      onClick: jest.fn()
    }];
    var wrapper = mount( /*#__PURE__*/React.createElement(Table, {
      rows: rows,
      headers: headers,
      rowLinks: rowLinks,
      withBulkAction: true
    }));
    var collapse = wrapper.find(ActionCollapse);
    expect(collapse).toHaveLength(1);
    expect(collapse.prop('colSpan')).toBe(3);
  });
  it('Should display the ActionCollapse if one of the row is not checked', function () {
    var headers = [{
      value: 'test'
    }];
    var rows = [{
      test: 'test1',
      other: 'other',
      _isChecked: true
    }, {
      test: 'test2',
      other: 'other1',
      _isChecked: false
    }];
    var rowLinks = [{
      icon: 'trash',
      onClick: jest.fn()
    }];
    var wrapper = mount( /*#__PURE__*/React.createElement(Table, {
      rows: rows,
      headers: headers,
      rowLinks: rowLinks,
      withBulkAction: true
    }));
    var collapse = wrapper.find(ActionCollapse);
    expect(collapse).toHaveLength(1);
    expect(collapse.prop('numberOfSelectedEntries')).toBe(1);
  });
  it('Should not display the ActionCollapse if the withBulkAction is false', function () {
    var headers = [{
      value: 'test'
    }];
    var rows = [{
      test: 'test1',
      other: 'other',
      _isChecked: true
    }, {
      test: 'test2',
      other: 'other1',
      _isChecked: true
    }];
    var rowLinks = [{
      icon: 'trash',
      onClick: jest.fn()
    }];
    var wrapper = mount( /*#__PURE__*/React.createElement(Table, {
      rows: rows,
      headers: headers,
      rowLinks: rowLinks
    }));
    var collapse = wrapper.find(ActionCollapse);
    expect(collapse).toHaveLength(0);
  });
});

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0082 ]--