Skip to content

Commit

Permalink
Search and view actions from shelfobject equipment view(selenium tests)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelagz committed May 9, 2024
1 parent 9650ca0 commit 39f8bb6
Show file tree
Hide file tree
Showing 7 changed files with 116 additions and 18 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 36 additions & 5 deletions docs/source/general_usage/laboratory_view.rst
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,13 @@ para administrar el contenedor de los objetos en estante.
Mantenimiento de un equipo
--------------------------------------------------------

En esta sección se podrá visualizar las diferentes acciones en el mantenimiento de un equipo como lo son la
**edición de sus características** (Proveedor, contrato de mantenimiento y otros), los registros en **bitácora**
(Cualquier evento importante de anotar con respecto al equipo), sus **calibraciones** (Quienes fueron los calibradores y
validadores reponsables de dicho equipo), su **mantenimiento** (Registro de mantenimiento que haya tenido el equipo),
**capacitaciones** (Cuando, en que lugar y quienes recibieron alguna capacitación con el uso de este equipo) y
finalmente **garantías** (Control sobre las garantías del equipo y su respectivo contrato).


1. Edición de las características
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -291,6 +298,12 @@ Mantenimiento de un equipo
2. Bitácora
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

* Ver los registro.

.. image:: ../_static/gif/view_shelfobject_equipment_logs.gif
:height: 380
:class: margingif

* Creación de un registro.

.. image:: ../_static/gif/create_shelfobject_equipment_log.gif
Expand All @@ -301,35 +314,53 @@ Mantenimiento de un equipo

.. image:: ../_static/gif/edit_shelfobject_equipment_log.gif
:height: 380
:width: 720
:class: margingif

* Eliminación de un registro.

.. image:: ../_static/gif/create_shelfobject_equipment_log.gif
:height: 380
:width: 720
:class: margingif

* Buscar registros.

.. image:: ../_static/gif/search_shelfobject_equipment_logs.gif
:height: 380
:class: margingif


3. Calibraciones
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

* Ver los registro de calibración.

.. image:: ../_static/gif/view_shelfobject_equipment_calibrations.gif
:height: 380
:class: margingif

* Creación de un registro de calibración.

.. image:: ../_static/gif/create_shelfobject_equipment_calibration.gif
:height: 380
:width: 720
:class: margingif

* Edición de un registro de calibración.

.. image:: ../_static/gif/edit_shelfobject_equipment_calibration.gif
:height: 380
:width: 720
:class: margingif

* Eliminación de un registro de calibración.

.. image:: ../_static/gif/delete_shelfobject_equipment_calibration.gif
:height: 380
:width: 720
:class: margingif

* Buscar registros de calibración.

.. image:: ../_static/gif/search_shelfobject_equipment_calibrations.gif
:height: 380
:class: margingif


4. Bitácora de mantenimientos
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,44 @@ def test_delete_shelfobject_equipment_calibration(self):
{"path": "//*[@id='calibrate_table']/tbody/tr[2]/td[5]/div/i[2]",
"scroll": "window.scrollTo(0, 900)"},
{"path": "//*[@id='delete_calibrate_modal']/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_calibration")

def test_view_shelfobject_equipment_calibrations(self):
path_list = [
{"path": "//*[@id='calibrate_table']",
"scroll": "window.scrollTo(0, 900)"},
{"path": "//*[@id='calibrate_table']"}
]
general_path_list = [self.path_base, path_list]
self.create_gif_by_change_focus_tab(general_path_list,
["equipmenteditview"],
"view_shelfobject_equipment_calibrations")

def test_search_shelfobject_equipment_calibrations(self):
path_list = [
{"path": "//*[@id='calibrate_table']",
"scroll": "window.scrollTo(0, 900)"},
{"path": "//*[@id='calibrate_table_wrapper']/div/div/div/label/input"},
{"path": "//*[@id='calibrate_table_wrapper']/div/div/div/label/input",
"extra_action": "setvalue", "value": "Limpieza"},
{"path": "//*[@id='calibrate_table_wrapper']/div/div/div/label/input"},
{"path": "//*[@id='calibrate_table_wrapper']/div/div/div/label/input",
"extra_action": "clearinput"},
{"path": "//*[@id='calibrate_table_wrapper']/div/div/div/label/input"},
{"path": "//*[@id='calibrate_table_wrapper']/div/div/div/label/input",
"extra_action": "setvalue", "value": "torres"},
{"path": "//*[@id='calibrate_table_wrapper']/div/div[2]/div/button"},
{"path": "//*[@id='calibrate_table']/thead/tr[2]/th[4]/span/span/span"},
{"path": "/html/body/span/span/span[2]/ul/li"},
{"path": "//*[@id='calibrate_table_wrapper']/div/div[2]/div/button"},
{"path": "//*[@id='calibrate_table']/thead/tr[2]/th[5]/input"},
{"path": "//*[@id='calibrate_table']/thead/tr[2]/th[5]/input",
"extra_action": "setvalue", "value": "técnico"},
]
general_path_list = [self.path_base, path_list]
self.create_gif_by_change_focus_tab(general_path_list,
["equipmenteditview"],
"search_shelfobject_equipment_calibrations")
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,24 @@ class TableLogs(ShelfObjectEquipmentSeleniumTest):
def setUp(self):
super().setUp()

