-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update documentation and selenium tests
- Loading branch information
Showing
5 changed files
with
213 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -103,6 +103,24 @@ | |
] | ||
] | ||
} | ||
}, | ||
{ | ||
"model": "auth.user", | ||
"pk": 4, | ||
"fields": { | ||
"password": "adminpass", | ||
"last_login": "2023-01-10T22:49:30.603Z", | ||
"is_superuser": true, | ||
"username": "Sora", | ||
"first_name": "Sora", | ||
"last_name": "Sanabria", | ||
"email": "[email protected]", | ||
"is_staff": false, | ||
"is_active": true, | ||
"date_joined": "2018-07-09T19:45:29Z", | ||
"groups": [], | ||
"user_permissions": [] | ||
} | ||
}, | ||
{ | ||
"model": "laboratory.organizationstructure", | ||
|
@@ -113,7 +131,7 @@ | |
"position": 0, | ||
"level": 0, | ||
"rol": [1, 2, 3, 4], | ||
"users": [1] | ||
"users": [1,4] | ||
} | ||
}, | ||
{ | ||
|
@@ -299,18 +317,52 @@ | |
} | ||
}, | ||
{ | ||
"model": "laboratory.shelfobjectguarantee", | ||
"pk": 2, | ||
"model": "laboratory.shelfobjectguarantee", | ||
"pk": 2, | ||
"fields": { | ||
"organization": 1, | ||
"creation_date": "2024-04-25T22:48:16.075Z", | ||
"last_update": "2024-04-25T22:48:16.075Z", | ||
"created_by": 1, | ||
"shelfobject": 1, | ||
"guarantee_initial_date": "2024-04-25", | ||
"guarantee_final_date": "2024-04-28", | ||
"contract": null | ||
} | ||
}, | ||
{ | ||
"model": "laboratory.shelfobjectguarantee", | ||
"pk": 3, | ||
"fields": { | ||
"organization": 1, | ||
"creation_date": "2024-04-25T22:48:16.075Z", | ||
"last_update": "2024-04-25T22:48:16.075Z", | ||
"created_by": 4, | ||
"shelfobject": 1, | ||
"guarantee_initial_date": "2024-04-20", | ||
"guarantee_final_date": "2024-04-28", | ||
"contract": null | ||
} | ||
}, | ||
{ | ||
"model": "laboratory.shelfobjecttraining", | ||
"pk": 1, | ||
"fields": { | ||
"organization": 1, | ||
"creation_date": "2024-04-25T22:48:16.075Z", | ||
"last_update": "2024-04-25T22:48:16.075Z", | ||
"creation_date": "2024-04-26T17:18:20.868Z", | ||
"last_update": "2024-04-26T17:18:20.868Z", | ||
"created_by": 1, | ||
"shelfobject": 1, | ||
"guarantee_initial_date": "2024-04-25", | ||
"guarantee_final_date": "2024-04-28", | ||
"contract": null | ||
|
||
"training_initial_date": "2024-04-25", | ||
"training_final_date": "2024-04-25", | ||
"number_of_hours": 1, | ||
"external_people_receive_training": "ninguna", | ||
"observation": "Induccion a la empresa", | ||
"place": "San jose", | ||
"intern_people_receive_training": [ | ||
1 | ||
] | ||
} | ||
} | ||
|
||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
90 changes: 90 additions & 0 deletions
90
...lenium_tests/laboratory_view/shelfobject_equipment_view/shelfobject_equipment_training.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
from django.test import tag | ||
from django.utils.timezone import now | ||
|
||
from laboratory.tests.selenium_tests.laboratory_view.shelfobject_equipment_view.base import \ | ||
ShelfObjectEquipmentSeleniumTest | ||
|
||
|
||
@tag('selenium') | ||
class ShelfObjectEquipmentTraining(ShelfObjectEquipmentSeleniumTest): | ||
|
||
def setUp(self): | ||
super().setUp() | ||
self.init_path= [] | ||
|
||
|
||
def test_view_shelfobject_training(self): | ||
|
||
path_list = [ | ||
{"path" :"/html/body/div[1]/div/div[3]/div/div/div[6]/div[1]/h1", | ||
"scroll":"window.scrollTo(0, 2000)"}, | ||
] | ||
general_path_list = [self.path_base, path_list] | ||
self.create_gif_by_change_focus_tab(general_path_list, ["equipmenteditview"], | ||
"view_shelfobject_equipment_training") | ||
|
||
def test_add_shelfobject_training(self): | ||
initial_date, initial_date_strftime = self.get_format_increase_decrease_date(now(), 0) | ||
final_date, final_date_strftime = self.get_format_increase_decrease_date(now(), 1) | ||
|
||
path_list = [ | ||
{"path": "/html/body/div[1]/div/div[3]/div/div/div[6]/div[1]/h1", | ||
"scroll": "window.scrollTo(0, 2000)"}, | ||
{"path": "/html/body/div[1]/div/div[3]/div/div/div[6]/div[2]/div/div[1]/div[2]/div/button[3]"}, | ||
{"path": "/html/body/div[1]/div/div[3]/div/div/div[20]/div/div/div[2]/form/div[1]/div/div/input"}, | ||
{"path": "//*[@data-day='%s']" % initial_date_strftime}, | ||
{"path": "/html/body/div[1]/div/div[3]/div/div/div[20]/div/div/div[2]/form/div[2]/div/div/input"}, | ||
{"path": "//*[@data-day='%s']" % final_date_strftime}, | ||
{"path": "/html/body/div[1]/div/div[3]/div/div/div[20]/div/div/div[2]/form/div[3]/div/input", "extra_action":"setvalue", | ||
"value": 1}, | ||
{"path": "/html/body/div[1]/div/div[3]/div/div/div[20]/div/div/div[2]/form/div[4]/div/span"}, | ||
{"path": "/html/body/div[1]/div/div[3]/div/div/div[20]/div/div/div[2]/form/span/span/span/ul/li[1]"}, | ||
{ | ||
"path": "/html/body/div[1]/div/div[3]/div/div/div[20]/div/div/div[2]/form/div[5]/div/textarea", | ||
"extra_action": "setvalue", | ||
"value": "Luz Castro Lopez"}, | ||
{ | ||
"path": "/html/body/div[1]/div/div[3]/div/div/div[20]/div/div/div[2]/form/div[6]/div/textarea", | ||
"extra_action": "setvalue", | ||
"value": "Llegar temprano"}, | ||
{ | ||
"path": "/html/body/div[1]/div/div[3]/div/div/div[20]/div/div/div[2]/form/div[7]/div/input", | ||
"extra_action": "setvalue", | ||
"value": "Oficinas Centrales"}, | ||
|
||
{"path": "/html/body/div[1]/div/div[3]/div/div/div[20]/div/div/div[3]/button[2]"}, | ||
|
||
] | ||
general_path_list = [self.path_base, path_list] | ||
self.create_gif_by_change_focus_tab(general_path_list, ["equipmenteditview"], | ||
"add_shelfobject_equipment_training") | ||
|
||
def test_edit_shelfobject_training(self): | ||
initial_date, initial_date_strftime = self.get_format_increase_decrease_date(now(), 1) | ||
|
||
path_list = [ | ||
{"path": "/html/body/div[1]/div/div[3]/div/div/div[6]/div[1]/h1", | ||
"scroll": "window.scrollTo(0, 2000)"}, | ||
{"path": "/html/body/div[1]/div/div[3]/div/div/div[6]/div[2]/div/div[2]/div/table/tbody/tr/td[7]/div/i[1]"}, | ||
{"path": "/html/body/div[1]/div/div[3]/div/div/div[21]/div/div/div[2]/form/div[2]/div/div/input"}, | ||
{"path": "//*[@data-day='%s']" % initial_date_strftime}, | ||
{"path": "/html/body/div[1]/div/div[3]/div/div/div[21]/div/div/div[2]/form/div[4]/div/span/span[1]/span/ul/li[1]/button"}, | ||
{"path": "/html/body/div[1]/div/div[3]/div/div/div[21]/div/div/div[3]/button[2]", "scroll": "$('#update_training_modal').scrollTop(500);"}, | ||
|
||
] | ||
general_path_list = [self.path_base, path_list] | ||
self.create_gif_by_change_focus_tab(general_path_list, ["equipmenteditview"], | ||
"edit_shelfobject_equipment_training") | ||
|
||
def test_delete_shelfobject_training(self): | ||
|
||
path_list = [ | ||
{"path": "/html/body/div[1]/div/div[3]/div/div/div[6]/div[1]/h1", | ||
"scroll": "window.scrollTo(0, 2000)"}, | ||
{"path": "/html/body/div[1]/div/div[3]/div/div/div[6]/div[2]/div/div[2]/div/table/tbody/tr/td[7]/div/i[2]"}, | ||
{"path": "/html/body/div[1]/div/div[3]/div/div/div[22]/div/div/div[3]/button[2]"}, | ||
|
||
] | ||
general_path_list = [self.path_base, path_list] | ||
self.create_gif_by_change_focus_tab(general_path_list, ["equipmenteditview"], | ||
"delete_shelfobject_equipment_training") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters