Skip to content

Commit

Permalink
Modified save button selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
ericsnekbytes committed Jan 24, 2023
1 parent 0a4d713 commit 255046e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions nbclassic/tests/end_to_end/test_save_as_notebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@ def test_save_notebook_as(notebook_frontend):
notebook_frontend.wait_for_selector('.save-message', page=EDITOR_PAGE)

# TODO: Add a function for locator assertions to FrontendElement
locator_element = notebook_frontend.locate_and_focus('//input[@data-testid="save-as"]', page=EDITOR_PAGE)
dialog_element = notebook_frontend.locate_and_focus(".modal-footer", page=EDITOR_PAGE)
locator_element = dialog_element.locate('text=Save')
locator_element.wait_for('visible')

notebook_frontend.insert_text('new_notebook.ipynb', page=EDITOR_PAGE)
notebook_frontend.try_click_selector('//html//body//div[8]//div//div//div[3]//button[2]', page=EDITOR_PAGE)
locator_element.click()

locator_element.expect_not_to_be_visible()

assert get_notebook_name(notebook_frontend) == "new_notebook.ipynb"
Expand Down

0 comments on commit 255046e

Please sign in to comment.