Skip to content

Commit 200c686

Browse files
author
konstantina
committed
Updated test_add_projectfile_direct function is test_sketch.py file.
This function tests that new file can be added to project using create-new-file field.
1 parent d7c0d22 commit 200c686

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

tests/common/sketch/test_sketch.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,21 @@ def test_add_projectfile_direct(self):
112112
""" Tests that new file can be added to project using create-new-file
113113
field """
114114
self.open_project()
115-
115+
WebDriverWait(self.driver, VERIFY_TIMEOUT).until(
116+
expected_conditions.visibility_of_element_located(
117+
(By.CSS_SELECTOR, "#editor-loading-screen")
118+
)
119+
)
120+
WebDriverWait(self.driver, VERIFY_TIMEOUT).until(
121+
expected_conditions.invisibility_of_element_located(
122+
(By.CSS_SELECTOR, "#editor-loading-screen")
123+
)
124+
)
125+
WebDriverWait(self.driver, VERIFY_TIMEOUT).until(
126+
expected_conditions.element_to_be_clickable(
127+
(By.CSS_SELECTOR, "#newfile")
128+
)
129+
)
116130
add_button = self.get_element(By.ID, 'newfile')
117131
add_button.click()
118132
WebDriverWait(self.driver, VERIFY_TIMEOUT).until(
@@ -160,4 +174,4 @@ def test_verify_deletion(self):
160174
)
161175

162176
def test_remove_sketch(self):
163-
self.delete_project(TEST_PROJECT_NAME)
177+
self.delete_project(TEST_PROJECT_NAME)

0 commit comments

Comments
 (0)