Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

Version 1 Current »

Prepared by

Test Scenario for

Foivos Polykarpou

Submit Prompt, and Verify in My Results

📄 Overview

Title

Test Name

Objective

Revoke All Sessions Function

revoke.js

Purpose

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

  • 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 https://unicit.atlassian.net/wiki/pages/resumedraft.action?draftId=4068311336&draftShareId=01fcfaec-fd17-412e-ae08-9f2cbfcdefe5 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.

  • 4.4. Error Handling

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

(thumbs up) Expected Result

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

  • 5.2. Screenshots should be captured for debugging purposes.

  • No labels