question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Possibility to test with ember-cli-page-object

See original GitHub issue

Hi, at first, thanks for the great plugin.

I am using ember-cli-page-object in my acceptance and integration tests, but ember-power-select completely ignores events from page-object am i missing something, or it is normal behaviour and the only way to access EPS in tests via test provided helpers?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
corrsptcommented, Sep 23, 2016

I’m starting my acceptance tests with ember-cli-page-object and ember-power-select as well, and this issue in the page object repo helped me advance a little in my efforts.

I don’t think events are ignored, I’m still working through my component, but this is what I have (this is a component I call PowerLov (an ember-cli-page-object component)

import PageObject from 'app/tests/page-object';

const {
  text,
  clickable,
  count
} = PageObject;

export default function(scope) {
  return {
    scope: `[data-id="${scope}"]`,
    inputValue: text('.ember-power-select-selected-item'),
    open: clickable('.ember-power-select-trigger'),
    count: count('.ember-power-select-option', { resetScope: true }),
    select(optionText) {
      selectChoose(this.scope, optionText);
      return this;
    }
  };
}
1reaction
Sinledcommented, Nov 2, 2016

@corrspt thanks, helpers code from provided link works like a charm

import { buildSelector } from '../page-object';


export const selectableChoose = function(selector, options = {}) {
    return {
        isDescriptor: true,

        value(textToSelect) {


            selectChoose(buildSelector(this, selector, options), textToSelect);

            return this;
        }
    };
};

export const selectableSearch = function(selector, options = {}) {
    return {
        isDescriptor: true,

        value(textToSearch) {

            selectSearch(buildSelector(this, selector, options), textToSearch);

            return this;
        }
    };
};

updated: stating from ember 2.8+ using with wait helper results strange behaviour

Read more comments on GitHub >

github_iconTop Results From Across the Web

Options - Ember CLI Page Object
Represent the screens of your web app as a series of objects. This ember-cli addon eases the construction of these objects on your...
Read more >
Ember CLI Page Object
Represent the screens of your web app as a series of objects. This ember-cli addon eases the construction of these objects on your...
Read more >
Contains - Ember CLI Page Object
Represent the screens of your web app as a series of objects. This ember-cli addon eases the construction of these objects on your...
Read more >
IsVisible - Ember CLI Page Object
Represent the screens of your web app as a series of objects. This ember-cli addon eases the construction of these objects on your...
Read more >
ember-cli-page-object
testSelector string CSS selector to test; targetSelector string CSS selector ... if multiple elements are matched by selector and multiple option is not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found