<commit_before>'use strict';

/* http://docs.angularjs.org/guide/dev_guide.e2e-testing */
console.log( "starting test ..." )
describe( 'UserAuth Scenarios', function() {

  beforeEach( function() {
    chrome.storage.local.clear()
  } )

  describe( 'First Time User', function() {

    beforeEach( function() {
      browser().navigateTo( '/index.html#/' );
      sleep( 1 )
    } );

    it( 'should redirect to /password', function() {

      expect( browser().location().url() ).toContain( "password" )

    } );

    it( "should not have password in Chrome Storage", function( done ) {

      SpareCoins.ChromeStorage.get( "security", function( data ) {
        console.log( data )
        // debugger

        if ( 1 === 0 ) {
          throw Error( "" )
        } else {
          throw Error( "" )
        }

        done()
      } )

    } )

    it( 'should not let you confirm if your password confirmation doesnt match', function() {

    } )

    it( 'should redirect to /send after settign correct password', function() {

    } )

  } )

  describe( 'Signed up User', function() {

    beforeEach( function() {
      browser().navigateTo( '/index.html#/' );
    } );

    it( 'should redirect to /password if first time user', function() {
      sleep( 1 )
      expect( browser().window().href() ).toContain( "password" )

    } );

    it( 'should redirect to /login if not logged in', function() {

    } )

    it( 'should redirect to /send if logged in', function() {

    } )

  } )

  describe( 'First Time User', function() {

    beforeEach( function() {
      browser().navigateTo( '/index.html#/' );
    } );

    it( 'should redirect to /password if first time user', function() {
      sleep( 1 )
      expect( browser().window().href() ).toContain( "password" )

    } );

    it( 'should redirect to /login if not logged in', function() {

    } )

    it( 'should redirect to /send if logged in', function() {

    } )

  } )

} );
<commit_msg>Angular Future Action to test password digest<commit_after>'use strict';

/* http://docs.angularjs.org/guide/dev_guide.e2e-testing */
console.log( "starting test ..." )

angular.scenario.dsl( 'getPasswordDigest', function() {
  return function( storage ) {
    return this.addFutureAction( 'getting password digest from storage', function( win, doc, done ) {
      storage.get( "security", function( data ) {
        done( undefined, data );
      } );
    } );
  }
} );

describe( 'UserAuth Scenarios', function() {

  beforeEach( function() {
    chrome.storage.local.clear()
  } )

  describe( 'First Time User', function() {

    beforeEach( function() {
      browser().navigateTo( '/index.html#/' );
      sleep( 1 )
    } );

    it( 'should redirect to /password', function() {

      expect( browser().location().url() ).toContain( "password" )

    } );

    it( "should not have password in Chrome Storage", function( done ) {
      var passwordDigest = getPasswordDigest( SpareCoins.ChromeStorage );
      expect( passwordDigest ).toBe( undefined )
    } )

  } )

  it( 'should not let you confirm if your password confirmation doesnt match', function() {

  } )

  it( 'should redirect to /send after settign correct password', function() {

  } )

} )

describe( 'Signed up User', function() {

  beforeEach( function() {
    browser().navigateTo( '/index.html#/' );
  } );

  it( 'should redirect to /password if first time user', function() {
    sleep( 1 )
    expect( browser().window().href() ).toContain( "password" )

  } );

  it( 'should redirect to /login if not logged in', function() {

  } )

  it( 'should redirect to /send if logged in', function() {

  } )

} )

// describe( 'First Time User', function() {

// beforeEach( function() {
//   browser().navigateTo( '/index.html#/' );
// } );

// it( 'should redirect to /password if first time user', function() {
//   sleep( 1 )
//   expect( browser().window().href() ).toContain( "password" )

// } );

// it( 'should redirect to /login if not logged in', function() {

// } )

// it( 'should redirect to /send if logged in', function() {

// } )

// } )

// } );

{'fraction_non_alphanumeric': 0.16670710992477553, 'fraction_numerical': 0.0024265954865323952, 'mean_word_length': 2.578125, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7182614', 'n_tokens_mistral': 1311, 'n_tokens_neox': 1233, 'n_words': 364}