Rails 5 Test Prescriptions 9th Chapter Testing-javascript:integration Testing

Source: Internet
Author: User

    • Integration testing of JS using Capybara
    • Talk about Drive
    • Let the test pass
    • Webpack in Development Mode

JS design is an important factor for users to have a good experience on the web. However, many Web pages do not test JS.

This is partly because JS is difficult to test. Interaction and logic are dependent on the user's interaction with the Web page, which is difficult.

The JS framework also does not support simple unit testing. The tool also changes very quickly. b The tool used in this chapter looks a bit old, if you read it without being completely antiquated discarded.

This chapter discusses using the Integrated test tool Capybara to test JS from the client code.

The next chapter discusses unit Test JS, with JS Tools, and Webpack support (Rails5.1 new)

Enter tasks when creating project cannot jump to projects page

This problem should be not satisfied with the validation, so it cannot be stored in the database. Use the object. Reload. Property hints that there are no objects.

Use the valid and Erroes.message methods. Tip Project.tasks failed validation.

Then using the Full_message method, it is suggested that 2 parameters are provided less.

Is there a problem with the Task.new code? There was no problem before, whether it was due to the addition of the Task property, so you need to update the previous automated test content.

Integration-testing JavaScript with Capybara

Rails 5 Test Prescriptions 9th Chapter Testing-javascript:integration Testing

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.