e2e: fix oauth/oidc tests not working with current grafana

This commit is contained in:
Jens Langhammer 2020-07-20 13:49:07 +02:00
parent 05c3393669
commit 1393078fe6
2 changed files with 12 additions and 24 deletions

View File

@ -104,22 +104,19 @@ class TestProviderOAuth(SeleniumTestCase):
) )
self.assertEqual( self.assertEqual(
self.driver.find_element( self.driver.find_element(
By.XPATH, By.CSS_SELECTOR, "input[name=name]"
"/html/body/grafana-app/div/div/div/react-profile-wrapper/form[1]/div[1]/div/input",
).get_attribute("value"), ).get_attribute("value"),
USER().username, USER().username,
) )
self.assertEqual( self.assertEqual(
self.driver.find_element( self.driver.find_element(
By.XPATH, By.CSS_SELECTOR, "input[name=email]"
"/html/body/grafana-app/div/div/div/react-profile-wrapper/form[1]/div[2]/div/input",
).get_attribute("value"), ).get_attribute("value"),
USER().email, USER().email,
) )
self.assertEqual( self.assertEqual(
self.driver.find_element( self.driver.find_element(
By.XPATH, By.CSS_SELECTOR, "input[name=login]"
"/html/body/grafana-app/div/div/div/react-profile-wrapper/form[1]/div[3]/div/input",
).get_attribute("value"), ).get_attribute("value"),
USER().username, USER().username,
) )
@ -176,22 +173,19 @@ class TestProviderOAuth(SeleniumTestCase):
) )
self.assertEqual( self.assertEqual(
self.driver.find_element( self.driver.find_element(
By.XPATH, By.CSS_SELECTOR, "input[name=name]"
"/html/body/grafana-app/div/div/div/react-profile-wrapper/form[1]/div[1]/div/input",
).get_attribute("value"), ).get_attribute("value"),
USER().username, USER().username,
) )
self.assertEqual( self.assertEqual(
self.driver.find_element( self.driver.find_element(
By.XPATH, By.CSS_SELECTOR, "input[name=email]"
"/html/body/grafana-app/div/div/div/react-profile-wrapper/form[1]/div[2]/div/input",
).get_attribute("value"), ).get_attribute("value"),
USER().email, USER().email,
) )
self.assertEqual( self.assertEqual(
self.driver.find_element( self.driver.find_element(
By.XPATH, By.CSS_SELECTOR, "input[name=login]"
"/html/body/grafana-app/div/div/div/react-profile-wrapper/form[1]/div[3]/div/input",
).get_attribute("value"), ).get_attribute("value"),
USER().username, USER().username,
) )

View File

@ -154,22 +154,19 @@ class TestProviderOIDC(SeleniumTestCase):
) )
self.assertEqual( self.assertEqual(
self.driver.find_element( self.driver.find_element(
By.XPATH, By.CSS_SELECTOR, "input[name=name]"
"/html/body/grafana-app/div/div/div/react-profile-wrapper/form[1]/div[1]/div/input",
).get_attribute("value"), ).get_attribute("value"),
USER().name, USER().name,
) )
self.assertEqual( self.assertEqual(
self.driver.find_element( self.driver.find_element(
By.XPATH, By.CSS_SELECTOR, "input[name=email]"
"/html/body/grafana-app/div/div/div/react-profile-wrapper/form[1]/div[2]/div/input",
).get_attribute("value"), ).get_attribute("value"),
USER().email, USER().email,
) )
self.assertEqual( self.assertEqual(
self.driver.find_element( self.driver.find_element(
By.XPATH, By.CSS_SELECTOR, "input[name=login]"
"/html/body/grafana-app/div/div/div/react-profile-wrapper/form[1]/div[3]/div/input",
).get_attribute("value"), ).get_attribute("value"),
USER().email, USER().email,
) )
@ -236,22 +233,19 @@ class TestProviderOIDC(SeleniumTestCase):
) )
self.assertEqual( self.assertEqual(
self.driver.find_element( self.driver.find_element(
By.XPATH, By.CSS_SELECTOR, "input[name=name]"
"/html/body/grafana-app/div/div/div/react-profile-wrapper/form[1]/div[1]/div/input",
).get_attribute("value"), ).get_attribute("value"),
USER().name, USER().name,
) )
self.assertEqual( self.assertEqual(
self.driver.find_element( self.driver.find_element(
By.XPATH, By.CSS_SELECTOR, "input[name=email]"
"/html/body/grafana-app/div/div/div/react-profile-wrapper/form[1]/div[2]/div/input",
).get_attribute("value"), ).get_attribute("value"),
USER().email, USER().email,
) )
self.assertEqual( self.assertEqual(
self.driver.find_element( self.driver.find_element(
By.XPATH, By.CSS_SELECTOR, "input[name=login]"
"/html/body/grafana-app/div/div/div/react-profile-wrapper/form[1]/div[3]/div/input",
).get_attribute("value"), ).get_attribute("value"),
USER().email, USER().email,
) )