<commit_before>arquilian-graphene-angular
==========================

AngularJS extensions to Arquillian Graphene<commit_msg>mentioned project features in README.md<commit_after>arquilian-graphene-angular
==========================

> AngularJS extensions to Arquillian Graphene

Features
--------

* synchronization of AngularJS calls
* `@FindByNg` annotation support

Synchronization
---------------

This extension implements a WebDriver event listener that after each navigation, click or typing event makes sure that there are no other oustanding Angular requests in progress.

This ensures that application-specific computations are finished before the control is passed over to your test.

In order to use this extension, you don't need to do anything - it is registered and used automatically.

Selectors - `FindByNg`
-----------------------

Often you won't find any other meaningful selectors in AngularJS generated DOM than `ng-` attributes.

Angular attributes can offer you stable way how to describe

* form inputs that binds to model values (`@FindByNg(model = "..."`)
* repeated DOM blocks (`@FindByNg(repeat = "...")`)
* buttons or links that are source of actions (`@FindByNg(action = "..."`)

### Sample

    @RunWith(Arquillian.class)
    @RunAsClient
    public class AngularTest {

        @Deployment
        public static WebArchive createTestArchive() {
            return ...;
        }

        @Drone
        WebDriver browser;

        @ArquillianResource
        URL contextRoot;

        @FindByNg(model = "todo.done")
        List<WebElement> todos;

        @FindByNg(model = "todoText")
        WebElement todoEntry;

        @Before
        public void loadPage() {
            browser.navigate().to(contextRoot + "index.html");
        }

        @Test
        public void testNumberOfTodos() {
            assertEquals(2, todos.size());
        }
    }
{'fraction_non_alphanumeric': 0.12652196929592377, 'fraction_numerical': 0.0005293806246691371, 'mean_word_length': 2.8650306748466257, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1130035', 'n_tokens_mistral': 521, 'n_tokens_neox': 482, 'n_words': 171}