angularjs - beforeEach (to prevent test pollution) not working as expected -


I am doing an AngularJS tutorial and I have come to a strange solitary case, which, in the end, First happens. For reference, I am currently in the experiment section. The test code is here:

  'strict experiment'; / * Http://docs.angularjs.org/guide/dev_guide.e2e-testing * / description ('PhoneCat App', function) (describe ('phone list view', function) (first) (first (function) {Browser.get ('app / index.html');}); (The phone list should be filtered as user types in the search box ', function () {var phoneList = element.all (by.repeater ( 'Phone Candidate (Phone List). ()); ToBe (3); Query. SendKeys (' Nexus'); Hope (Phone List). ToBe (1); query.clear (); query.sendKeys ('Motorola'); Hopefully (Phone List Coat) ()) toBe (2);});}); ('The current filter should display the value, function within an element with im "status" (var) element = element (element); hope (position element.gettext). ('Current' filter: \ s * $ /); Element (by.mold ('query')) Send ('Nexus'); Expectation (condition.gate text) ()) toMatch (/ current filter: Nexus \ s * $ /);});});   

Each block should reload the page before execution of each interpolation, but it seems that it is not so, since I run using protractor, the last lesson is first The sample is inserted into the query element ('Motorola') still exists when the second spec is executed, so that the other device fails.

Now, when I first proceed to each external block, all the glasses are passed successfully. any idea?

Warm correct, your tests look like this in the above example

  Describe the first description   

Before running this nest before running it only once, before it. Given that each block is checking it, I think that they are both to test the phone list view, in this case the correct nesting victim is as follows:

  First of all,   

However, if the index page is not specific to the phone list view, but it contains the entire app, then it should load into the top-level block block , From which it is the most The same approach:

  described before describing it    

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -