Sergio Salas commited on
Commit
823aee4
·
1 Parent(s): ff03867

metido refractivesqlite en la carpeta lib

Browse files

Former-commit-id: 8c450d1a46ea31da1199a92797887b8b51adaae7

historiasDeUsuario.md CHANGED
@@ -4,6 +4,11 @@
4
  Yo, como usuario, quiero poder seleccionar materiales de una lista de materiales disponibles,
5
  de manera que pueda incluirlos en la comparación y analizar sus propiedades ópticas.
6
 
 
 
 
 
 
7
  ## Eliminación de materiales de la selección
8
  Yo, como usuario, quiero poder eliminar materiales previamente seleccionados.
9
 
 
4
  Yo, como usuario, quiero poder seleccionar materiales de una lista de materiales disponibles,
5
  de manera que pueda incluirlos en la comparación y analizar sus propiedades ópticas.
6
 
7
+ ### 1. Prueba de éxito
8
+
9
+ 1. sdf
10
+ 2. dsf
11
+
12
  ## Eliminación de materiales de la selección
13
  Yo, como usuario, quiero poder eliminar materiales previamente seleccionados.
14
 
mieWeb/{refractivesqlite → lib/refractivesqlite}/.gitignore RENAMED
File without changes
mieWeb/{refractivesqlite → lib/refractivesqlite}/__init__.py RENAMED
File without changes
mieWeb/{refractivesqlite → lib/refractivesqlite}/dboperations.py RENAMED
@@ -4,8 +4,8 @@ import yaml
4
  import sqlite3
5
  import numpy as np
6
 
7
- from refractivesqlite import material
8
- from refractivesqlite.material import Material
9
 
10
  Shelf = namedtuple('Shelf', ['shelf', 'name'])
11
  Book = namedtuple('Book', ['book', 'name'])
 
4
  import sqlite3
5
  import numpy as np
6
 
7
+ from lib.refractivesqlite import material
8
+ from lib.refractivesqlite.material import Material
9
 
10
  Shelf = namedtuple('Shelf', ['shelf', 'name'])
11
  Book = namedtuple('Book', ['book', 'name'])
mieWeb/{refractivesqlite → lib/refractivesqlite}/material.py RENAMED
File without changes
mieWeb/src/persistencia/__pycache__/acceso_datos.cpython-312.pyc CHANGED
Binary files a/mieWeb/src/persistencia/__pycache__/acceso_datos.cpython-312.pyc and b/mieWeb/src/persistencia/__pycache__/acceso_datos.cpython-312.pyc differ
 
mieWeb/src/persistencia/acceso_datos.py CHANGED
@@ -1,6 +1,6 @@
1
  import os
2
  import sqlite3
3
- from refractivesqlite import dboperations as DB
4
 
5
 
6
  # Obtener la ruta del directorio actual (donde está acceso_datos.py)
 
1
  import os
2
  import sqlite3
3
+ from lib.refractivesqlite import dboperations as DB
4
 
5
 
6
  # Obtener la ruta del directorio actual (donde está acceso_datos.py)
mieWeb/src/test/testInterfaz.py ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from selenium import webdriver
2
+ from selenium.webdriver.common.by import By
3
+ from selenium.webdriver.support.ui import WebDriverWait
4
+ from selenium.webdriver.support import expected_conditions as EC
5
+ from selenium.webdriver.common.action_chains import ActionChains
6
+
7
+ # Configurar el driver
8
+ driver = webdriver.Chrome(executable_path="path_to_chromedriver")
9
+
10
+ # Abrir la URL de la app de Panel
11
+ driver.get("http://localhost:61788") # Ajusta la URL según tu configuración
12
+
13
+ # Esperar a que la página cargue
14
+ WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.NAME, "Select materials")))
15
+
16
+ # 1. Seleccionar el material "Ag" del MultiChoice
17
+ multi_choice = driver.find_element(By.NAME, "Select materials")
18
+ multi_choice.click()
19
+
20
+ # Esperar a que las opciones se desplieguen
21
+ WebDriverWait(driver, 10).until(EC.visibility_of_all_elements_located((By.CSS_SELECTOR, ".bk-select-option")))
22
+
23
+ # Seleccionar "Ag"
24
+ ag_option = driver.find_element(By.XPATH, "//div[@class='bk-select-option' and text()='Ag']")
25
+ ag_option.click()
26
+
27
+ # Esperar a que se agregue la opción de "Select page for Ag"
28
+ WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.NAME, "Select page for Ag")))
29
+
30
+ # 2. Seleccionar la página "Johnson" del Select
31
+ page_select = driver.find_element(By.NAME, "Select page for Ag")
32
+ page_select.click()
33
+
34
+ # Esperar a que las opciones se desplieguen
35
+ WebDriverWait(driver, 10).until(EC.visibility_of_all_elements_located((By.CSS_SELECTOR, ".bk-select-option")))
36
+
37
+ # Seleccionar "Johnson"
38
+ johnson_option = driver.find_element(By.XPATH, "//div[@class='bk-select-option' and text()='Johnson']")
39
+ johnson_option.click()
40
+
41
+ # 3. Ingresar un valor en el campo de "Radius"
42
+ radius_input = driver.find_element(By.NAME, "Radius (nm)")
43
+ radius_input.send_keys("100") # Ejemplo de valor de radio
44
+
45
+ # Hacer clic en el botón "Confirm radius"
46
+ confirm_radius_button = driver.find_element(By.NAME, "Confirm radius")
47
+ confirm_radius_button.click()
48
+
49
+ # 4. Ingresar un valor en el campo de "Refractive index of the medium"
50
+ n_surrounding_input = driver.find_element(By.NAME, "Refractive index of the medium")
51
+ n_surrounding_input.send_keys("1.5") # Ejemplo de valor de índice de refracción
52
+
53
+ # Hacer clic en el botón "Confirm value"
54
+ confirm_n_surrounding_button = driver.find_element(By.NAME, "Confirm value")
55
+ confirm_n_surrounding_button.click()
56
+
57
+ # Esperar un momento para que la gráfica se actualice
58
+ WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.CSS_SELECTOR, ".bk-plot-wrapper")))
59
+
60
+ # A partir de aquí puedes continuar con más interacciones o verificar los resultados
61
+
62
+ # Cerrar el navegador al final
63
+ driver.quit()