Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added file metadata tests #265

Open
wants to merge 14 commits into
base: develop
Choose a base branch
from
Open

Conversation

Ramyapatil712
Copy link
Collaborator

@Ramyapatil712 Ramyapatil712 commented Apr 2, 2024

Purpose

Add the following checks to the selenium test automation suite:

  1. First Test: Edit Metadata Tab
  • Title field
  • Description field
  • Resource Type field
  • Resource Language field
  1. Second test: Download
  • Download Metadata Button

Summary of Changes

Added new test_metadata.py - 6 new tests added to verify title, description, resource type and resource language changes, cancel changes funtionality and download functionality
Updated project.py - added new FilesMetadataPage class , and ProjectMetadataPage class
Updated registries.py - updated RegistrationMetadataPage class
Updated osf_api.py — Added 2 new methods get_fake_file_guid and get_existing_file_data
Updated utils.py - Added 3 new methods verify_file_download, latest_download_file and get_guid_from_url

Reviewer's Actions

git fetch <remote> pull/265/head:feature/test_metadata

Run this test using
pytest tests/test_metadata.py -s -v

Testing Changes Moving Forward

N/A

Ticket

https://openscience.atlassian.net/browse/ENG-4276
https://openscience.atlassian.net/browse/ENG-4277

tests/test_metadata.py Outdated Show resolved Hide resolved
api/osf_api.py Outdated Show resolved Hide resolved
tests/test_metadata.py Outdated Show resolved Hide resolved
tests/test_metadata.py Outdated Show resolved Hide resolved
api/osf_api.py Outdated Show resolved Hide resolved
registration_metadata_page.scroll_into_view(
registration_metadata_page.delete_funder_button.element
)
registration_metadata_page.delete_funder_button.click()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Selenium expected condition element_to_be_clickable will be helpful here

project_metadata_page.scroll_into_view(
project_metadata_page.delete_funder_button.element
)
project_metadata_page.delete_funder_button.click()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use a element_to_be_clickable

@cslzchen cslzchen requested review from cslzchen and removed request for felliott May 14, 2024 17:17
utils.py Show resolved Hide resolved
settings.py Show resolved Hide resolved
tests/test_metadata.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@cslzchen cslzchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after you respond to Josh's two comments. Mine are purely style suggestions. 🎆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants