GithubHelp home page GithubHelp logo

ember-page-object's People

Contributors

ember-tomster avatar linstula avatar poteto avatar samselikoff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ember-page-object's Issues

Add scope

Add a scope to Page Objects so interaction helpers look for elements within scope.

Sending page-object in vendor bundle?

I hope this isn't a really stupid question. All of the addon's code is in the /addon dir. Doesn't that mean that this is being compiled into vendor? Since this is only for testing, wouldn't putting in a place like /lib work?

No support for queryParams

When calling `this.visit('/?queryParam=hello_world') it doesn't work as if the user goes to that address in the browser and it gets picked up by Ember as queryParams as usual.

Generating unique data-auto-id

Ideally, we would like to have a unique attribute (data-auto-id) on DOM elements that we are testing for. This will allow us to target elements with greater specificity than if we were to simply identify them by "type" (data-auto-type).

@danmcclain After talking this through with @linstula, it seems wise to implement a data-auto-type attribute first and then implement id-based targeting later, once we have a sound plan for ensuring that a given element has a unique id in the template.

The issue that we're running into with resource-backed elements is that we can't guarantee that they will be unique. With multiple components being rendered, it is very difficult to ensure that a given element has a unique id. This is especially true if the data-auto-id is computed. But even if we were to enter the attribute into the template statically, the same user record may be displayed multiple times, which would render the same data-attribute multiple times (e.g., user-1 or user-lin-reid).

We're going to simply rename data-test-selector to data-auto-type and then revisit this.

Evaluate to see if a checkbox to see if it's checked

Is there a way to use the page-object for a checkbox to see if it's checked?

I tried searching across the repo under several keywords, but couldn't find anything.

This is how my current Ember test looks for it:

find('.t-settings-modules-tickets').prop('checked')

We do use a pattern to check checkboxes using your library, but I know that it's a hack, so wanted to see if there is a better way. Currently, this is how we use the page-object to check for checkboxes being checked:

import PageObject from 'bsrs-ember/tests/page-object';

var DTDPage = PageObject.create({
  fieldRequiredTwoNotChecked: () => Ember.$('.t-dtd-field-required').is(':not(:checked)'),
  fieldRequiredTwoChecked: () => Ember.$('.t-dtd-field-required').is(':checked'),
});

Thanks in advance,
Aaron

Confusing documentation regarding data-attribute selector

I would of proposed changes for the readme but I'm not sure of the answer just yet. Your documentation has several examples of selectors using standard sizzle style queries. Eg:

export default class SignupPage extends PageObject {
  fillInEmail(text) {
    return this.fillIn('#email', text);
  }
}

But, at far as I can tell, you only ship a data-attribute bridge, meaning that everything you want to select requires the data-test-selector attribute. Am I correct in this? Is there a regular bridge or is that something I need to write and pass into the constructor?

Is it possible to access a buttons' attributes?

I wanted to know if it is possible to access a buttons attributes to know if a button is disabled or not?

I have this code:

assert.ok(find('.t-dt-start').attr('disabled'));
<button {{action "start" ticket}} disabled={{isNotValid}} class="t-dt-start">
  {{t dt.start}}
</button>

That I'd like to use an ember-page-object in the first snippet test if possible. Is this possible?

Thank you in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.