24 - Run Functional Tests using a Headless Browser II - Quality Assurance - freeCodeCamp Tutorial
Ganesh H
This is the final Quality Assurance challenge, and we are once again using Zombie to test with a different input this time.
Link to Challenge : https://www.freecodecamp.org/learn/quality-assurance/quality-assurance-and-testing-with-chai/run-functional-tests-using-a-headless-browser-ii Written Guide: https://www.notion.so/ganeshh123/Run-Functional-Tests-using-a-Headless-Browser-II-b673975810534e22aba4b48e9b236178
Full Playlist for this course : https://www.youtube.com/playlist?list=PLhGp6N0DI_1SVteCORbgwlxJkAbcTiZyj All Writen Guides for this course : https://www.notion.so/ganeshh123/54ecbf7833414db885eec37f580599b4 All My Tutorials can be found at : https://www.notion.so/Tutorials-Ganesh-H-293ea420d34a464f9a1907e0405b5f26
Concepts: browser.visit() Loads document from the specified URL, processes events and calls the callback, or returns a promise. https://www.npmjs.com/package/zombie#browservisiturl-options-callback
browser.assert.element() Asserts that one element matching selection exists. Fails if no element or more than one matching element are found. https://www.npmjs.com/package/zombie#assertelementselection-message
browser.fill() Fill in an input field or text area with the provided value. https://www.npmjs.com/package/zombie#browserfillselector-value-callback
browser.pressButton() Press a button (button element or input of type submit). Typically this will submit the form. Use the callback to wait for the from submission, page to load and all events run their course. https://www.npmjs.com/package/zombie#browserpressbuttonselector-callback
browser.assert.text() Asserts that selected element(s) have the expected text content. Fails if no element found that has that text content. https://www.npmjs.com/package/zombie#asserttextselection-expected-message
browser.assert.status(), browser.assert.success() Asserts the current page loaded with the expected status code. https://www.npmjs.com/package/zombie#assertstatuscode-message
-————————————————————————————————————- Chai is an assertion library, similar to Node's built-in assert. It makes testing much easier by giving you lots of assertions you can run against your code.
freeCodeCamp (also referred to as “Free Code Camp”) is a non-profit organization that consists of an interactive learning web platform, an online community forum, chat rooms, online publications and local organizations that intend to make learning web development accessible to anyone. Beginning with tutorials that introduce students to HTML, CSS and JavaScript, students progress to project assignments that they complete either alone or in pairs. Upon completion of all project tasks, students are partnered with other nonprofits to build web applicat ... https://www.youtube.com/watch?v=IvConIRI_Fg
22076140 Bytes