123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- /// <reference types="cypress" />
- import LoginPage from '../../../support/pageObjects/LoginPage';
- import MainPage from '../../../support/pageObjects/MainPage';
- import WorklistPage from '../../../support/pageObjects/WorklistPage';
- describe('Enter Worklist', () => {
- const loginPage = new LoginPage();
- const mainPage = new MainPage();
- const worklistPage = new WorklistPage();
- beforeEach(() => {
- cy.intercept('GET', '/dr/api/v1/auth/study*', {
- statusCode: 200,
- body: {
- "code": "0x000000",
- "description": "Success",
- "solution": "",
- "data": {
- "@type": "type.googleapis.com/dr.study.StudyList",
- "count": 1992,
- "studies": [
- {
- "study_instance_uid": "2.25.156.999999.0000.1.2.2831189249.819691.1757656379.100635",
- "study_id": "20250912135259444",
- "public_study_id": "",
- "specific_character_set": "ISO_IR 192",
- "accession_number": "ACC0012345",
- "ref_physician": "Dr. Smith (Vet)",
- "patient_id": "PET007",
- "patient_name": "乾隆-==皇上",
- "patient_english_name": "Buddy en",
- "patient_former_name": "Buddy f",
- "patient_size": "Large",
- "other_patient_ids": "",
- "other_patient_names": "",
- "patient_age": "5Y",
- "patient_dob": "2025-06-10T03:12:36.181739Z",
- "patient_sex": "M",
- "sex_neutered": "",
- "pregnancy_status": "",
- "patient_state": "",
- "admitting_time": null,
- "priority": "",
- "reg_source": "",
- "study_description": "",
- "study_start_datetime": "2025-09-12T05:52:59.699143Z",
- "study_end_datetime": null,
- "scheduled_procedure_step_start_date": null,
- "performed_physician": "",
- "study_lock": "Unlocked",
- "folder_path": "",
- "operator_name": "OP987",
- "modality": "DX",
- "weight": 25,
- "thickness": 15,
- "length": 60,
- "patient_type": "Human",
- "study_type": "Normal",
- "owner_name": "owner1",
- "chip_number": "CHIP123456789",
- "variety": "Golden Retriever",
- "is_anaesthesia": true,
- "is_sedation": true,
- "mwl": "",
- "is_exported": false,
- "is_edited": false,
- "is_appended": false,
- "department": "",
- "mapped_status": false,
- "qc_result": false,
- "comment": "一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四",
- "study_status": "Arrived",
- "sort": 0,
- "product": "DROS",
- "series": []
- },
- {
- "study_instance_uid": "2.25.156.999999.0000.1.2.2831189249.819691.1757656379.100627",
- "study_id": "20250912135259265",
- "public_study_id": "",
- "specific_character_set": "ISO_IR 192",
- "accession_number": "ACC0012345",
- "ref_physician": "Dr. Smith (Vet)",
- "patient_id": "PET007",
- "patient_name": "Buddy (Dog)",
- "patient_english_name": "Buddy en",
- "patient_former_name": "Buddy f",
- "patient_size": "Large",
- "other_patient_ids": "",
- "other_patient_names": "",
- "patient_age": "5Y",
- "patient_dob": "2025-06-10T03:12:36.181739Z",
- "patient_sex": "M",
- "sex_neutered": "",
- "pregnancy_status": "",
- "patient_state": "",
- "admitting_time": null,
- "priority": "",
- "reg_source": "",
- "study_description": "",
- "study_start_datetime": "2025-09-12T05:52:59.573182Z",
- "study_end_datetime": null,
- "scheduled_procedure_step_start_date": null,
- "performed_physician": "",
- "study_lock": "Unlocked",
- "folder_path": "",
- "operator_name": "OP987",
- "modality": "DX",
- "weight": 25,
- "thickness": 15,
- "length": 60,
- "patient_type": "Human",
- "study_type": "Normal",
- "owner_name": "owner1",
- "chip_number": "CHIP123456789",
- "variety": "Golden Retriever",
- "is_anaesthesia": true,
- "is_sedation": true,
- "mwl": "",
- "is_exported": false,
- "is_edited": false,
- "is_appended": false,
- "department": "",
- "mapped_status": false,
- "qc_result": false,
- "comment": "一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四",
- "study_status": "Arrived",
- "sort": 0,
- "product": "DROS",
- "series": []
- },
- ]
- }
- }
- }).as('getStudyList');
- loginPage.visit();
- loginPage.getUsernameInput().should('be.visible');
- loginPage.getPasswordInput().should('be.visible');
- loginPage.getSubmitButton().should('be.visible');
- });
- it('should navigate to the worklist and verify data', () => {
- loginPage.login('admin', '123456');
- cy.contains('登录成功').should('be.visible', { timeout: 10000 });
- mainPage.clickPatientManagementButton();
- mainPage.clickWorklistButton();
- cy.wait('@getStudyList');
- worklistPage.getTable().should('be.visible');
- worklistPage.getTable().find('tr').should('have.length.at.least', 2); // Assuming there's a header row
- });
- });
|