114 lines
4.5 KiB
Gherkin
114 lines
4.5 KiB
Gherkin
Feature: Get Dataset Status Real API Implementation
|
|
As a developer
|
|
I want get_dataset_status to work correctly with real API calls
|
|
So that all code paths are exercised
|
|
|
|
Background:
|
|
Given an authenticated sheets tracker
|
|
|
|
Scenario: Get status with real API call for existing dataset
|
|
Given a sheet with the following datasets
|
|
| Dataset Name | Status | Error |
|
|
| wordnet | NOT STARTED | |
|
|
| yago | IN PROGRESS | |
|
|
When I call get_dataset_status for "wordnet" with real API
|
|
Then it should return status "NOT STARTED"
|
|
And it should return row number 2
|
|
And it should return error as empty string
|
|
|
|
Scenario: Get status for dataset in middle of sheet
|
|
Given a sheet with the following datasets
|
|
| Dataset Name | Status | Error |
|
|
| wordnet | NOT STARTED | |
|
|
| yago | IN PROGRESS | Test error |
|
|
| dbpedia | DONE | |
|
|
When I call get_dataset_status for "yago" with real API
|
|
Then it should return status "IN PROGRESS"
|
|
And it should return row number 3
|
|
And it should return error "Test error"
|
|
|
|
Scenario: Get status for dataset at end of sheet
|
|
Given a sheet with 10 datasets
|
|
And the last dataset is "schema-org" with status "DONE"
|
|
When I call get_dataset_status for "schema-org" with real API
|
|
Then it should return status "DONE"
|
|
And it should return row number 11
|
|
|
|
Scenario: Get status with case-insensitive matching
|
|
Given a sheet with the following datasets
|
|
| Dataset Name | Status | Error |
|
|
| WordNet | NOT STARTED | |
|
|
When I call get_dataset_status for "wordnet" with real API
|
|
Then it should match the dataset
|
|
And it should return status "NOT STARTED"
|
|
|
|
Scenario: Get status with mixed case in sheet
|
|
Given a sheet with the following datasets
|
|
| Dataset Name | Status | Error |
|
|
| FB15k-237 | NOT STARTED | |
|
|
When I call get_dataset_status for "fb15k-237" with real API
|
|
Then it should match the dataset
|
|
And it should return status "NOT STARTED"
|
|
|
|
Scenario: Get status when dataset not in sheet
|
|
Given a sheet with the following datasets
|
|
| Dataset Name | Status | Error |
|
|
| wordnet | NOT STARTED | |
|
|
When I call get_dataset_status for "nonexistent" with real API
|
|
Then it should return status as None
|
|
And it should return error as None
|
|
And it should return row as None
|
|
|
|
Scenario: Get status when sheet has only headers (no data rows)
|
|
Given a sheet with only headers
|
|
| Dataset Name | Status | Error |
|
|
When I call get_dataset_status for "wordnet" with real API
|
|
Then it should return status as None
|
|
And it should return row as None
|
|
|
|
Scenario: Get status when sheet is completely empty
|
|
Given an empty sheet (no headers, no data)
|
|
When I call get_dataset_status for "wordnet" with real API
|
|
Then it should return status as None
|
|
And it should return row as None
|
|
|
|
Scenario: Get status when row is shorter than status_col
|
|
Given a sheet with the following data
|
|
| Dataset Name |
|
|
| wordnet |
|
|
When I call get_dataset_status for "wordnet" with real API
|
|
Then it should return status as None
|
|
And it should return error as None
|
|
And it should return row number 2
|
|
|
|
Scenario: Get status when row is shorter than error_col
|
|
Given a sheet with the following data
|
|
| Dataset Name | Status |
|
|
| wordnet | NOT STARTED |
|
|
When I call get_dataset_status for "wordnet" with real API
|
|
Then it should return status "NOT STARTED"
|
|
And it should return error as None
|
|
And it should return row number 2
|
|
|
|
Scenario: Get status when dataset_name_col is None
|
|
Given a tracker with dataset_name_col set to None
|
|
When I call get_dataset_status for "wordnet" with real API
|
|
Then it should return status as None
|
|
And it should return row as None
|
|
|
|
Scenario: Get status with whitespace in dataset name
|
|
Given a sheet with the following datasets
|
|
| Dataset Name | Status | Error |
|
|
| wordnet | NOT STARTED | |
|
|
When I call get_dataset_status for "wordnet" with real API
|
|
Then it should match after trimming whitespace
|
|
And it should return status "NOT STARTED"
|
|
|
|
Scenario: Get status when API returns values with less than 2 elements
|
|
Given a sheet API that returns empty values array
|
|
When I call get_dataset_status for "wordnet" with real API
|
|
Then it should return status as None
|
|
And it should return row as None
|
|
|
|
|