def get_general_path_list(self, path_list):
path_list = [{"path": "//*[@id='log_table_wrapper']"}] + path_list
return [self.path_base, path_list]

def test_create_shelfobject_equipment_log(self):
path_list = [
{"path": "//*[@id='log_table_wrapper']"},
{"path": "//*[@id='log_table_wrapper']/div/div[2]/div/button[2]", "scroll": "window.scrollTo(0, 300)"},
{"path": "//*[@id='create_log_form']/div/div/textarea"},
{"path": "//*[@id='create_log_form']/div/div/textarea", "extra_action": "setvalue",
"value": "La balanza fue utilizada por el grupo 03 de estudiantes en la capacitación del I semestre 2024."},
{"path": "//*[@id='create_log_modal']/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"],
self.create_gif_by_change_focus_tab(self.get_general_path_list(path_list),
["equipmenteditview"],
"create_shelfobject_equipment_log")

def test_edit_shelfobject_equipment_log(self):
path_list = [
{"path": "//*[@id='log_table_wrapper']"},
{"path": "//*[@id='log_table']/tbody/tr/td[4]/div/i",
"scroll": "window.scrollTo(0, 300)"},
{"path": "//*[@id='update_log_form']/div/div/textarea"},
Expand All @@ -34,20 +35,50 @@ def test_edit_shelfobject_equipment_log(self):
{"path": "//*[@id='update_log_form']/div/div/textarea", "extra_action":
"setvalue", "value": " ID Encargado AL342."},
{"path": "//*[@id='update_log_modal']/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"],
self.create_gif_by_change_focus_tab(self.get_general_path_list(path_list),
["equipmenteditview"],
"edit_shelfobject_equipment_log")

def test_delete_shelfobject_equipment_log(self):
path_list = [
{"path": "//*[@id='log_table_wrapper']"},
{"path": "//*[@id='log_table']/tbody/tr[2]/td[4]/div/i[2]",
"scroll": "window.scrollTo(0, 300)"},
{"path": "//*[@id='delete_log_modal']/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"],
self.create_gif_by_change_focus_tab(self.get_general_path_list(path_list),
["equipmenteditview"],
"delete_shelfobject_equipment_log")

def test_view_shelfobject_equipment_logs(self):
path_list = [
{"path": "//*[@id='log_table_wrapper']",
"scroll": "window.scrollTo(0, 300)"}
]
self.create_gif_by_change_focus_tab(self.get_general_path_list(path_list),
["equipmenteditview"],
"view_shelfobject_equipment_logs")

def test_search_shelfobject_equipment_logs(self):
path_list = [
{"path": "//*[@id='log_table_wrapper']",
"scroll": "window.scrollTo(0, 300)"},
{"path": "//*[@id='log_table_wrapper']/div/div/div/label/input"},
{"path": "//*[@id='log_table_wrapper']/div/div/div/label/input",
"extra_action": "setvalue", "value": "administrador"},
{"path": "//*[@id='log_table_wrapper']/div/div/div/label/input"},
{"path": "//*[@id='log_table_wrapper']/div/div/div/label/input",
"extra_action": "clearinput"},
{"path": "//*[@id='log_table_wrapper']/div/div/div/label/input",
"extra_action": "setvalue", "value": "balanza"},
{"path": "//*[@id='log_table_wrapper']/div/div[2]/div/button"},
{"path": "//*[@id='log_table']/thead/tr[2]/th[3]/span/span/span"},
{"path": "/html/body/span/span/span[2]/ul/li[2]"},
{"path": "//*[@id='log_table_wrapper']/div/div[2]/div/button"},
{"path": "//*[@id='log_table']/thead/tr[2]/th[4]/input"},
{"path": "//*[@id='log_table']/thead/tr[2]/th[4]/input",
"extra_action": "setvalue", "value": "requiere"},
]
self.create_gif_by_change_focus_tab(self.get_general_path_list(path_list),
["equipmenteditview"],
"search_shelfobject_equipment_logs")

0 comments on commit 39f8bb6

Please sign in to comment.