angular-phonecat
angular-phonecat copied to clipboard
step-15 Accessibility
- Add ngAria module.
- Add labels to the search and order fields.
- Add accessibility plugin for Protractor.
- Add missing alt attributes in the phone detail.
- Add aria live regions to inform the user about results after searching and filtering elements.
- Improve access via keyboard:
- Navigate between the images in a phone detail.
- Add headings elements.
- Add information about checkmarks in the phone detail specs.
By the way, do I have to modify the document in the full tutorial?
hi @gkalpak, ¿is there any way that the use of the debounce option for the ng-model works with Protractor? I need this option for my changes. But with that, the e2e tests fail.
I know that there is an issue about that but nothing more.
Without having really looked into that, I can't imagine how protractor can be ignoring the debounce. It's something that Angular does and PRotractor doesn't have a way to "ignore" it.
What is probably happening, is that Protractor waits for the view to "stabilize" (which in Angular terms includes waiting for registered timeouts, such as the one used by debounce) and only then assets your expectation.
If you want to circumvent that, you can turn on ignoreSynchronization (read more about it here).
If you can't get it to work, post the failing test and I'll take a look.
I think that with ignoreSynchronization does not work. I saw yesterday this information about timeouts. One of the test that fails is:
it('should filter the phone list as a user types into the search box', function() {
var phoneList = element.all(by.repeater('phone in $ctrl.phones'));
var query = element(by.model('$ctrl.query'));
expect(phoneList.count()).toBe(20);
query.sendKeys('nexus');
expect(phoneList.count()).toBe(1);
query.clear();
query.sendKeys('motorola');
expect(phoneList.count()).toBe(8);
});
The problem is the expect runs before the debounce finishes, so the results never will be the correct. It Is the same example that an user reported in the Protractor issue that I mentioned before.
I have tried using wait and setTimeout but I obtain the same errors.
@gkalpak After a review, I think that my problem is related with some changes I've made in the repeater. I will check it.
@gkalpak done. Now the e2e tests pass in my local environment. I've added an browser.sleep suggested by @mohitjee15 and I've changed how to obtain the repeater in the scenario due to my changes in the template.
But here, Travis throws an error WebDriverError: unknown error: Chrome version must be >= 46.0.2490.0
Thx :+1: I will take a look this week !
ok @gkalpak. Do I have to modify the full tutorial and send another pull request or I have to wait until this pull request is accepted?
Yes, you have to update the tutorial context as well, so we can merge them together.
ok, I will work in the tutorial and I will send another pulll request as soon as possible.
@felixzapata, I'll review this together with the tutorial content PR - feel free to ping me when it's ready. Thx for working on this :+1:
@gkalpak I've created the pull request with the new step in the tutorial.
About this pull request, please feel free to comment if I need to review the code in the new directives due to some mistakes.
Awesome! I will take a look soon.
Note to self: We need a new tag for this step.
Why had the previous steps be modified? Since this is an extra step at the end, previous steps should not be touched as far as I understand. Do I miss something?
@gkalpak I will check again the pull request. I'm only want to upload three commits and I though that it was ok.
We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm.
CLAs look good, thanks!
@gkalpak done, a problem with the rebase
@gkalpak I´ve updated the PR to avoid the multiple commits.
I will take a look to your comments.
@gkalpak I will update the PR with only one single commit.
@gkalpak is there a problem inside Travis with the driver for Chrome?
Not sure, but if the tests pass locally, don't worry about Travis. I'll deal with it later.