/
Submit Prompt, Verify in My Results, and Delete it

Submit Prompt, Verify in My Results, and Delete it

Prepared by

Test Scenario for

Prepared by

Test Scenario for

Foivos Polykarpou

Submit Prompt, Verify in My Results, and Delete it

Overview

Title

Test Name

Objective

Title

Test Name

Objective

Submit Prompt, Verify in My Results, and Delete it

streamdel.js

Purpose

  • 1.1. This test verifies the functionality of logging into the application, submitting a prompt, verifying its presence in "My Results," and deleting the prompt.

  • 1.2. It checks for any errors during the login, submission, verification, and deletion processes, capturing screenshots for further analysis.

Prerequisites

Dependencies Installed: Make sure the required npm packages mentioned in Login with valid and wrong credentials are installed

  • Install minimist for environment variable (baseURL)

  • 2.1. Ensure that Puppeteer is installed and configured for browser automation.

  • 2.2. The chai library should be installed for assertions.

  • 2.3. The test environment should have access to the web application at the specified URLs.

  • 2.4. Valid login credentials should be available for the test.

npm install puppeteer minimist

Test Steps

  • 4.1. Before Hook

    • Launch a new browser instance and open a new page.

  • 4.2. After Hook

    • Close the browser to clean up resources after the test execution.

  • 4.3. Test Case: Login, Submit Prompt, Verify, and Delete

    • Navigate to Login Page

      • Use the page.goto method to navigate to the login page.

    • Perform Login

      • Wait for the email and password input fields to be visible.

      • Enter the email and password credentials.

      • Click the submit button and wait for navigation to complete.

      • Verify successful login by checking the current URL.

    • Submit Prompt

      • Navigate to the prompt page.

      • Enter a title and prompt text.

      • Save and submit the prompt.

    • Verify in My Results

      • Navigate to the "My Results" page.

      • Search for the prompt by title and verify its presence.

    • Delete Prompt

      • Check the prompt's checkbox.

      • Open the actions dropdown and select "Delete."

      • Confirm deletion in the modal.

  • 4.4. Error Handling

    • If an error occurs during the process, capture a screenshot and log the page's HTML content for debugging.

Expected Result

  • 5.1. The test should successfully log in, submit a prompt, verify its presence in "My Results," and delete it without errors.

  • 5.2. Screenshots should be captured for debugging purposes.

Related content

Submit Prompt, and Verify in My Results
Submit Prompt, and Verify in My Results
More like this
Login and User Management Page Visit
Login and User Management Page Visit
More like this
Login with valid and wrong credentials
Login with valid and wrong credentials
More like this
Login with Enter Button
Login with Enter Button
More like this
Submit Prompt, Verify in My Results, and Delete it test case
Submit Prompt, Verify in My Results, and Delete it test case
More like this
Audit Logs Page Visit
Audit Logs Page Visit
More like this