From 54ccc212e9e5f4a7b310882c3dec9c2ac89f1d42 Mon Sep 17 00:00:00 2001 From: Konnor Rogers Date: Sun, 29 Sep 2024 13:07:22 -0400 Subject: [PATCH] fixing tests --- tests/docs/specifying-accepted-file-types.test.js | 4 ++-- tests/rails/test/system/attachment_attributes_test.rb | 2 +- tests/rails/test/system/attachment_galleries_test.rb | 2 +- tests/rails/test/system/blockquote_test.rb | 2 +- tests/rails/test/system/bold_test.rb | 2 +- tests/rails/test/system/bullet_list_test.rb | 2 +- tests/rails/test/system/code_block_test.rb | 2 +- tests/rails/test/system/heading_test.rb | 2 +- tests/rails/test/system/italic_test.rb | 2 +- tests/rails/test/system/link_test.rb | 2 +- tests/rails/test/system/ordered_list_test.rb | 2 +- tests/rails/test/system/strike_test.rb | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/docs/specifying-accepted-file-types.test.js b/tests/docs/specifying-accepted-file-types.test.js index 2df0f935..1afac9ad 100644 --- a/tests/docs/specifying-accepted-file-types.test.js +++ b/tests/docs/specifying-accepted-file-types.test.js @@ -13,7 +13,7 @@ test("Should only allow PNG images to be added via file chooser", async ({ page await page.goto(pagePath) const fileChooserPromise = page.waitForEvent('filechooser'); - await page.locator("rhino-editor[accept='image/*'] role-toolbar button[part~='toolbar__button--attach-files']").click() + await page.locator("rhino-editor[accept='image/*'] slot[name='toolbar'] button[part~='toolbar__button--attach-files']").click() const fileChooser = await fileChooserPromise; await fileChooser.setFiles('./tests/fixtures/view-layer-benchmarks.png'); @@ -24,7 +24,7 @@ test("Should not allow non-png files to be added via file chooser", async ({ pag await page.goto(pagePath) const fileChooserPromise = page.waitForEvent('filechooser'); - await page.locator("rhino-editor[accept='image/*'] role-toolbar button[part~='toolbar__button--attach-files']").click() + await page.locator("rhino-editor[accept='image/*'] slot[name='toolbar'] button[part~='toolbar__button--attach-files']").click() const fileChooser = await fileChooserPromise; await fileChooser.setFiles('./tests/fixtures/thing.txt'); await expect(page.locator("rhino-editor#png-only figure")).not.toBeAttached() diff --git a/tests/rails/test/system/attachment_attributes_test.rb b/tests/rails/test/system/attachment_attributes_test.rb index 7ae112b3..d059aaa9 100644 --- a/tests/rails/test/system/attachment_attributes_test.rb +++ b/tests/rails/test/system/attachment_attributes_test.rb @@ -31,7 +31,7 @@ def trix_png_figure def attach_files(files) rhino_editor = page.expect_file_chooser do - page.locator("rhino-editor role-toolbar [part~='toolbar__button--attach-files']").first.click + page.locator("rhino-editor slot[name='toolbar'] [part~='toolbar__button--attach-files']").first.click end rhino_editor.set_files(files) diff --git a/tests/rails/test/system/attachment_galleries_test.rb b/tests/rails/test/system/attachment_galleries_test.rb index 981bb21e..3e3d8cb6 100644 --- a/tests/rails/test/system/attachment_galleries_test.rb +++ b/tests/rails/test/system/attachment_galleries_test.rb @@ -3,7 +3,7 @@ class AttachmentGalleriesTest < ApplicationSystemTestCase def attach_files(files) rhino_editor = page.expect_file_chooser do - page.locator("rhino-editor role-toolbar [part~='toolbar__button--attach-files']").first.click + page.locator("rhino-editor slot[name='toolbar'] [part~='toolbar__button--attach-files']").first.click end files = files.map { |file| file_fixture(file).to_s } diff --git a/tests/rails/test/system/blockquote_test.rb b/tests/rails/test/system/blockquote_test.rb index 98f1613f..8036d3dc 100644 --- a/tests/rails/test/system/blockquote_test.rb +++ b/tests/rails/test/system/blockquote_test.rb @@ -7,7 +7,7 @@ def setup end def block_quote_button(str = "") - page.locator("rhino-editor role-toolbar [part~='toolbar__button--blockquote']#{str}") + page.locator("rhino-editor slot[name='toolbar'] [part~='toolbar__button--blockquote']#{str}") end test "Should have aria-pressed when pressed" do diff --git a/tests/rails/test/system/bold_test.rb b/tests/rails/test/system/bold_test.rb index 31ae1c8d..0c3023d3 100644 --- a/tests/rails/test/system/bold_test.rb +++ b/tests/rails/test/system/bold_test.rb @@ -7,7 +7,7 @@ def setup end def bold_button(str = "") - page.locator("rhino-editor role-toolbar [part~='toolbar__button--bold']#{str}") + page.locator("rhino-editor slot[name='toolbar'] [part~='toolbar__button--bold']#{str}") end test "Should have aria-pressed when pressed" do diff --git a/tests/rails/test/system/bullet_list_test.rb b/tests/rails/test/system/bullet_list_test.rb index 59c6e02f..15867efa 100644 --- a/tests/rails/test/system/bullet_list_test.rb +++ b/tests/rails/test/system/bullet_list_test.rb @@ -7,7 +7,7 @@ def setup end def bullet_list_button(str = "") - page.locator("rhino-editor role-toolbar [part~='toolbar__button--bullet-list']#{str}") + page.locator("rhino-editor slot[name='toolbar'] [part~='toolbar__button--bullet-list']#{str}") end test "Should have aria-pressed when pressed" do diff --git a/tests/rails/test/system/code_block_test.rb b/tests/rails/test/system/code_block_test.rb index a25b8667..0f9c91d5 100644 --- a/tests/rails/test/system/code_block_test.rb +++ b/tests/rails/test/system/code_block_test.rb @@ -7,7 +7,7 @@ def setup end def code_block_button(str = "") - page.locator("rhino-editor role-toolbar [part~='toolbar__button--code-block']#{str}") + page.locator("rhino-editor slot[name='toolbar'] [part~='toolbar__button--code-block']#{str}") end test "Should have aria-pressed when pressed" do diff --git a/tests/rails/test/system/heading_test.rb b/tests/rails/test/system/heading_test.rb index 18081890..adedcf21 100644 --- a/tests/rails/test/system/heading_test.rb +++ b/tests/rails/test/system/heading_test.rb @@ -7,7 +7,7 @@ def setup end def heading_button(str = "") - page.locator("rhino-editor role-toolbar [part~='toolbar__button--heading']#{str}") + page.locator("rhino-editor slot[name='toolbar'] [part~='toolbar__button--heading']#{str}") end test "Should have aria-pressed when pressed" do diff --git a/tests/rails/test/system/italic_test.rb b/tests/rails/test/system/italic_test.rb index 478a49e8..7a6a5fe6 100644 --- a/tests/rails/test/system/italic_test.rb +++ b/tests/rails/test/system/italic_test.rb @@ -7,7 +7,7 @@ def setup end def italic_button(str = "") - page.locator("rhino-editor role-toolbar [part~='toolbar__button--italic']#{str}") + page.locator("rhino-editor slot[name='toolbar'] [part~='toolbar__button--italic']#{str}") end test "Should have aria-pressed when pressed" do diff --git a/tests/rails/test/system/link_test.rb b/tests/rails/test/system/link_test.rb index b23c9c49..7b682a78 100644 --- a/tests/rails/test/system/link_test.rb +++ b/tests/rails/test/system/link_test.rb @@ -7,7 +7,7 @@ def setup end def link_button(str = "") - page.locator("rhino-editor role-toolbar [part~='toolbar__button--link']#{str}") + page.locator("rhino-editor slot[name='toolbar'] [part~='toolbar__button--link']#{str}") end test "Should have aria-pressed when pressed" do diff --git a/tests/rails/test/system/ordered_list_test.rb b/tests/rails/test/system/ordered_list_test.rb index 519abcf0..593bdea2 100644 --- a/tests/rails/test/system/ordered_list_test.rb +++ b/tests/rails/test/system/ordered_list_test.rb @@ -7,7 +7,7 @@ def setup end def ordered_list_button(str = "") - page.locator("rhino-editor role-toolbar [part~='toolbar__button--ordered-list']#{str}") + page.locator("rhino-editor slot[name='toolbar'] [part~='toolbar__button--ordered-list']#{str}") end test "Should have aria-pressed when pressed" do diff --git a/tests/rails/test/system/strike_test.rb b/tests/rails/test/system/strike_test.rb index 0142910d..c15b0775 100644 --- a/tests/rails/test/system/strike_test.rb +++ b/tests/rails/test/system/strike_test.rb @@ -7,7 +7,7 @@ def setup end def strike_button(str = "") - page.locator("rhino-editor role-toolbar [part~='toolbar__button--strike']#{str}") + page.locator("rhino-editor slot[name='toolbar'] [part~='toolbar__button--strike']#{str}") end