Questions tagged [jasmine]

Jasmine is a behavior-driven development (BDD) framework for testing JavaScript code. Jasmine has no external dependencies and does not require a DOM.

Filter by
Sorted by
Tagged with
0
votes
0answers
10 views

Is it possible to use methods in java library or a java project snapshot in a protractor project?

If I create database testing project using java and export to a snapshot(as a jar), can I use it in a protractor project? Hoping to use in protractor project, protractor,jasmine framework along ...
0
votes
0answers
30 views

Path variable doesn't get the path given in config file and hence don't prepend it

My Config File Looks like this: exports.config = { // // ==================== // Runner Configuration // ==================== // // WebdriverIO allows it to run your tests in ...
0
votes
1answer
41 views

Why element locators are not suggested in visual studio code for protractor?

I don't get suggestions for "element(by." element locators in visual studio code. Im using protractor. I have changed the settings file also. Settings.js { "editor.quickSuggestions": { "...
0
votes
1answer
30 views

How to fix “Cannot find module” error and “Error: ReferenceError: Element is not defined” in protractor?

I have created a test project using page object model. When I run, it creates "Cannot find module" error. I have tried several answers but didn't work. Here is my code Config.js exports....
1
vote
1answer
65 views

how can I find element on next page, while it is not presenting on present page?

I have a total of 200 users. I have one angular page which has showed 20 users on the present page. Now, I want to find a random user which is in any next pages. I have page navigator button on the ...
0
votes
1answer
60 views

how do I define global variable in conf.js and used in spec.js file in jasmine protractor?

describe('Enter Base API URL', function() { it('1st scenario', function() { // Take any URL. browser.get('xyz.com'); browser.ignoreSynchronization=true; var user= by.xpath('//...
2
votes
1answer
68 views

getText() which is in between <div> </div> tag?

Get text which are in between tags DOM <div id="div_ResultMessage" class="AlertmsgDiv"> <div id="lblSuccessMessage" class="alert alert-success alert-dismissable"> <div ...
1
vote
0answers
30 views

Jasmine, how to test a return?

I'm writing some unit tests for our Angular application. In a few instances, we have some code that is like the following. public submit(): void { if (!this.selectedValue) { ...
1
vote
1answer
466 views

Can Jasmine tests be executed in a specific order?

I believe it is considered to be a bad practice to rely on the order in which the (acceptance) tests should be run, but for testing "deeply nested features" (I don't know if there is a standard term ...
0
votes
1answer
351 views

Unable to run protractor script

I'm not able to run my protractor tests. Getting the below error: grunt cltest Running "protractor:singlerun" (protractor) task (node:26770) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. ...
2
votes
1answer
2k views

How to use async/await with Protractor-nodejs8

I am completely new to protractor, and I came across the async/await. Is it necessary to use async/await in all your script. And how to use with page object. Using node version 8.9.4 protractor ...
2
votes
1answer
154 views

How does $( document ).ready() work?

I have started using jQuery and jasmine to automate webpage testing. From what I understand, by calling $( document ).ready() would make sure that a webpage would finish loading. But for the ...
3
votes
2answers
202 views

Protractor Image didnt upload on dialogue box?

I want to test the image upload functionality using Protractor but my written script didn't work. When we click on the dialogue box image it opens the window to select the desired image. After the ...
0
votes
1answer
516 views

Protractor - How to extract a link from HTML string?

In one of my test cases, I'm able to get the entire HTML e-mail message sent to a user. The message contains text, button, a link, etc. My Issue is that I need to extract the href link in order to ...
2
votes
1answer
1k views

E2E: Retrieve email-link - How to invoke callBack function for mailListener?

I do have an E2E test for retrieving confirmation email after registration. I need the link in the confirmation email to login the user as the link in the email contains the token etc. for access. ...
2
votes
1answer
2k views

Protractor: Firefox browser opens but URL is not launched

I am trying to run TestCase in Firefox browser. Result is : Firefox browser opens, but URL is not loading. FIREFOX browser - 53 Selenium- webdriver - 3.6.0 NPM - 3.10.10 Protractor ...
2
votes
1answer
2k views

Unable to run Protractor tests in Microsoft Edge

I'm working on a project to begin testing Node/Angular applications using Protractor and Jasmine. I have a POC working in most browsers but having a lot of trouble with MS Edge. Here's my ...
0
votes
1answer
615 views

Please help with simple test case in jasmine

I am stuck with jasmine. I read/youtubed/googled but seems like I am on the wrong track. Here is what I have so far. I've used protractor --elementExplorer to pull items from http://www.angular.io: &...
2
votes
0answers
159 views

How to check children method has been called in jasmine test cases?

We use spyOn(this,"_new") to track a function call in jasmine. I need to check the children method call in jasmine. My code sample is given below, Sample code: function perform(option) { this....
2
votes
2answers
958 views

Protractor: Specified suite is not running .Instead all suite inside Suites(config.js) is running

Test Case: I wanted to run only one suite (eg) suite 'A'. So i specified the same while running configuration protractor conf.js -- suites A Problem: All Suites (A,B,C,D) are running, instead of ...
1
vote
0answers
812 views

How to clear karma warn web-server 404 error for Service method call?

I am new to TDD. I have configured the karma and gulp for my sources to generate the code coverage. My karma configuration file is given below: browsers: ['Chrome', 'IE', 'Firefox', 'MyHeadlessChrome'...
1
vote
1answer
3k views

Protractor: How to get text present between two span

I want to get the text (SampleList23.csv) that is present between 2 spans. HTML: <div class="ng-scope" ng-switch-when="false"> <div class="engage-tag ng-binding"> <span ...
2
votes
0answers
578 views

How to expand upon the error from a Jasmine expect failure?

I'm using Jasmine, FrisbyJS, and Jest to create API tests for my team's product. I want to be able to handle when an expect (which I'm pretty sure Frisby is just using the underlying Jasmine expect) ...
4
votes
1answer
8k views

AngularJS testing with Protractor- no element found using locator

I have just recently started working on integrating a test framework into my AngularJS application, using Protractor do build the test cases & run the tests. Having never used automated testing ...
5
votes
1answer
2k views

Is there a way to run a subset of tests using Jest?

I would like to be able to run a subset of it's or describe's in a Jasmine test file using jest with some type of tagging system. I know I can indicate a filter of sorts by using a word after the ...
0
votes
1answer
3k views

Why am I getting “RangeError: Maximum call stack size exceeded” when I try to run FrisbyJS tests with Jest?

When I try to run my frisbyjs tests with jest as documented on the github page, I get the following error: RangeError: Maximum call stack size exceeded at String.slice (native) at Object....
2
votes
1answer
1k views

Parallel protractor tests are still running sequentially

Looking For: I want to run Specs in Parallel. Tried: Included in config file: shardTestFiles : true, maxInstances: 4 Output I see: Multiple instances are not opening. Still running in serial. **...
3
votes
2answers
549 views

Should I use Jasmine/FrisbyJS or Mocha/Chai for testing of live API with Angular?

What I'm looking for in an answer Concrete relevant(newer?) examples of why one choice is better than the other OR, a concrete suggestion of why using a different language is the better choice over ...
3
votes
0answers
498 views

Karma/ Jasmine testing framework - tests don't appear to be executed

I am looking to implement the Karma/ Jasmine test suite/ framework for use with my AngularJS app. Having never used a testing framework previously, I have followed the tutorial - to give it a go, ...
0
votes
1answer
2k views

How to verify that the menu items (tab/column Elements) are clickable? or Unclickable?

Test Case In My web page, I have 5 tabs (A,B,C,D,E) in which 2 tabs (A,B) are clickable and 3 Tabs(C,D,E) are not clickable. Write a script to verify those tab elements are clickable or not. What ...
6
votes
1answer
592 views

Why Phantomjs got crashed while running more test cases?

I have written 751 test cases in Jasmine JavaScript. 116 test cases for Mobile View and 645 test cases on Desktop view. While executing test cases, most of the times, test case execution was not ...
8
votes
2answers
2k views

What are the limitations of chrome headless browser?

We have written bunch of test cases for code coverage using jasmine javascript. First of all, we are using phantom JS to run the test cases. While test case counts are persistently increased test ...
8
votes
3answers
746 views

End-to-end tests are running for 5 hours

This is a continuation of Speeding up end-to-end tests topic, but a more specific one. Currently, it takes ~5 hours for our daily end-to-end testing run to complete. What can we do to improve on ...
1
vote
5answers
5k views

What tool to use for end to end testing of SPA (Single Page Application)

What testing tool to use for automating user acceptance testing ? The itself app uses react Should I use Selenium with various wait strategies, Jasmine or a different tool ?
1
vote
2answers
6k views

Protractor: How to verify text present in the table row?

TestCase: Verify the table ROW contains text. To verify text present in Table Row, i tried Using "expect.gettext().toContain(datefinal)". But ouput returns "Expected '7/18/17' to contain undefined."...
5
votes
1answer
132 views

Test Quarantine in Protractor

Follow-up to How to deal with flaky tests? One of the approaches to tackle flaky tests is to temporarily quarantine the tests - move them to a special "bucket" with other flaky tests: I offer one ...
2
votes
0answers
522 views

Unable to add/attach screenshot and test steps in Report

I am working on protractor and using "protractor-angular-screenshot-reporter" to generate the report.But i am unable to add screenshot and test steps in this report.Can any one please help me in this....
0
votes
1answer
247 views

How can I find text for span within span?

Following is my code: <span id="agText" class="ag-header-cell-text"> <span style="height: 100%;">Coordinator</span> </span> I was trying the following: var cordinator = ...
1
vote
3answers
2k views

How can I locate the navigation element by text?

<li class="nav-item" ng-reflect-ng-class="nav-item,"> <a class="nav-link" href="javascript:void(0);"> <span>By Coordinator &amp; Salesman</span> <!-...
3
votes
1answer
413 views

How can I add headings to my protractor-jasmine2-screenshot-reports

I am sharing my spec file, the generated report contains only 'through Gmail Account' text but I want to add 'Password pop up' text and many other headings also. I tried by adding one more 'it' block ...
0
votes
1answer
196 views

Jasmine web services automation “getting started” doc

I have been working on nightwatchjs from past 6 months, before that I was using Selenium-WebDriver to do browser automation. I have syntactical knowledge of JS and I assume that Jasmine won't bother ...