Skip to content

Commit

Permalink
Merge branch 'main' into remove-panel-toc-editor
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerZeroMaster authored Aug 29, 2024
2 parents eef67cf + 2cd8b16 commit 8fca038
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 27 deletions.
2 changes: 1 addition & 1 deletion client/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function doRest(client: LanguageClient): ExtensionExports {
vscode.commands.registerCommand('openstax.generateReadme', ensureCatch(readmeGenerator(hostContext)))
tocTreesView = vscode.window.createTreeView('tocTrees', { treeDataProvider: tocTreesProvider, showCollapseAll: true, dragAndDropController: tocEventHandler })
vscode.commands.registerCommand('openstax.toggleTocTreesFiltering', ensureCatch(toggleTocTreesFilteringHandler(tocTreesView, tocTreesProvider)))
vscode.commands.registerCommand('openstax.addAncillaryToToc', ensureCatch(async (node: BookOrTocNode) => { await tocEventHandler.addNode(TocNodeKind.Ancillary, node, 'test') }))
// vscode.commands.registerCommand('openstax.addAncillaryToToc', ensureCatch(async (node: BookOrTocNode) => { await tocEventHandler.addNode(TocNodeKind.Ancillary, node, 'test') }))
vscode.commands.registerCommand('openstax.addPageToToc', ensureCatch(async (node: BookOrTocNode) => { await tocEventHandler.addNode(TocNodeKind.Page, node, 'test') }))
vscode.commands.registerCommand('openstax.addSubBookToToc', ensureCatch(async (node: BookOrTocNode) => { await tocEventHandler.addNode(TocNodeKind.Subbook, node, 'test') }))
vscode.commands.registerCommand('openstax.validateContent', ensureCatch(validateContent))
Expand Down
11 changes: 0 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,6 @@
"title": "Generate README",
"category": "Openstax"
},
{
"command": "openstax.addAncillaryToToc",
"title": "Add Ancillary",
"category": "Openstax",
"icon": "$(person-add)"
},
{
"command": "openstax.addPageToToc",
"title": "Add Page",
Expand Down Expand Up @@ -166,11 +160,6 @@
"when": "view == tocTrees",
"group": "navigation"
},
{
"command": "openstax.addAncillaryToToc",
"when": "view == tocTrees",
"group": "navigation"
},
{
"command": "openstax.addSubBookToToc",
"when": "view == tocTrees",
Expand Down
15 changes: 2 additions & 13 deletions tests/ui/pages/home.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,6 @@ def push_message_input_field_not_visible(self):
def push_content_dialog_box(self):
return self.page.locator("div > div.notifications-toasts.visible")

@property
def push_content_dialog_box_cancel_button(self):
return self.page.locator("div.notification-list-item-buttons-container")

def click_push_content_dialog_box_cancel_button(self):
return self.push_content_dialog_box_cancel_button.click()

@property
def generate_readme_button_is_visible(self):
return self.page.get_by_text("Generate README", exact=True)
Expand All @@ -99,12 +92,8 @@ def click_generate_readme_button(self):

@property
def generate_readme_dialog_box_is_visible(self):
return self.page.wait_for_selector("div.notifications-toasts.visible")

@property
def generate_readme_dialog_box_text(self):
return self.page.locator(
"div.notification-list-item-main-row > div.notification-list-item-message"
return self.page.locator("div.notifications-toasts.visible").get_by_text(
"README: Done!"
)

@property
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/test_readme_validate_other_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,19 @@ def test_readme_validate_other_features(
assert home.openstax_icon_is_visible

# THEN: POET UI launches and is visible
home.click_cat_icon()
home.click_openstax_icon()

home.click_push_content_button()

assert home.push_message_input_field_is_visible
assert "Push Content: Pushing..." in home.push_content_dialog_box.inner_text()

home.click_push_content_dialog_box_cancel_button()
chrome_page.keyboard.press("Escape")
assert home.push_message_input_field_not_visible

home.click_generate_readme_button()
assert home.generate_readme_dialog_box_is_visible
assert "Generate README: Done!" in home.generate_readme_dialog_box_text.inner_text()

home.click_validate_content_button()
assert home.validate_content_popup_dialog_is_visible
Expand Down

0 comments on commit 8fca038

Please sign in to comment.