describe('QuickStart E2E Tests', function () { let expectedMsg = 'Hello Angular'; beforeEach(function () { browser.get(''); }); it('should display: ' + expectedMsg, function () { expect(element(by.css('h1')).getText()).toEqual(expectedMsg); }); });
it('Test 020 : should call graftXMLOverwrite for every new config munge with mode \'overwrite\' it introduces', function () { install_plugin(editconfigplugin); const platformJson = PlatformJson.load(plugins_dir, 'android'); platformJson.addInstalledPluginToPrepareQueue('org.test.editconfigtest', {}); const spy = spyOn(xml_helpers, 'graftXMLOverwrite').and.returnValue(true); const munger = new configChanges.PlatformMunger('android', temp, platformJson, pluginInfoProvider); munger.process(plugins_dir); expect(spy.calls.count()).toEqual(1); expect(spy.calls.argsFor(0)[2]).toEqual('/manifest/application/activity'); });
it('customPOST() should add a new item', function() { restangularAccounts.customPOST({ id: 2, user: 'Someone' }).then(function() { expect(accountsModel.length).toEqual(2); }); $httpBackend.expectPOST('/accounts').respond(201, ''); $httpBackend.flush(); });
describe('Checks getBits() method', () => { it('Checking getBits() method', () => { Num.init(0xff); expect(Num.getBits(0xabffffff, 0, 8)).toEqual(0xab); expect(Num.getBits(0xabffffff, 0, 4)).toEqual(0xa); expect(Num.getBits(0xabffffff, 4, 4)).toEqual(0xb); expect(Num.getBits(0xabfbffff, 12, 2)).toEqual(0x2); expect(Num.getBits(0xabcdffff, 8, 8)).toEqual(0xcd); expect(Num.getBits(0xabcdffff, 16, 8)).toEqual(0xff); }); });
describe('my-app App', () => { let page: AppPage; beforeEach(() => { page = new AppPage(); }); it('should display welcome message', () => { page.navigateTo(); expect(page.getParagraphText()).toEqual('Welcome to app!'); }); });
it('getList() should return an array of items', function() { restangularAccounts.getList().then(function(accounts) { expect(Restangular.stripRestangular(accounts)).toEqual(Restangular.stripRestangular(accountsModel)); }); $httpBackend.flush(); });
it('Checking onOperator() with 4 bits per var', () => { let bpv = OConfig.codeBitsPerVar; OConfig.codeBitsPerVar = 4; let ops1 = new OperatorsDos([1], [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15], org); expect(ops1.onOperator(0x04ffffff, 0)).toEqual(1); //v15=v15<=v15 expect(ops1.vars).toEqual([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,1]); expect(ops1.onOperator(0x046ff0ff, 0)).toEqual(1); //v6=v15+v15 expect(ops1.vars).toEqual([0,1,2,3,4,5,2,7,8,9,10,11,12,13,14,1]); OConfig.codeBitsPerVar = bpv; ops1.destroy(); });
it('Custom GET methods should work', function() { restangularAccounts.customGETLIST('messages').then(function(msgs) { expect(Restangular.stripRestangular(msgs)).toEqual(Restangular.stripRestangular(messages)); }); $httpBackend.flush(); });
describe('workspace-project App', () => { let page: AppPage; beforeEach(() => { page = new AppPage(); }); it('should display welcome message', () => { page.navigateTo(); expect(page.getParagraphText()).toEqual('Welcome to app!'); }); });
describe('workspace-project App', () => { let page: AppPage; beforeEach(() => { page = new AppPage(); }); it('should display welcome message', () => { page.navigateTo(); expect(page.getParagraphText()).toEqual('Welcome to app!'); }); });
describe('workspace-project App', () => { let page: AppPage; beforeEach(() => { page = new AppPage(); }); it('should display welcome message', () => { page.navigateTo(); expect(page.getParagraphText()).toEqual('Welcome to client!'); }); });
describe('workspace-project App', () => { let page: AppPage; beforeEach(() => { page = new AppPage(); }); it('should display welcome message', () => { page.navigateTo(); expect(page.getParagraphText()).toEqual('Welcome to client!'); }); });
describe('angular-seed App', () => { let page: AppPage; beforeEach(() => { page = new AppPage(); }); it('should display welcome message', () => { page.navigateTo(); expect(page.getParagraphText()).toEqual('Welcome to app!'); }); });
describe('workspace-project App', () => { let page: AppPage; beforeEach(() => { page = new AppPage(); }); it('should display welcome message', () => { page.navigateTo(); expect(page.getParagraphText()).toEqual('Welcome to angular-restheart!'); }); });
describe('first-app App', () => { let page: AppPage; beforeEach(() => { page = new AppPage(); }); it('should display welcome message', () => { page.navigateTo(); expect(page.getParagraphText()).toEqual('Welcome to app!'); }); });