san650/ember-cli-page-object

View on GitHub

Showing 211 of 211 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

module('optgroup', function () {
test('selected with [value]', async function (this: TestContext, assert) {
const page = create({
value: value('select'),
});
Severity: Major
Found in test-app/tests/unit/-private/properties/value-test.ts and 1 other location - About 1 day to fix
test-app/tests/unit/-private/properties/value-test.ts on lines 333..381

Similar blocks of code found in 2 locations. Consider refactoring.
Open

module('optgroup', function () {
test('selected with [value]', async function (this: TestContext, assert) {
const page = create({
value: value('select'),
});
Severity: Major
Found in test-app/tests/unit/-private/properties/value-test.ts and 1 other location - About 1 day to fix
test-app/tests/unit/-private/properties/value-test.ts on lines 469..517

Similar blocks of code found in 3 locations. Consider refactoring.
Open

describe('Blueprints: ember generate and destroy page-object-component', function () {
setupTestHooks(this);
 
it('generates a page-object component in an ember app', function () {
var args = ['page-object-component', 'foo'];
Severity: Major
Found in addon/node-tests/blueprints/page-object-component-test.js and 2 other locations - About 1 day to fix
addon/node-tests/blueprints/page-object-helper-test.js on lines 10..36
addon/node-tests/blueprints/page-object-test.js on lines 10..36

Similar blocks of code found in 3 locations. Consider refactoring.
Open

describe('Blueprints: ember generate and destroy page-object-helper', function () {
setupTestHooks(this);
 
it('generates a page-object-helper in an ember app', function () {
let args = ['page-object-helper', 'foo-bar'];
Severity: Major
Found in addon/node-tests/blueprints/page-object-helper-test.js and 2 other locations - About 1 day to fix
addon/node-tests/blueprints/page-object-component-test.js on lines 10..36
addon/node-tests/blueprints/page-object-test.js on lines 10..36

Similar blocks of code found in 3 locations. Consider refactoring.
Open

describe('Blueprints: ember generate and destroy page-object', function () {
setupTestHooks(this);
 
it('generates a page-object in an ember app', function () {
let args = ['page-object', 'foo'];
Severity: Major
Found in addon/node-tests/blueprints/page-object-test.js and 2 other locations - About 1 day to fix
addon/node-tests/blueprints/page-object-component-test.js on lines 10..36
addon/node-tests/blueprints/page-object-helper-test.js on lines 10..36

File collection-test.ts has 488 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { collection, create, hasClass, text } from 'ember-cli-page-object';
import withIteratorSymbolDefined from '../../../helpers/with-iterator-symbol-defined';
import { setupRenderingTest, TestContext } from '../../../helpers';
import { module, test } from 'qunit';
 
 
Severity: Minor
Found in test-app/tests/unit/-private/properties/collection-test.ts - About 7 hrs to fix

    File value-test.ts has 448 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import { create, value } from 'ember-cli-page-object';
    import { setupRenderingTest, TestContext } from '../../../helpers';
    import { module, test } from 'qunit';
    import { render } from '@ember/test-helpers';
    import hbs from 'htmlbars-inline-precompile';
    Severity: Minor
    Found in test-app/tests/unit/-private/properties/value-test.ts - About 6 hrs to fix

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      module('comma separated selector', function () {
      const SELECTOR = 'comma, separated';
       
      test('page object with comma separated `scope`', async function (assert) {
      assert.throws(
      Severity: Major
      Found in test-app/tests/unit/extend/find-many-test.ts and 1 other location - About 6 hrs to fix
      test-app/tests/unit/extend/find-one-test.ts on lines 149..178

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      module('comma separated selector', function () {
      const SELECTOR = 'comma, separated';
       
      test('page object with comma separated `scope`', async function (assert) {
      assert.throws(
      Severity: Major
      Found in test-app/tests/unit/extend/find-one-test.ts and 1 other location - About 6 hrs to fix
      test-app/tests/unit/extend/find-many-test.ts on lines 157..186

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      test('objectAt returns an item', async function (this: TestContext, assert) {
      const page = create({
      foo: collection('span', {
      text: text(),
      }),
      Severity: Major
      Found in test-app/tests/unit/-private/properties/collection-test.ts and 1 other location - About 4 hrs to fix
      test-app/tests/unit/-private/properties/collection-test.ts on lines 61..75

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      test('returns an item', async function (this: TestContext, assert) {
      const page = create({
      foo: collection('span', {
      text: text(),
      }),
      Severity: Major
      Found in test-app/tests/unit/-private/properties/collection-test.ts and 1 other location - About 4 hrs to fix
      test-app/tests/unit/-private/properties/collection-test.ts on lines 340..354

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      test('[data-*]', async function (this: TestContext, assert) {
      const page = create({
      scope: 'span',
      lowercase: property('data-test'),
      camelCase: property('neverTest'),
      Severity: Major
      Found in test-app/tests/unit/-private/properties/property-test.ts and 1 other location - About 4 hrs to fix
      test-app/tests/unit/-private/properties/property-test.ts on lines 241..254

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      test('non-standard', async function (this: TestContext, assert) {
      const page = create({
      scope: 'span',
      lowercase: property('neverexisted'),
      camelCase: property('neverExisted'),
      Severity: Major
      Found in test-app/tests/unit/-private/properties/property-test.ts and 1 other location - About 4 hrs to fix
      test-app/tests/unit/-private/properties/property-test.ts on lines 256..269

      Function exports has 114 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      module.exports = async function () {
      return {
      usePnpm: true,
      scenarios: [
      {
      Severity: Major
      Found in test-app/config/ember-try.js - About 4 hrs to fix

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

        test('findOneBy throws error if > 1 elements found', async function (this: TestContext, assert) {
        assert.expect(1);
        const page = create({
        foo: collection('span', {
        text: text(),
        Severity: Major
        Found in test-app/tests/unit/-private/properties/collection-test.ts and 1 other location - About 4 hrs to fix
        test-app/tests/unit/-private/properties/collection-test.ts on lines 450..473

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

        test('findOneBy throws error if no elements found', async function (this: TestContext, assert) {
        assert.expect(1);
        const page = create({
        foo: collection('span', {
        text: text(),
        Severity: Major
        Found in test-app/tests/unit/-private/properties/collection-test.ts and 1 other location - About 4 hrs to fix
        test-app/tests/unit/-private/properties/collection-test.ts on lines 424..448

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

        test('finds by selector and returns jQuery elements collection', async function (assert) {
        const page = create({});
         
        await render(hbs`<em class="lorem">1</em><span class="ipsum">2</span>`);
         
         
        Severity: Major
        Found in test-app/tests/unit/extend/find-element-with-assert-test.ts and 1 other location - About 4 hrs to fix
        test-app/tests/unit/extend/find-element-test.ts on lines 11..24

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

        test('finds by selector and returns jQuery elements collection', async function (assert) {
        const page = create({});
         
        await render(hbs`<em class="lorem">1</em><span class="ipsum">2</span>`);
         
         
        Severity: Major
        Found in test-app/tests/unit/extend/find-element-test.ts and 1 other location - About 4 hrs to fix
        test-app/tests/unit/extend/find-element-with-assert-test.ts on lines 11..24

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

        test('generates .click', async function (this: TestContext, assert) {
        assert.expect(1);
         
        const page = create({
        foo: {
        Severity: Major
        Found in test-app/tests/unit/-private/properties/dsl-test.ts and 1 other location - About 4 hrs to fix
        test-app/tests/unit/-private/properties/dsl-test.ts on lines 169..185

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

        test('calls fillIn method belonging to execution context', async function (assert) {
        assert.expect(1);
         
        const expectedSelector = 'input';
        const expectedText = 'dummy text';
        Severity: Major
        Found in test-app/tests/unit/-private/properties/fillable-test.ts and 1 other location - About 4 hrs to fix
        test-app/tests/unit/-private/properties/fillable-test.ts on lines 190..207
        Severity
        Category
        Status
        Source
        Language