diff --git a/tests/cypress/e2e/actions_objects/count_objects.js b/tests/cypress/e2e/actions_objects/count_objects.js index 15264806a2f9..8d8b7aeea6f0 100644 --- a/tests/cypress/e2e/actions_objects/count_objects.js +++ b/tests/cypress/e2e/actions_objects/count_objects.js @@ -22,7 +22,7 @@ context('Count total annotation, issues and labels', () => { const serverFiles = ['images/image_1.jpg']; before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); cy.url().should('contain', '/tasks'); cy.headlessCreateTask({ diff --git a/tests/cypress/e2e/actions_objects/regression_tests.js b/tests/cypress/e2e/actions_objects/regression_tests.js index 9ae799d6c395..f416d50e3e22 100644 --- a/tests/cypress/e2e/actions_objects/regression_tests.js +++ b/tests/cypress/e2e/actions_objects/regression_tests.js @@ -35,7 +35,7 @@ context('Regression tests', () => { }; before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); cy.headlessCreateTask(taskPayload, dataPayload).then((response) => { diff --git a/tests/cypress/e2e/actions_projects_models/case_114_backup_restore_project.js b/tests/cypress/e2e/actions_projects_models/case_114_backup_restore_project.js index 998e2584dd50..f697069f2509 100644 --- a/tests/cypress/e2e/actions_projects_models/case_114_backup_restore_project.js +++ b/tests/cypress/e2e/actions_projects_models/case_114_backup_restore_project.js @@ -53,7 +53,7 @@ context('Backup, restore a project.', { browser: '!firefox' }, () => { }; before(() => { - cy.visit('/'); + cy.visit('/auth/login'); cy.login(); cy.imageGenerator(imagesFolder, imageFileName, width, height, color, posX, posY, project.label, imagesCount); cy.createZipArchive(directoryToArchive, archivePath); diff --git a/tests/cypress/e2e/actions_projects_models/case_116_creating_project_by_inserting_labels_from_task.js b/tests/cypress/e2e/actions_projects_models/case_116_creating_project_by_inserting_labels_from_task.js index 697926e9bd31..5c81f76e6e87 100644 --- a/tests/cypress/e2e/actions_projects_models/case_116_creating_project_by_inserting_labels_from_task.js +++ b/tests/cypress/e2e/actions_projects_models/case_116_creating_project_by_inserting_labels_from_task.js @@ -30,7 +30,7 @@ context('Creating a project by inserting labels from a task.', { browser: '!fire const directoryToArchive = imagesFolder; before(() => { - cy.visit('/'); + cy.visit('/auth/login'); cy.login(); cy.imageGenerator(imagesFolder, imageFileName, width, height, color, posX, posY, task.name, imagesCount); cy.createZipArchive(directoryToArchive, archivePath); diff --git a/tests/cypress/e2e/actions_projects_models/case_117_backup_restore_project_to_various_storages.js b/tests/cypress/e2e/actions_projects_models/case_117_backup_restore_project_to_various_storages.js index ef5449679528..a6b9b5fbf5c6 100644 --- a/tests/cypress/e2e/actions_projects_models/case_117_backup_restore_project_to_various_storages.js +++ b/tests/cypress/e2e/actions_projects_models/case_117_backup_restore_project_to_various_storages.js @@ -86,7 +86,7 @@ context('Tests source & target storage for backups.', () => { } before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); createdCloudStorageId = cy.attachS3Bucket(cloudStorageData); cy.imageGenerator(imagesFolder, imageFileName, width, height, color, posX, posY, labelName, imagesCount); diff --git a/tests/cypress/e2e/actions_projects_models/case_94_move_task_between_projects.js b/tests/cypress/e2e/actions_projects_models/case_94_move_task_between_projects.js index 7769597d1065..fab4fc692e4e 100644 --- a/tests/cypress/e2e/actions_projects_models/case_94_move_task_between_projects.js +++ b/tests/cypress/e2e/actions_projects_models/case_94_move_task_between_projects.js @@ -58,7 +58,7 @@ context('Move a task between projects.', () => { imagesCount, ); cy.createZipArchive(directoryToArchive, archivePath); - cy.visit('/'); + cy.visit('/auth/login'); cy.login(); }); diff --git a/tests/cypress/e2e/actions_projects_models/case_95_move_task_to_project.js b/tests/cypress/e2e/actions_projects_models/case_95_move_task_to_project.js index 537d11eed89a..3c3901fd48f7 100644 --- a/tests/cypress/e2e/actions_projects_models/case_95_move_task_to_project.js +++ b/tests/cypress/e2e/actions_projects_models/case_95_move_task_to_project.js @@ -45,7 +45,7 @@ context('Move a task to a project.', { browser: '!firefox' }, () => { const directoryToArchive = imagesFolder; before(() => { - cy.visit('/'); + cy.visit('/auth/login'); cy.login(); cy.imageGenerator(imagesFolder, imageFileName, width, height, color, posX, posY, task.name, imagesCount); cy.createZipArchive(directoryToArchive, archivePath); diff --git a/tests/cypress/e2e/actions_projects_models/case_98_models_page.js b/tests/cypress/e2e/actions_projects_models/case_98_models_page.js index 2243e9b1415d..75fdf3a7dedc 100644 --- a/tests/cypress/e2e/actions_projects_models/case_98_models_page.js +++ b/tests/cypress/e2e/actions_projects_models/case_98_models_page.js @@ -8,7 +8,7 @@ context('Models page.', () => { const caseId = '51'; before(() => { - cy.visit('/'); + cy.visit('/auth/login'); cy.login(); }); diff --git a/tests/cypress/e2e/actions_projects_models/markdown_base_pipeline.js b/tests/cypress/e2e/actions_projects_models/markdown_base_pipeline.js index bbe3603f2a17..a906fb41744e 100644 --- a/tests/cypress/e2e/actions_projects_models/markdown_base_pipeline.js +++ b/tests/cypress/e2e/actions_projects_models/markdown_base_pipeline.js @@ -39,12 +39,12 @@ context('Basic markdown pipeline', () => { let assetID = null; before(() => { - cy.visit('/'); + cy.headlessLogout(); + cy.visit('/auth/login'); cy.get('.cvat-login-form-wrapper').should('exist').and('be.visible'); for (const user of Object.values(additionalUsers)) { cy.headlessCreateUser(user); - cy.headlessLogout(); } cy.login(); diff --git a/tests/cypress/e2e/actions_tasks/case_117_paste_labels_from_another_task.js b/tests/cypress/e2e/actions_tasks/case_117_paste_labels_from_another_task.js index 12387a05b29f..448b66adc96a 100644 --- a/tests/cypress/e2e/actions_tasks/case_117_paste_labels_from_another_task.js +++ b/tests/cypress/e2e/actions_tasks/case_117_paste_labels_from_another_task.js @@ -32,7 +32,7 @@ context('Paste labels from one task to another.', { browser: '!firefox' }, () => const directoryToArchive = imagesFolder; before(() => { - cy.visit('/'); + cy.visit('/auth/login'); cy.login(); cy.imageGenerator(imagesFolder, imageFileName, width, height, color, posX, posY, task.name, imagesCount); cy.createZipArchive(directoryToArchive, archivePath); diff --git a/tests/cypress/e2e/actions_tasks/case_58_task_label_deleting_feature.js b/tests/cypress/e2e/actions_tasks/case_58_task_label_deleting_feature.js index e070b83f0a9d..8201e878a71a 100644 --- a/tests/cypress/e2e/actions_tasks/case_58_task_label_deleting_feature.js +++ b/tests/cypress/e2e/actions_tasks/case_58_task_label_deleting_feature.js @@ -23,7 +23,7 @@ context('Delete a label from a task.', () => { const directoryToArchive = imagesFolder; before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); cy.imageGenerator(imagesFolder, imageFileName, width, height, color, posX, posY, labelName, imagesCount); cy.createZipArchive(directoryToArchive, archivePath); diff --git a/tests/cypress/e2e/actions_tasks/case_61_create_task_set_issue_tracker.js b/tests/cypress/e2e/actions_tasks/case_61_create_task_set_issue_tracker.js index ac14ee815684..e6dc40fc8da0 100644 --- a/tests/cypress/e2e/actions_tasks/case_61_create_task_set_issue_tracker.js +++ b/tests/cypress/e2e/actions_tasks/case_61_create_task_set_issue_tracker.js @@ -24,7 +24,7 @@ context('Create a task with set an issue tracker.', () => { const incorrectBugTrackerUrl = 'somebugtracker.info/task12'; before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); cy.imageGenerator(imagesFolder, imageFileName, width, height, color, posX, posY, labelName, imagesCount); cy.createZipArchive(directoryToArchive, archivePath); diff --git a/tests/cypress/e2e/actions_tasks/case_65_create_task_with_manifest.js b/tests/cypress/e2e/actions_tasks/case_65_create_task_with_manifest.js index a9c1168422f9..e137b752b808 100644 --- a/tests/cypress/e2e/actions_tasks/case_65_create_task_with_manifest.js +++ b/tests/cypress/e2e/actions_tasks/case_65_create_task_with_manifest.js @@ -20,7 +20,7 @@ context('Create an annotation task with manifest.', () => { ]; before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); }); diff --git a/tests/cypress/e2e/actions_tasks/case_66_rename_label_raw_editor.js b/tests/cypress/e2e/actions_tasks/case_66_rename_label_raw_editor.js index 30d7b1801306..b09915c612df 100644 --- a/tests/cypress/e2e/actions_tasks/case_66_rename_label_raw_editor.js +++ b/tests/cypress/e2e/actions_tasks/case_66_rename_label_raw_editor.js @@ -39,7 +39,7 @@ context('Rename a label via raw editor.', () => { } before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); cy.imageGenerator(imagesFolder, imageFileName, width, height, color, posX, posY, labelName, imagesCount); cy.createZipArchive(directoryToArchive, archivePath); diff --git a/tests/cypress/e2e/actions_tasks/case_72_hotkeys_change_labels.js b/tests/cypress/e2e/actions_tasks/case_72_hotkeys_change_labels.js index 68c2f4ddf577..b9bb01f1d1f4 100644 --- a/tests/cypress/e2e/actions_tasks/case_72_hotkeys_change_labels.js +++ b/tests/cypress/e2e/actions_tasks/case_72_hotkeys_change_labels.js @@ -50,7 +50,7 @@ context('Hotkeys to change labels feature.', () => { } before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); cy.imageGenerator(imagesFolder, imageFileName, width, height, color, posX, posY, labelName, imagesCount); cy.createZipArchive(directoryToArchive, archivePath); diff --git a/tests/cypress/e2e/actions_tasks/case_75_overlap_size.js b/tests/cypress/e2e/actions_tasks/case_75_overlap_size.js index 3b082ad37ce1..5cce656f45d7 100644 --- a/tests/cypress/e2e/actions_tasks/case_75_overlap_size.js +++ b/tests/cypress/e2e/actions_tasks/case_75_overlap_size.js @@ -29,7 +29,7 @@ context('Overlap size.', () => { const calculatedOverlapSize = advancedConfigurationParams.segmentSize - advancedConfigurationParams.overlapSize; before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); cy.imageGenerator(imagesFolder, imageFileName, width, height, color, posX, posY, labelName, imagesCount); cy.createZipArchive(directoryToArchive, archivePath); diff --git a/tests/cypress/e2e/actions_tasks/issue_2473_import_annotations_frames_dots_in_name.js b/tests/cypress/e2e/actions_tasks/issue_2473_import_annotations_frames_dots_in_name.js index 250ac411d3ac..bde27c04a534 100644 --- a/tests/cypress/e2e/actions_tasks/issue_2473_import_annotations_frames_dots_in_name.js +++ b/tests/cypress/e2e/actions_tasks/issue_2473_import_annotations_frames_dots_in_name.js @@ -61,7 +61,7 @@ context('Import annotations for frames with dots in name.', { browser: '!firefox } before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); cy.imageGenerator(imagesFolder, imageFileName, width, height, color, posX, posY, labelName, imagesCount); cy.createZipArchive(directoryToArchive, archivePath); diff --git a/tests/cypress/e2e/actions_tasks/navigate_specific_frame.js b/tests/cypress/e2e/actions_tasks/navigate_specific_frame.js index ea34133eebd4..d2114b701478 100644 --- a/tests/cypress/e2e/actions_tasks/navigate_specific_frame.js +++ b/tests/cypress/e2e/actions_tasks/navigate_specific_frame.js @@ -25,7 +25,7 @@ context('Paste labels from one task to another.', { browser: '!firefox' }, () => const directoryToArchive = imagesFolder; before(() => { - cy.visit('/'); + cy.visit('/auth/login'); cy.login(); cy.imageGenerator(imagesFolder, imageFileName, width, height, color, posX, posY, task.name, imagesCount); cy.createZipArchive(directoryToArchive, archivePath); diff --git a/tests/cypress/e2e/actions_tasks/task_changes_status_after_initial_save.js b/tests/cypress/e2e/actions_tasks/task_changes_status_after_initial_save.js index e56637ca1a10..d17f46839e05 100644 --- a/tests/cypress/e2e/actions_tasks/task_changes_status_after_initial_save.js +++ b/tests/cypress/e2e/actions_tasks/task_changes_status_after_initial_save.js @@ -24,7 +24,7 @@ context('Task status updated after initial save.', () => { before(() => { cy.headlessLogout(); - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); cy.url().should('contain', '/tasks'); cy.headlessCreateTask({ diff --git a/tests/cypress/e2e/actions_tasks/task_rectangles_only.js b/tests/cypress/e2e/actions_tasks/task_rectangles_only.js index c54aff866f32..9b4b4f2140ee 100644 --- a/tests/cypress/e2e/actions_tasks/task_rectangles_only.js +++ b/tests/cypress/e2e/actions_tasks/task_rectangles_only.js @@ -25,7 +25,7 @@ context('Creating a task with only bounding boxes', () => { let taskID = null; before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); cy.imageGenerator( imagesFolder, diff --git a/tests/cypress/e2e/actions_tasks2/case_101_opencv_basic_actions.js b/tests/cypress/e2e/actions_tasks2/case_101_opencv_basic_actions.js index fd904b7e0ee4..7bc31535b437 100644 --- a/tests/cypress/e2e/actions_tasks2/case_101_opencv_basic_actions.js +++ b/tests/cypress/e2e/actions_tasks2/case_101_opencv_basic_actions.js @@ -69,7 +69,7 @@ context('OpenCV. Intelligent scissors. Histogram Equalization. TrackerMIL.', () const extension = 'jpg'; before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); for (let i = 0; i < imagesCount; i++) { cy.imageGenerator(imagesFolder, imageFileName + i, width, height, color, posX + i * 5, diff --git a/tests/cypress/e2e/actions_tasks2/case_111_settings_text_size_position_label_content.js b/tests/cypress/e2e/actions_tasks2/case_111_settings_text_size_position_label_content.js index 34c67f50fcb5..b30d7b185ca9 100644 --- a/tests/cypress/e2e/actions_tasks2/case_111_settings_text_size_position_label_content.js +++ b/tests/cypress/e2e/actions_tasks2/case_111_settings_text_size_position_label_content.js @@ -138,7 +138,7 @@ context('Settings. Text size/position. Text labels content.', () => { } before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); cy.get('.cvat-tasks-page').should('exist').and('be.visible'); diff --git a/tests/cypress/e2e/actions_tasks2/case_40_create_task_without_necessary_arguments.js b/tests/cypress/e2e/actions_tasks2/case_40_create_task_without_necessary_arguments.js index a09507ad46a4..df47eb2a7b22 100644 --- a/tests/cypress/e2e/actions_tasks2/case_40_create_task_without_necessary_arguments.js +++ b/tests/cypress/e2e/actions_tasks2/case_40_create_task_without_necessary_arguments.js @@ -22,7 +22,7 @@ context('Try to create a task without necessary arguments.', () => { const directoryToArchive = imagesFolder; before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); cy.imageGenerator(imagesFolder, imageFileName, width, height, color, posX, posY, labelName, imagesCount); cy.createZipArchive(directoryToArchive, archivePath); diff --git a/tests/cypress/e2e/actions_tasks2/case_41_add_delete_label_attribute.js b/tests/cypress/e2e/actions_tasks2/case_41_add_delete_label_attribute.js index c33d1ff507f9..eb5ff571c4dc 100644 --- a/tests/cypress/e2e/actions_tasks2/case_41_add_delete_label_attribute.js +++ b/tests/cypress/e2e/actions_tasks2/case_41_add_delete_label_attribute.js @@ -11,7 +11,7 @@ context('Add/delete labels and attributes.', () => { const textDefaultValue = 'Some default value for type Text'; before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); cy.get('.cvat-create-task-dropdown').click(); cy.get('.cvat-create-task-button').click(); diff --git a/tests/cypress/e2e/actions_tasks2/case_42_change_label_name_via_label_constructor.js b/tests/cypress/e2e/actions_tasks2/case_42_change_label_name_via_label_constructor.js index f77b62c9a9d8..09da7bce007f 100644 --- a/tests/cypress/e2e/actions_tasks2/case_42_change_label_name_via_label_constructor.js +++ b/tests/cypress/e2e/actions_tasks2/case_42_change_label_name_via_label_constructor.js @@ -11,7 +11,7 @@ context('Changing a label name via label constructor.', () => { const secondLabelName = `Second case ${caseId}`; before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); cy.get('.cvat-create-task-dropdown').click(); cy.get('.cvat-create-task-button').click(); diff --git a/tests/cypress/e2e/actions_tasks2/case_97_export_import_task.js b/tests/cypress/e2e/actions_tasks2/case_97_export_import_task.js index a12573418edb..f5bc727e19eb 100644 --- a/tests/cypress/e2e/actions_tasks2/case_97_export_import_task.js +++ b/tests/cypress/e2e/actions_tasks2/case_97_export_import_task.js @@ -38,7 +38,7 @@ context('Export, import an annotation task.', { browser: '!firefox' }, () => { }; before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); cy.imageGenerator(imagesFolder, imageFileName, width, height, color, posX, posY, labelName, imagesCount); cy.createZipArchive(directoryToArchive, archivePath); diff --git a/tests/cypress/e2e/actions_tasks2/fit_image_different_res.js b/tests/cypress/e2e/actions_tasks2/fit_image_different_res.js index 76826690f9f8..ca15fdfc4284 100644 --- a/tests/cypress/e2e/actions_tasks2/fit_image_different_res.js +++ b/tests/cypress/e2e/actions_tasks2/fit_image_different_res.js @@ -12,7 +12,7 @@ context('Correct behaviour of fit when navigating between frames with different let jobID = null; before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); cy.url().should('contain', '/tasks'); cy.headlessCreateTask({ diff --git a/tests/cypress/e2e/actions_tasks3/case_105_cloud_storage.js b/tests/cypress/e2e/actions_tasks3/case_105_cloud_storage.js index ea8ee3fdd6f1..72dc79a35a11 100644 --- a/tests/cypress/e2e/actions_tasks3/case_105_cloud_storage.js +++ b/tests/cypress/e2e/actions_tasks3/case_105_cloud_storage.js @@ -32,7 +32,7 @@ context('Cloud storage.', () => { }; before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); }); diff --git a/tests/cypress/e2e/actions_tasks3/case_107_connected_file_share.js b/tests/cypress/e2e/actions_tasks3/case_107_connected_file_share.js index f0eae8cf159d..e70fe10e5a1e 100644 --- a/tests/cypress/e2e/actions_tasks3/case_107_connected_file_share.js +++ b/tests/cypress/e2e/actions_tasks3/case_107_connected_file_share.js @@ -24,7 +24,7 @@ context('Connected file share.', () => { } before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); }); diff --git a/tests/cypress/e2e/actions_tasks3/case_109_dummy_cloud_storage.js b/tests/cypress/e2e/actions_tasks3/case_109_dummy_cloud_storage.js index 996e98ffd368..d5bc848da514 100644 --- a/tests/cypress/e2e/actions_tasks3/case_109_dummy_cloud_storage.js +++ b/tests/cypress/e2e/actions_tasks3/case_109_dummy_cloud_storage.js @@ -87,7 +87,7 @@ context('Dummy cloud storages.', { browser: '!firefox' }, () => { } before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); }); beforeEach(() => { diff --git a/tests/cypress/e2e/actions_tasks3/case_112_tus_upload.js b/tests/cypress/e2e/actions_tasks3/case_112_tus_upload.js index 87b16bf88f47..14002d4852f9 100644 --- a/tests/cypress/e2e/actions_tasks3/case_112_tus_upload.js +++ b/tests/cypress/e2e/actions_tasks3/case_112_tus_upload.js @@ -25,7 +25,7 @@ context('Create task with tus file', () => { const extension = 'bmp'; before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); cy.imageGenerator(imagesFolder, imageFileName, width, height, color, posX, posY, labelName, imagesCount, extension); diff --git a/tests/cypress/e2e/actions_tasks3/case_113_use_default_project_storage_for_import_export_annotations.js b/tests/cypress/e2e/actions_tasks3/case_113_use_default_project_storage_for_import_export_annotations.js index 1bdb86f42b0c..d49920bcda5d 100644 --- a/tests/cypress/e2e/actions_tasks3/case_113_use_default_project_storage_for_import_export_annotations.js +++ b/tests/cypress/e2e/actions_tasks3/case_113_use_default_project_storage_for_import_export_annotations.js @@ -91,7 +91,7 @@ context('Tests for source and target storage.', () => { }; before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); createdCloudStorageId = cy.attachS3Bucket(cloudStorageData); cy.imageGenerator(imagesFolder, imageFileName, width, height, color, posX, posY, labelName, imagesCount); diff --git a/tests/cypress/e2e/actions_tasks3/case_114_use_default_task_storage_for_import_export_annotations.js b/tests/cypress/e2e/actions_tasks3/case_114_use_default_task_storage_for_import_export_annotations.js index b883376f602e..7e4448723795 100644 --- a/tests/cypress/e2e/actions_tasks3/case_114_use_default_task_storage_for_import_export_annotations.js +++ b/tests/cypress/e2e/actions_tasks3/case_114_use_default_task_storage_for_import_export_annotations.js @@ -92,7 +92,7 @@ context('Tests for source and target storage.', () => { }; before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); createdCloudStorageId = cy.attachS3Bucket(cloudStorageData); cy.imageGenerator(imagesFolder, imageFileName, width, height, color, posX, posY, labelName, imagesCount); diff --git a/tests/cypress/e2e/actions_tasks3/case_115_use_custom_storage_for_import_export_annotations.js b/tests/cypress/e2e/actions_tasks3/case_115_use_custom_storage_for_import_export_annotations.js index 0f955a231acd..6ff14f944add 100644 --- a/tests/cypress/e2e/actions_tasks3/case_115_use_custom_storage_for_import_export_annotations.js +++ b/tests/cypress/e2e/actions_tasks3/case_115_use_custom_storage_for_import_export_annotations.js @@ -62,7 +62,7 @@ context('Import and export annotations: specify source and target storage in mod }; before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); createdCloudStorageId = cy.attachS3Bucket(cloudStorageData); cy.imageGenerator(imagesFolder, imageFileName, width, height, color, posX, posY, labelName, imagesCount); diff --git a/tests/cypress/e2e/actions_tasks3/case_118_multi_tasks.js b/tests/cypress/e2e/actions_tasks3/case_118_multi_tasks.js index 22ec596925c1..06308fffcd97 100644 --- a/tests/cypress/e2e/actions_tasks3/case_118_multi_tasks.js +++ b/tests/cypress/e2e/actions_tasks3/case_118_multi_tasks.js @@ -44,7 +44,7 @@ context('Create mutli tasks.', () => { } before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); }); diff --git a/tests/cypress/e2e/actions_tasks3/case_1_create_delete_task_label_color.js b/tests/cypress/e2e/actions_tasks3/case_1_create_delete_task_label_color.js index 135bbd4a8522..24c74e6658be 100644 --- a/tests/cypress/e2e/actions_tasks3/case_1_create_delete_task_label_color.js +++ b/tests/cypress/e2e/actions_tasks3/case_1_create_delete_task_label_color.js @@ -25,7 +25,7 @@ context('Create and delete a annotation task. Color collision.', () => { const newLabelName = 'adia'; before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); cy.imageGenerator(imagesFolder, imageFileName, width, height, color, posX, posY, labelName, imagesCount); cy.createZipArchive(directoryToArchive, archivePath); diff --git a/tests/cypress/e2e/actions_tasks3/case_3_task_start_stop_step_frame.js b/tests/cypress/e2e/actions_tasks3/case_3_task_start_stop_step_frame.js index b4b1cc8da82a..b747f116594c 100644 --- a/tests/cypress/e2e/actions_tasks3/case_3_task_start_stop_step_frame.js +++ b/tests/cypress/e2e/actions_tasks3/case_3_task_start_stop_step_frame.js @@ -30,7 +30,7 @@ context('Check if parameters "startFrame", "stopFrame", "frameStep" works as exp }; before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); cy.imageGenerator(imagesFolder, imageFileName, width, height, color, posX, posY, labelName, imagesCount); cy.createZipArchive(directoryToArchive, archivePath); diff --git a/tests/cypress/e2e/actions_tasks3/case_46_create_task_with_files_from_remote_sources.js b/tests/cypress/e2e/actions_tasks3/case_46_create_task_with_files_from_remote_sources.js index 5b50eb5adc49..36e816b28a7d 100644 --- a/tests/cypress/e2e/actions_tasks3/case_46_create_task_with_files_from_remote_sources.js +++ b/tests/cypress/e2e/actions_tasks3/case_46_create_task_with_files_from_remote_sources.js @@ -14,7 +14,7 @@ context('Create a task with files from remote sources.', () => { const correctUrl = wrongUrl.replace('cvatt.jpg', 'cvat.jpg'); before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); cy.get('.cvat-create-task-dropdown').click(); cy.get('.cvat-create-task-button').click(); diff --git a/tests/cypress/e2e/actions_tasks3/case_90_context_image.js b/tests/cypress/e2e/actions_tasks3/case_90_context_image.js index a00217d9eb8c..de90046d0bec 100644 --- a/tests/cypress/e2e/actions_tasks3/case_90_context_image.js +++ b/tests/cypress/e2e/actions_tasks3/case_90_context_image.js @@ -14,7 +14,7 @@ context('Context images for 2D tasks.', () => { const pathToArchive = `../../${__dirname}/assets/case_90/case_90_context_image.zip`; before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); cy.createAnnotationTask(taskName, labelName, attrName, textDefaultValue, pathToArchive); cy.openTaskJob(taskName); diff --git a/tests/cypress/e2e/actions_tasks3/issue_6528_upload_filename_special_character.js b/tests/cypress/e2e/actions_tasks3/issue_6528_upload_filename_special_character.js index 553608cdc801..ab87a425b7ee 100644 --- a/tests/cypress/e2e/actions_tasks3/issue_6528_upload_filename_special_character.js +++ b/tests/cypress/e2e/actions_tasks3/issue_6528_upload_filename_special_character.js @@ -25,7 +25,7 @@ context('Create task with special character in uploaded filename', () => { const extension = 'bmp'; before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); cy.imageGenerator(imagesFolder, imageFileName, width, height, color, posX, posY, labelName, imagesCount, extension); diff --git a/tests/cypress/e2e/actions_users/case_73_reset_password_notification.js b/tests/cypress/e2e/actions_users/case_73_reset_password_notification.js index 484ad260a47f..ca33dc98aa29 100644 --- a/tests/cypress/e2e/actions_users/case_73_reset_password_notification.js +++ b/tests/cypress/e2e/actions_users/case_73_reset_password_notification.js @@ -9,7 +9,7 @@ context('Reset password notification.', () => { const dummyEmail = 'admin@local.local'; before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); }); describe(`Testing case "${caseId}"`, () => { diff --git a/tests/cypress/e2e/actions_users/issue_1810_login_logout.js b/tests/cypress/e2e/actions_users/issue_1810_login_logout.js index 74affc1c974c..4d22eca81de7 100644 --- a/tests/cypress/e2e/actions_users/issue_1810_login_logout.js +++ b/tests/cypress/e2e/actions_users/issue_1810_login_logout.js @@ -21,7 +21,7 @@ context('When clicking on the Logout button, get the user session closed.', () = before(() => { cy.headlessLogout(); - cy.visit('auth/login'); + cy.visit('/auth/login'); }); describe(`Testing issue "${issueId}"`, () => { diff --git a/tests/cypress/e2e/actions_users/issue_2524_2633_issue_not_reset_after_change_task_issue_point_firefox.js b/tests/cypress/e2e/actions_users/issue_2524_2633_issue_not_reset_after_change_task_issue_point_firefox.js index 3eb1ba25dfc4..0156896156b4 100644 --- a/tests/cypress/e2e/actions_users/issue_2524_2633_issue_not_reset_after_change_task_issue_point_firefox.js +++ b/tests/cypress/e2e/actions_users/issue_2524_2633_issue_not_reset_after_change_task_issue_point_firefox.js @@ -43,7 +43,7 @@ context('Some parts of the Redux state (issues) is not reset after changing a ta before(() => { cy.imageGenerator(imagesFolder, imageFileName, width, height, color, posX, posY, labelName, imagesCount); cy.createZipArchive(directoryToArchive, archivePath); - cy.visit('/'); + cy.visit('/auth/login'); cy.login(); cy.createAnnotationTask(taskName.firstTaskName, labelName, attrName, textDefaultValue, archiveName); cy.goToTaskList(); diff --git a/tests/cypress/e2e/actions_users/registration_involved/case_28_review_pipeline_feature.js b/tests/cypress/e2e/actions_users/registration_involved/case_28_review_pipeline_feature.js index 996c453af53c..50a4cefb5234 100644 --- a/tests/cypress/e2e/actions_users/registration_involved/case_28_review_pipeline_feature.js +++ b/tests/cypress/e2e/actions_users/registration_involved/case_28_review_pipeline_feature.js @@ -57,15 +57,12 @@ context('Review pipeline feature', () => { before(() => { cy.headlessLogout(); - - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.get('.cvat-login-form-wrapper').should('exist').and('be.visible'); // register additional users - cy.headlessLogout(); for (const user of Object.values(additionalUsers)) { cy.headlessCreateUser(user); - cy.headlessLogout(); } // create main task diff --git a/tests/cypress/e2e/auth_page.js b/tests/cypress/e2e/auth_page.js index 3d21a2fdaf84..a9d0d51b74a2 100644 --- a/tests/cypress/e2e/auth_page.js +++ b/tests/cypress/e2e/auth_page.js @@ -1,27 +1,21 @@ // Copyright (C) 2020-2022 Intel Corporation +// Copyright (C) CVAT.ai Corporation // // SPDX-License-Identifier: MIT /// -describe('Check server availability', () => { - it('Server web interface is available', () => { - cy.visit('/'); +describe('Auth page cases', () => { + before(() => { + cy.headlessLogout(); }); - it('"/auth/login" contains in the URL', () => { + it('Admin can login on the server using valid credentials', () => { + cy.visit('/'); cy.url().should('include', '/auth/login'); - }); - - it('Check placeholder "Username"', () => { cy.get('#credential').type(Cypress.env('user')); - }); - - it('Check placeholder "Password"', () => { cy.get('#password').type(Cypress.env('password')); - }); - - it('Click to "Sign in" button', () => { cy.get('[type="submit"]').click(); + cy.get('.cvat-tasks-page').should('exist').and('be.visible'); }); }); diff --git a/tests/cypress/e2e/features/analytics_pipeline.js b/tests/cypress/e2e/features/analytics_pipeline.js index 000249419044..d31824ade39e 100644 --- a/tests/cypress/e2e/features/analytics_pipeline.js +++ b/tests/cypress/e2e/features/analytics_pipeline.js @@ -95,7 +95,7 @@ context('Analytics pipeline', () => { } before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); cy.get('.cvat-tasks-page').should('exist').and('be.visible'); }); diff --git a/tests/cypress/e2e/features/annotations_actions.js b/tests/cypress/e2e/features/annotations_actions.js index c8cbc1a701d4..512d14ee6d7a 100644 --- a/tests/cypress/e2e/features/annotations_actions.js +++ b/tests/cypress/e2e/features/annotations_actions.js @@ -37,7 +37,7 @@ context('Testing annotations actions workflow', () => { }; before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); cy.headlessCreateTask(taskPayload, dataPayload).then((response) => { diff --git a/tests/cypress/e2e/features/case_113_new_organization_pipeline.js b/tests/cypress/e2e/features/case_113_new_organization_pipeline.js index dce6bd93df9e..98c3ebd9a869 100644 --- a/tests/cypress/e2e/features/case_113_new_organization_pipeline.js +++ b/tests/cypress/e2e/features/case_113_new_organization_pipeline.js @@ -86,7 +86,7 @@ context('New organization pipeline.', () => { } before(() => { - cy.visit('/'); + cy.visit('/auth/login'); cy.login(); cy.imageGenerator( imagesFolder, diff --git a/tests/cypress/e2e/features/ground_truth_jobs.js b/tests/cypress/e2e/features/ground_truth_jobs.js index 1cba379b62f1..f5260ddf9ed9 100644 --- a/tests/cypress/e2e/features/ground_truth_jobs.js +++ b/tests/cypress/e2e/features/ground_truth_jobs.js @@ -120,7 +120,7 @@ context('Ground truth jobs', () => { } before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); }); diff --git a/tests/cypress/e2e/features/masks_basics.js b/tests/cypress/e2e/features/masks_basics.js index ae257bfc7592..749160e254db 100644 --- a/tests/cypress/e2e/features/masks_basics.js +++ b/tests/cypress/e2e/features/masks_basics.js @@ -37,7 +37,7 @@ context('Manipulations with masks', { scrollBehavior: false }, () => { let jobID = null; before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); cy.headlessCreateTask({ labels: [{ name: 'mask label', attributes: [], type: 'any' }], diff --git a/tests/cypress/e2e/features/shortcuts.js b/tests/cypress/e2e/features/shortcuts.js index 15f19f5b9c66..be27d828f8b8 100644 --- a/tests/cypress/e2e/features/shortcuts.js +++ b/tests/cypress/e2e/features/shortcuts.js @@ -57,7 +57,7 @@ context('Customizable Shortcuts', () => { }; before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); cy.get('.cvat-tasks-page').should('exist').and('be.visible'); cy.url().should('contain', '/tasks'); diff --git a/tests/cypress/e2e/features/single_object_annotation.js b/tests/cypress/e2e/features/single_object_annotation.js index 6698c1e90a25..b0017e375be8 100644 --- a/tests/cypress/e2e/features/single_object_annotation.js +++ b/tests/cypress/e2e/features/single_object_annotation.js @@ -115,7 +115,7 @@ context('Single object annotation mode', { scrollBehavior: false }, () => { } before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); cy.headlessCreateTask({ labels: [ diff --git a/tests/cypress/e2e/features/skeletons_pipeline.js b/tests/cypress/e2e/features/skeletons_pipeline.js index e3b686697875..4cc89331d309 100644 --- a/tests/cypress/e2e/features/skeletons_pipeline.js +++ b/tests/cypress/e2e/features/skeletons_pipeline.js @@ -37,7 +37,7 @@ context('Manipulations with skeletons', { scrollBehavior: false }, () => { let taskID = null; before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); cy.imageGenerator( imagesFolder, diff --git a/tests/cypress/e2e/features/slice_join.js b/tests/cypress/e2e/features/slice_join.js index a99db242ed2e..e14720835712 100644 --- a/tests/cypress/e2e/features/slice_join.js +++ b/tests/cypress/e2e/features/slice_join.js @@ -47,7 +47,7 @@ context('Slice and join tools', { scrollBehavior: false }, () => { let jobID = null; before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); cy.headlessCreateTask({ labels: [ diff --git a/tests/cypress/e2e/features/webhooks.js b/tests/cypress/e2e/features/webhooks.js index ded13994b0ac..de5cdb53c0e4 100644 --- a/tests/cypress/e2e/features/webhooks.js +++ b/tests/cypress/e2e/features/webhooks.js @@ -48,7 +48,7 @@ context('Webhooks pipeline.', () => { }; before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); cy.createOrganization(organizationParams); cy.visit('/projects'); diff --git a/tests/cypress/e2e/issues_prs/issue_2411_deleting_attributes.js b/tests/cypress/e2e/issues_prs/issue_2411_deleting_attributes.js index 7ce74c94d474..beb7f55d4e74 100644 --- a/tests/cypress/e2e/issues_prs/issue_2411_deleting_attributes.js +++ b/tests/cypress/e2e/issues_prs/issue_2411_deleting_attributes.js @@ -35,7 +35,7 @@ context('Wrong attribute is removed in label constructor.', () => { ]; before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); }); diff --git a/tests/cypress/e2e/issues_prs/issue_2661_displaying_attached_files_when_creating_task.js b/tests/cypress/e2e/issues_prs/issue_2661_displaying_attached_files_when_creating_task.js index 39c4c4fa988a..73e4bb1f8a0b 100644 --- a/tests/cypress/e2e/issues_prs/issue_2661_displaying_attached_files_when_creating_task.js +++ b/tests/cypress/e2e/issues_prs/issue_2661_displaying_attached_files_when_creating_task.js @@ -24,7 +24,7 @@ context('Displaying attached files when creating a task.', () => { } before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); cy.imageGenerator(imagesFolder, imageFileName, width, height, color, posX, posY, labelName, imagesCount); cy.createZipArchive(directoryToArchive, archivePath); diff --git a/tests/cypress/e2e/issues_prs/issue_5381_empty_project_formats.js b/tests/cypress/e2e/issues_prs/issue_5381_empty_project_formats.js index 41c30eb0ce1c..f926a948069c 100644 --- a/tests/cypress/e2e/issues_prs/issue_5381_empty_project_formats.js +++ b/tests/cypress/e2e/issues_prs/issue_5381_empty_project_formats.js @@ -14,7 +14,7 @@ const project = { context('List of export formats for a project without tasks is not empty', () => { before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); cy.goToProjectsList(); cy.createProjects(project.name, project.label, project.attrName, project.attrVaue); diff --git a/tests/cypress/e2e/issues_prs/issue_5566_filter_url.js b/tests/cypress/e2e/issues_prs/issue_5566_filter_url.js index 0062eefeaa78..e5f6192a18f5 100644 --- a/tests/cypress/e2e/issues_prs/issue_5566_filter_url.js +++ b/tests/cypress/e2e/issues_prs/issue_5566_filter_url.js @@ -26,7 +26,7 @@ context('The filter in the URL is correctly escaped', () => { } before(() => { - cy.visit('/'); + cy.visit('/auth/login'); cy.login(); cy.goToProjectsList(); diff --git a/tests/cypress/e2e/issues_prs2/issue_1568_cuboid_dump_annotation.js b/tests/cypress/e2e/issues_prs2/issue_1568_cuboid_dump_annotation.js index 30af8c60efe6..71e9b726c450 100644 --- a/tests/cypress/e2e/issues_prs2/issue_1568_cuboid_dump_annotation.js +++ b/tests/cypress/e2e/issues_prs2/issue_1568_cuboid_dump_annotation.js @@ -14,7 +14,7 @@ context('Dump annotation if cuboid created.', () => { const labelName = 'label'; before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); cy.headlessCreateTask({ labels: [{ name: labelName, attributes: [], type: 'cuboid' }], diff --git a/tests/cypress/e2e/issues_prs2/issue_1823_opening_context_menu_when_switching_another_frame.js b/tests/cypress/e2e/issues_prs2/issue_1823_opening_context_menu_when_switching_another_frame.js index 1e435a09b1ca..671822063626 100644 --- a/tests/cypress/e2e/issues_prs2/issue_1823_opening_context_menu_when_switching_another_frame.js +++ b/tests/cypress/e2e/issues_prs2/issue_1823_opening_context_menu_when_switching_another_frame.js @@ -52,7 +52,7 @@ context('Cannot read property label of undefined', { browser: ['!chrome', '!fire }; before(() => { - cy.visit('auth/login'); + cy.visit('/auth/login'); cy.login(); cy.imageGenerator(imagesFolder, imageFileName, width, height, color, posX, posY, labelName, imagesCount); cy.createZipArchive(directoryToArchive, archivePath); diff --git a/tests/cypress/support/commands.js b/tests/cypress/support/commands.js index 18abaf8ada4b..807ec2fb4713 100644 --- a/tests/cypress/support/commands.js +++ b/tests/cypress/support/commands.js @@ -265,7 +265,7 @@ Cypress.Commands.add('selectFilesFromShare', (serverFiles) => { }); Cypress.Commands.add('headlessLogin', (username = Cypress.env('user'), password = Cypress.env('password')) => { - cy.visit('/'); + cy.visit('/auth/login'); cy.get('#root').should('exist').and('be.visible'); cy.window().then(async ($win) => { await $win.cvat.server.login(username, password); @@ -344,29 +344,32 @@ Cypress.Commands.add('headlessDeleteTask', (taskID) => { }); }); -Cypress.Commands.add('headlessCreateUser', (userSpec) => ( - cy.request({ - method: 'POST', - url: '/api/auth/register', - body: { - confirmations: [], - password1: userSpec.password, - password2: userSpec.password, - email: userSpec.email, - first_name: userSpec.firstName, - last_name: userSpec.lastName, - username: userSpec.username, - }, - headers: { - 'Content-type': 'application/json', - }, - }).then((response) => { - expect(response.status).to.eq(201); +Cypress.Commands.add('headlessCreateUser', (userSpec) => { + cy.intercept('POST', '/api/auth/register**', (req) => { + req.continue((res) => { + delete res.headers['set-cookie']; + }); + }).as('registerRequest'); + + cy.window().then(async ($win) => { + await $win.cvat.server.register( + userSpec.username, + userSpec.firstName, + userSpec.lastName, + userSpec.email, + userSpec.password, + [], + ); + return cy.wrap(); + }); + + cy.wait('@registerRequest').then((interception) => { + const { response } = interception; + expect(response.statusCode).to.eq(201); expect(response.body.username).to.eq(userSpec.username); expect(response.body.email).to.eq(userSpec.email); - return cy.wrap(); - }) -)); + }); +}); Cypress.Commands.add('headlessLogout', () => { cy.clearCookies(); diff --git a/tests/cypress/support/const.js b/tests/cypress/support/const.js index e675b1986dd5..f084463bbe74 100644 --- a/tests/cypress/support/const.js +++ b/tests/cypress/support/const.js @@ -35,7 +35,7 @@ export const multiAttrParams = { }; it('Prepare to testing', () => { - cy.visit('/'); + cy.visit('/auth/login'); cy.login(); cy.get('.cvat-tasks-page').should('exist'); const listItems = []; diff --git a/tests/cypress/support/const_canvas3d.js b/tests/cypress/support/const_canvas3d.js index 2abbc247865c..3a490394b4da 100644 --- a/tests/cypress/support/const_canvas3d.js +++ b/tests/cypress/support/const_canvas3d.js @@ -13,7 +13,7 @@ export const advancedConfigurationParams = false; export const multiAttrParams = false; it('Prepare to testing', () => { - cy.visit('/'); + cy.visit('/auth/login'); cy.login(); cy.get('.cvat-tasks-page').should('exist'); const listItems = []; diff --git a/tests/cypress/support/const_project.js b/tests/cypress/support/const_project.js index 4b7362202e7d..93be9ee38d73 100644 --- a/tests/cypress/support/const_project.js +++ b/tests/cypress/support/const_project.js @@ -16,7 +16,7 @@ export const multiAttrParams = { }; it('Prepare to testing', () => { - cy.visit('/'); + cy.visit('/auth/login'); cy.login(); cy.goToProjectsList(); cy.get('.cvat-projects-page').should('exist');