If your controller action looks like this:  respond_to do |format|   format.html { raise 'Unsupported' }   format.js # index.js.erb end   and your functional test looks like this:  test "javascript response..." do   get :index end   i...
I have a javascript app within 250 lines and want to add tests to that. Whenever i make a tiny change, i have to run tests for atleast 10 cases manually, which i want to automate.   I could have gone for frameworks as suggested in different posts, bu...
Until now, I was testing my non-Angular website (I only have JS, no node, not even ES6) using Jasmine, Karma and Travis CI.   I am now trying to write functional tests (in case my vocabulary is off, I mean scenario tests for which I want to test "...
It is written in documentation that it is possible to do things like file upload using intern. Can anyone provide an example of how this can be done? I searched through examples and through LeadFoot documentation and I can't find anything.  Thank...
My goal is to be able to write pure routes for an Express.js server. Is that even possible?  For accessing the database and stuff I know I can use the fabulous Future monad to keep things pure, but how about the route rendering itself?  One of the gr...
The intern 2 documentation gives the following example of waiting for a condition to be true on a test page after loading it:  this.remote     .get(require.toUrl('./SomeTest.html'))     .then(pollUntil('return window.ready;', 5000));...
We are having a little problem with a functional test with casper.js.  We request the same resource twice, first with the GET and then with POST method. Now when waiting for the second resource (POST) it matches the first resource and directly goes t...
I need to do something like:  expect(theElement.hasText()).toBe(true);   Do you know how can I do it?  I know that there is a "getText" function in protractor, but, how can I use it? Should I do?:  expect(theElement.getText().lenght > 0).t...
Got a test for a React app's login function in a Page class:     async login(t) {     console.log('starting login...');     debugger;     this.logBrowserMessages(t);      await this.loginModal({ visibilityCheck: true });     await t...
I am developing chat application, using node.js socket.io module on a server, and javascript on a client. As it become more complex, I become tired to test different usage scenarios by clicking across browsers. At now I use different browsers in orde...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.