New Project Setup | Bondar Academy
Course: Cypress UI Testing with JavaScript
Module: Working with APIs
Instructor: Artem Bondar
Lesson Summary
In this lesson, we set up a new test project for the application Conduit , accessible at conduit.bonderacademy.com . Here are the key steps and concepts covered: Creating a Test Account Click the Sign Up button to create an account. Use any random username , email , and password . The email does not need to be real. Sign in using your credentials after account creation. Application Functionality Once signed in, you can perform various operations like: Creating articles Publishing articles Deleting articles Understanding the API The application has an underlying API that handles data requests. To inspect API requests: Open the browser's Inspect tool. Navigate to the Network tab and filter by Fetch and XHR . Observe API requests and responses, such as GET requests for articles and tags. Setting Up Cypress Framework For testing, we configured the Cypress framework: Added a Cypress dependency in package.json . Set viewport resolution and base URL in the cypress-config folder. Created a new spec file for tests. Logging In with Cypress The first test involves logging into the application: cy.visit('application_url') Use cy.contains to find and click on the Sign In button, then fill in the email and password fields using cy.get . Custom Commands To streamline the login process, a custom command was created: cy.loginToApplication() This encapsulates the login steps for reuse in future tests. By the end of the lesson, the application and testing framework were successfully configured, setting the stage for future lessons.