From 37469d302f4f190fc6e8c842105199dae5733144 Mon Sep 17 00:00:00 2001 From: Jesse Attas Date: Fri, 15 Mar 2024 16:42:19 -0500 Subject: [PATCH 01/12] Drawer and dialog --- .../src/dialog/tests/dialog.spec.ts | 12 +++++------ .../src/drawer/tests/drawer.spec.ts | 20 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/packages/nimble-components/src/dialog/tests/dialog.spec.ts b/packages/nimble-components/src/dialog/tests/dialog.spec.ts index 1dc9f0f293..ae1225179e 100644 --- a/packages/nimble-components/src/dialog/tests/dialog.spec.ts +++ b/packages/nimble-components/src/dialog/tests/dialog.spec.ts @@ -272,8 +272,8 @@ describe('Dialog', () => { await disconnect(); }); - // Firefox skipped, see: https://github.com/ni/nimble/issues/1075 - it('focuses the first button on the dialog when it opens #SkipFirefox', async () => { + // Some browsers skipped, see: https://github.com/ni/nimble/issues/1936 + it('focuses the first button on the dialog when it opens #SkipFirefox #SkipWebkit', async () => { const { element, connect, disconnect } = await setup(); await connect(); const okButton = document.getElementById('ok')!; @@ -285,8 +285,8 @@ describe('Dialog', () => { await disconnect(); }); - // Firefox skipped, see: https://github.com/ni/nimble/issues/1075 - it('focuses the button with autofocus when the dialog opens #SkipFirefox', async () => { + // Some browsers skipped, see: https://github.com/ni/nimble/issues/1936 + it('focuses the button with autofocus when the dialog opens #SkipFirefox #SkipWebkit', async () => { const { element, connect, disconnect } = await setup(); await connect(); const cancelButton = document.getElementById('cancel')!; @@ -300,8 +300,8 @@ describe('Dialog', () => { await disconnect(); }); - // Firefox skipped, see: https://github.com/ni/nimble/issues/1075 - it('supports opening multiple dialogs on top of each other #SkipFirefox', async () => { + // Some browsers skipped, see: https://github.com/ni/nimble/issues/1936 + it('supports opening multiple dialogs on top of each other #SkipFirefox #SkipWebkit', async () => { const { element, connect, disconnect } = await setup(); await connect(); const secondDialog = document.createElement('nimble-dialog'); diff --git a/packages/nimble-components/src/drawer/tests/drawer.spec.ts b/packages/nimble-components/src/drawer/tests/drawer.spec.ts index 99a99ff98f..b473b44a7d 100644 --- a/packages/nimble-components/src/drawer/tests/drawer.spec.ts +++ b/packages/nimble-components/src/drawer/tests/drawer.spec.ts @@ -43,10 +43,10 @@ describe('Drawer', () => { return new Promise(resolve => { const dialogElement = nativeDialogElement(nimbleDrawerElement); const handler = (): void => { - dialogElement.removeEventListener(eventAnimationEnd, handler); + dialogElement.removeEventListener('animationend', handler); resolve(); }; - dialogElement.addEventListener(eventAnimationEnd, handler); + dialogElement.addEventListener('animationend', handler); }); } @@ -133,8 +133,8 @@ describe('Drawer', () => { await expectAsync(promise).toBePending(); }); - // Firefox skipped, see: https://github.com/ni/nimble/issues/1075 - it('should resolve promise if drawer completely opens before being closed #SkipFirefox', async () => { + // Firefox skipped, see: https://github.com/ni/nimble/issues/1937 + it('should resolve promise if drawer completely opens before being closed', async () => { const promise = element.show(); await completeAnimationAsync(element); element.close(); @@ -235,15 +235,15 @@ describe('Drawer', () => { expect(afterDrawerCloseActiveElement).toBe(button2); }); - // Firefox skipped, see: https://github.com/ni/nimble/issues/1075 - it('focuses the first button on the drawer when it opens #SkipFirefox', () => { + // Some browsers skipped, see: https://github.com/ni/nimble/issues/1936 + it('focuses the first button on the drawer when it opens #SkipFirefox #SkipWebkit', () => { const okButton = document.getElementById('ok')!; void element.show(); expect(document.activeElement).toBe(okButton); }); - // Firefox skipped, see: https://github.com/ni/nimble/issues/1075 - it('focuses the button with autofocus when the drawer opens #SkipFirefox', () => { + // Some browsers skipped, see: https://github.com/ni/nimble/issues/1936 + it('focuses the button with autofocus when the drawer opens #SkipFirefox #SkipWebkit', () => { const cancelButton = document.getElementById('cancel')!; cancelButton.setAttribute('autofocus', ''); processUpdates(); @@ -251,8 +251,8 @@ describe('Drawer', () => { expect(document.activeElement).toBe(cancelButton); }); - // Firefox skipped, see: https://github.com/ni/nimble/issues/1075 - it('supports opening multiple drawers on top of each other #SkipFirefox', () => { + // Some browsers skipped, see: https://github.com/ni/nimble/issues/1936 + it('supports opening multiple drawers on top of each other #SkipFirefox #SkipWebkit', () => { const secondDrawer = document.createElement('nimble-drawer'); const secondDrawerButton = document.createElement('nimble-button'); secondDrawer.append(secondDrawerButton); From f4617a41578491547dad12ebf7b16737830665cf Mon Sep 17 00:00:00 2001 From: Jesse Attas Date: Fri, 15 Mar 2024 16:49:39 -0500 Subject: [PATCH 02/12] Rich text --- .../tests/rich-text-editor-mention.spec.ts | 12 +++-- .../editor/tests/rich-text-editor.spec.ts | 53 ++++++++++++------- .../models/tests/markdown-serializer.spec.ts | 18 ++++--- 3 files changed, 54 insertions(+), 29 deletions(-) diff --git a/packages/nimble-components/src/rich-text/editor/tests/rich-text-editor-mention.spec.ts b/packages/nimble-components/src/rich-text/editor/tests/rich-text-editor-mention.spec.ts index f149d9bae7..b240150851 100644 --- a/packages/nimble-components/src/rich-text/editor/tests/rich-text-editor-mention.spec.ts +++ b/packages/nimble-components/src/rich-text/editor/tests/rich-text-editor-mention.spec.ts @@ -353,7 +353,8 @@ describe('RichTextEditorMention', () => { expect(pageObject.getMentionButtonLabel(0)).toBe(''); }); - it('should have button title and text when `button-label` updated', async () => { + // Skipped in Safari: https://github.com/ni/nimble/issues/1938 + it('should have button title and text when `button-label` updated #SkipWebkit', async () => { const { userMentionElement } = await appendUserMentionConfiguration(element); userMentionElement.buttonLabel = 'at mention'; await waitForUpdatesAsync(); @@ -1032,7 +1033,8 @@ describe('RichTextEditor user mention via template', () => { expect(pageObject.getEditorFirstChildTextContent()).toBe('User @'); }); - it('should get `@` text without a preceding whitespace after a hard break, when button clicked', async () => { + // Skipped in Safari: https://github.com/ni/nimble/issues/1938 + it('should get `@` text without a preceding whitespace after a hard break, when button clicked #SkipWebkit', async () => { await pageObject.setEditorTextContent('User'); await pageObject.pressShiftEnterKeysInEditor(); await pageObject.clickUserMentionButton(); @@ -1045,7 +1047,8 @@ describe('RichTextEditor user mention via template', () => { expect(pageObject.getEditorFirstChildTextContent()).toBe('User@'); }); - it('should get `@` text with a single preceding whitespace after a hard break with a text, when button clicked', async () => { + // Skipped in Safari: https://github.com/ni/nimble/issues/1938 + it('should get `@` text with a single preceding whitespace after a hard break with a text, when button clicked #SkipWebkit', async () => { await pageObject.setEditorTextContent('User'); await pageObject.pressShiftEnterKeysInEditor(); await pageObject.setEditorTextContent('Text'); @@ -1354,7 +1357,8 @@ describe('RichTextEditorMentionListbox', () => { expect(pageObject.isMentionListboxOpened()).toBeFalse(); }); - it('setting `disabled` should close the mention popup', async () => { + // Skipped in Safari: https://github.com/ni/nimble/issues/1938 + it('setting `disabled` should close the mention popup #SkipWebkit', async () => { await appendUserMentionConfiguration(element, [ { key: 'user:1', displayName: 'username1' }, { key: 'user:2', displayName: 'username2' } diff --git a/packages/nimble-components/src/rich-text/editor/tests/rich-text-editor.spec.ts b/packages/nimble-components/src/rich-text/editor/tests/rich-text-editor.spec.ts index 2aebf54f11..2a720c81db 100644 --- a/packages/nimble-components/src/rich-text/editor/tests/rich-text-editor.spec.ts +++ b/packages/nimble-components/src/rich-text/editor/tests/rich-text-editor.spec.ts @@ -215,20 +215,28 @@ describe('RichTextEditor', () => { describe('keyboard shortcuts should update the checked state of the buttons', () => { parameterizeSpec(formattingButtons, (spec, name, value) => { - spec(`"${name}" button keyboard shortcut check`, async () => { - expect( - pageObject.getButtonCheckedState(value.toolbarButtonIndex) - ).toBeFalse(); + spec( + // Skipped in Safari: https://github.com/ni/nimble/issues/1938 + `"${name}" button keyboard shortcut check #SkipWebkit`, + async () => { + expect( + pageObject.getButtonCheckedState( + value.toolbarButtonIndex + ) + ).toBeFalse(); - await pageObject.clickEditorShortcutKeys( - value.shortcutKey, - value.shiftKey - ); + await pageObject.clickEditorShortcutKeys( + value.shortcutKey, + value.shiftKey + ); - expect( - pageObject.getButtonCheckedState(value.toolbarButtonIndex) - ).toBeTrue(); - }); + expect( + pageObject.getButtonCheckedState( + value.toolbarButtonIndex + ) + ).toBeTrue(); + } + ); }); }); @@ -255,7 +263,8 @@ describe('RichTextEditor', () => { }); describe('rich text formatting options to its respective HTML elements', () => { - it('should have "br" tag name when clicking shift + enter', async () => { + // Skipped in Safari: https://github.com/ni/nimble/issues/1938 + it('should have br tag name when pressing shift + enter #SkipWebkit', async () => { await pageObject.setEditorTextContent('Plain text 1'); await pageObject.pressShiftEnterKeysInEditor(); await pageObject.setEditorTextContent('Plain text 2'); @@ -272,7 +281,8 @@ describe('RichTextEditor', () => { expect(pageObject.getEditorLeafContents()).toEqual(['bold']); }); - it('should have br tag name when pressing shift + Enter with bold content', async () => { + // Skipped in Safari: https://github.com/ni/nimble/issues/1938 + it('should have br tag name when pressing shift + Enter with bold content #SkipWebkit', async () => { await pageObject.toggleFooterButton(ToolbarButton.bold); await pageObject.setEditorTextContent('bold1'); await pageObject.pressShiftEnterKeysInEditor(); @@ -294,7 +304,8 @@ describe('RichTextEditor', () => { expect(pageObject.getEditorLeafContents()).toEqual(['italics']); }); - it('should have br tag name when pressing shift + Enter with Italics content', async () => { + // Skipped in Safari: https://github.com/ni/nimble/issues/1938 + it('should have br tag name when pressing shift + Enter with Italics content #SkipWebkit', async () => { await pageObject.toggleFooterButton(ToolbarButton.italics); await pageObject.setEditorTextContent('italics1'); await pageObject.pressShiftEnterKeysInEditor(); @@ -437,7 +448,8 @@ describe('RichTextEditor', () => { }); }); - it('should have br tag name when pressing shift + Enter with numbered list content', async () => { + // Skipped in Safari: https://github.com/ni/nimble/issues/1938 + it('should have br tag name when pressing shift + Enter with numbered list content #SkipWebkit', async () => { await pageObject.setEditorTextContent('numbered list1'); await pageObject.toggleFooterButton(ToolbarButton.numberedList); await pageObject.pressShiftEnterKeysInEditor(); @@ -496,7 +508,8 @@ describe('RichTextEditor', () => { ).toBeTrue(); }); - it('should have br tag name when pressing shift + Enter with nested numbered lists content', async () => { + // Skipped in Safari: https://github.com/ni/nimble/issues/1938 + it('should have br tag name when pressing shift + Enter with nested numbered lists content #SkipWebkit', async () => { await pageObject.setEditorTextContent('List'); await pageObject.toggleFooterButton(ToolbarButton.numberedList); await pageObject.pressEnterKeyInEditor(); @@ -585,7 +598,8 @@ describe('RichTextEditor', () => { expect(pageObject.getEditorLeafContents()).toEqual(['Bullet List']); }); - it('should have br tag name when pressing shift + Enter with bulleted list content', async () => { + // Skipped in Safari: https://github.com/ni/nimble/issues/1938 + it('should have br tag name when pressing shift + Enter with bulleted list content #SkipWebkit', async () => { await pageObject.setEditorTextContent('Bulleted List 1'); await pageObject.toggleFooterButton(ToolbarButton.bulletList); await pageObject.pressShiftEnterKeysInEditor(); @@ -644,7 +658,8 @@ describe('RichTextEditor', () => { ).toBeTrue(); }); - it('should have br tag name when pressing shift + Enter with nested bulleted lists content', async () => { + // Skipped in Safari: https://github.com/ni/nimble/issues/1938 + it('should have br tag name when pressing shift + Enter with nested bulleted lists content #SkipWebkit', async () => { await pageObject.setEditorTextContent('List'); await pageObject.toggleFooterButton(ToolbarButton.bulletList); await pageObject.pressEnterKeyInEditor(); diff --git a/packages/nimble-components/src/rich-text/models/tests/markdown-serializer.spec.ts b/packages/nimble-components/src/rich-text/models/tests/markdown-serializer.spec.ts index 493afc3567..88f25dd1d6 100644 --- a/packages/nimble-components/src/rich-text/models/tests/markdown-serializer.spec.ts +++ b/packages/nimble-components/src/rich-text/models/tests/markdown-serializer.spec.ts @@ -273,7 +273,8 @@ describe('Markdown serializer', () => { * Nested bulleted list`); }); - it('Hard break', async () => { + // Skipped in Safari: https://github.com/ni/nimble/issues/1938 + it('Hard break #SkipWebkit', async () => { await pageObject.setEditorTextContent('Plain text 1'); await pageObject.pressShiftEnterKeysInEditor(); await pageObject.setEditorTextContent('Plain text 2'); @@ -284,7 +285,8 @@ Plain text 2\ Plain text 3`); }); - it('Hard break with bold', async () => { + // Skipped in Safari: https://github.com/ni/nimble/issues/1938 + it('Hard break with bold #SkipWebkit', async () => { await pageObject.toggleFooterButton(ToolbarButton.bold); await pageObject.setEditorTextContent('Bold'); await pageObject.pressShiftEnterKeysInEditor(); @@ -293,7 +295,8 @@ Plain text 3`); **Bold**`); }); - it('Hard break with italics', async () => { + // Skipped in Safari: https://github.com/ni/nimble/issues/1938 + it('Hard break with italics #SkipWebkit', async () => { await pageObject.toggleFooterButton(ToolbarButton.italics); await pageObject.setEditorTextContent('Italics'); await pageObject.pressShiftEnterKeysInEditor(); @@ -302,7 +305,8 @@ Plain text 3`); *Italics*`); }); - it('Hard break with bulleted list', async () => { + // Skipped in Safari: https://github.com/ni/nimble/issues/1938 + it('Hard break with bulleted list #SkipWebkit', async () => { await pageObject.setEditorTextContent('Bulleted'); await pageObject.toggleFooterButton(ToolbarButton.bulletList); await pageObject.pressShiftEnterKeysInEditor(); @@ -311,7 +315,8 @@ Plain text 3`); list`); }); - it('Hard break with numbered list', async () => { + // Skipped in Safari: https://github.com/ni/nimble/issues/1938 + it('Hard break with numbered list #SkipWebkit', async () => { await pageObject.setEditorTextContent('Numbered'); await pageObject.toggleFooterButton(ToolbarButton.numberedList); await pageObject.pressShiftEnterKeysInEditor(); @@ -320,7 +325,8 @@ Plain text 3`); list`); }); - it('Hard break with mention node', async () => { + // Skipped in Safari: https://github.com/ni/nimble/issues/1938 + it('Hard break with mention node #SkipWebkit', async () => { await appendUserMentionConfiguration(element, [ { key: 'user:1', displayName: 'username1' } ]); From 4c63b51da81ec3d945a097509a3aa0e22212a972 Mon Sep 17 00:00:00 2001 From: Jesse Attas Date: Fri, 15 Mar 2024 16:55:44 -0500 Subject: [PATCH 03/12] Column sizing webkit --- .../src/table/tests/table-column-sizing.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/nimble-components/src/table/tests/table-column-sizing.spec.ts b/packages/nimble-components/src/table/tests/table-column-sizing.spec.ts index bbdc7e8086..c4b87255a6 100644 --- a/packages/nimble-components/src/table/tests/table-column-sizing.spec.ts +++ b/packages/nimble-components/src/table/tests/table-column-sizing.spec.ts @@ -495,7 +495,8 @@ describe('Table Interactive Column Sizing', () => { expect(pageObject.isHorizontalScrollbarVisible()).toBeTrue(); }); - it('sizing table with a horizontal scrollbar does not change column widths until sized beyond current column pixel widths', async () => { + // Disabled on webkit https://github.com/ni/nimble/issues/1939 + it('sizing table with a horizontal scrollbar does not change column widths until sized beyond current column pixel widths #SkipWebkit', async () => { // create horizontal scrollbar with total column width of 450 pageObject.dragSizeColumnByRightDivider(2, [100]); // size table below threshhold of total column widths From f3b3a584279b7c7b53651ab30f0155407572659f Mon Sep 17 00:00:00 2001 From: Jesse Attas Date: Fri, 15 Mar 2024 17:01:42 -0500 Subject: [PATCH 04/12] date formatting webkit --- .../tests/table-column-date-text.spec.ts | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/packages/nimble-components/src/table-column/date-text/tests/table-column-date-text.spec.ts b/packages/nimble-components/src/table-column/date-text/tests/table-column-date-text.spec.ts index 17da6cf4de..1c2ae6c757 100644 --- a/packages/nimble-components/src/table-column/date-text/tests/table-column-date-text.spec.ts +++ b/packages/nimble-components/src/table-column/date-text/tests/table-column-date-text.spec.ts @@ -119,7 +119,8 @@ describe('TableColumnDateText', () => { }); }); - it('changing fieldName updates display', async () => { + // Disabled in WebKit: https://github.com/ni/nimble/issues/1940 + it('changing fieldName updates display #SkipWebkit', async () => { await table.setData([ { field: new Date('Dec 10, 2012, 10:35:05 PM').valueOf(), @@ -136,7 +137,8 @@ describe('TableColumnDateText', () => { ); }); - it('changing data from value to null displays blank', async () => { + // Disabled in WebKit: https://github.com/ni/nimble/issues/1940 + it('changing data from value to null displays blank #SkipWebkit', async () => { await table.setData([ { field: new Date('Dec 10, 2012, 10:35:05 PM').valueOf() } ]); @@ -153,7 +155,8 @@ describe('TableColumnDateText', () => { expect(pageObject.getRenderedCellContent(0, 0)).toEqual(''); }); - it('changing data from null to value displays value', async () => { + // Disabled in WebKit: https://github.com/ni/nimble/issues/1940 + it('changing data from null to value displays value #SkipWebkit', async () => { await table.setData([{ field: null }]); await waitForUpdatesAsync(); expect(pageObject.getRenderedCellContent(0, 0)).toEqual(''); @@ -178,7 +181,8 @@ describe('TableColumnDateText', () => { expect(pageObject.getRenderedCellContent(0, 0)).toEqual(''); }); - it('sets title when cell text is ellipsized', async () => { + // Disabled in WebKit: https://github.com/ni/nimble/issues/1940 + it('sets title when cell text is ellipsized #SkipWebkit', async () => { table.style.width = '200px'; await table.setData([ { field: new Date('Dec 10, 2012, 10:35:05 PM').valueOf() } @@ -230,7 +234,8 @@ describe('TableColumnDateText', () => { expect(pageObject.getCellTitle(0, 0)).toEqual(''); }); - it('sets group header text to rendered date value', async () => { + // Disabled in WebKit: https://github.com/ni/nimble/issues/1940 + it('sets group header text to rendered date value #SkipWebkit', async () => { await table.setData([ { field: new Date('Dec 10, 2012, 10:35:05 PM').valueOf() } ]); @@ -250,7 +255,8 @@ describe('TableColumnDateText', () => { expect(pageObject.getRenderedCellContent(0, 0)).toBe('12/10/2012'); }); - it('updates displayed date when lang token changes', async () => { + // Disabled in WebKit: https://github.com/ni/nimble/issues/1940 + it('updates displayed date when lang token changes #SkipWebkit', async () => { await table.setData([ { field: new Date('Dec 10, 2012, 10:35:05 PM').valueOf() } ]); From 9077aba3cf3885e46ac502ec13df3280ad4623b0 Mon Sep 17 00:00:00 2001 From: Jesse Attas Date: Fri, 15 Mar 2024 17:02:16 -0500 Subject: [PATCH 05/12] Change files --- ...le-components-1e68ef0e-2e70-4f32-86a4-e9073c251a0e.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 change/@ni-nimble-components-1e68ef0e-2e70-4f32-86a4-e9073c251a0e.json diff --git a/change/@ni-nimble-components-1e68ef0e-2e70-4f32-86a4-e9073c251a0e.json b/change/@ni-nimble-components-1e68ef0e-2e70-4f32-86a4-e9073c251a0e.json new file mode 100644 index 0000000000..a9f32d1b2e --- /dev/null +++ b/change/@ni-nimble-components-1e68ef0e-2e70-4f32-86a4-e9073c251a0e.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "Marking tests that fail on some browsers", + "packageName": "@ni/nimble-components", + "email": "jattasNI@users.noreply.github.com", + "dependentChangeType": "none" +} From f0b3340150b57d64376b40a3a111acb28bc091b0 Mon Sep 17 00:00:00 2001 From: Jesse Attas Date: Fri, 15 Mar 2024 17:13:01 -0500 Subject: [PATCH 06/12] Revert experiment --- packages/nimble-components/src/drawer/tests/drawer.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nimble-components/src/drawer/tests/drawer.spec.ts b/packages/nimble-components/src/drawer/tests/drawer.spec.ts index b473b44a7d..776c9435a8 100644 --- a/packages/nimble-components/src/drawer/tests/drawer.spec.ts +++ b/packages/nimble-components/src/drawer/tests/drawer.spec.ts @@ -43,10 +43,10 @@ describe('Drawer', () => { return new Promise(resolve => { const dialogElement = nativeDialogElement(nimbleDrawerElement); const handler = (): void => { - dialogElement.removeEventListener('animationend', handler); + dialogElement.removeEventListener(eventAnimationEnd, handler); resolve(); }; - dialogElement.addEventListener('animationend', handler); + dialogElement.addEventListener(eventAnimationEnd, handler); }); } From 01eac9390576cddb550b0881fd68a66ac18672b5 Mon Sep 17 00:00:00 2001 From: Jesse Attas Date: Fri, 15 Mar 2024 17:13:26 -0500 Subject: [PATCH 07/12] re-skip firefox --- packages/nimble-components/src/drawer/tests/drawer.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nimble-components/src/drawer/tests/drawer.spec.ts b/packages/nimble-components/src/drawer/tests/drawer.spec.ts index 776c9435a8..2c07e2eb6f 100644 --- a/packages/nimble-components/src/drawer/tests/drawer.spec.ts +++ b/packages/nimble-components/src/drawer/tests/drawer.spec.ts @@ -134,7 +134,7 @@ describe('Drawer', () => { }); // Firefox skipped, see: https://github.com/ni/nimble/issues/1937 - it('should resolve promise if drawer completely opens before being closed', async () => { + it('should resolve promise if drawer completely opens before being closed #SkipFirefox', async () => { const promise = element.show(); await completeAnimationAsync(element); element.close(); From c9036330a2816e59ceccd66b849743a7d5a13296 Mon Sep 17 00:00:00 2001 From: Jesse Attas Date: Fri, 15 Mar 2024 17:15:56 -0500 Subject: [PATCH 08/12] More consistent tagging --- .../tests/rich-text-editor-mention.spec.ts | 8 ++++---- .../editor/tests/rich-text-editor.spec.ts | 16 ++++++++-------- .../models/tests/markdown-serializer.spec.ts | 12 ++++++------ .../src/table/tests/table-column-sizing.spec.ts | 2 +- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/packages/nimble-components/src/rich-text/editor/tests/rich-text-editor-mention.spec.ts b/packages/nimble-components/src/rich-text/editor/tests/rich-text-editor-mention.spec.ts index b240150851..40839a1bd4 100644 --- a/packages/nimble-components/src/rich-text/editor/tests/rich-text-editor-mention.spec.ts +++ b/packages/nimble-components/src/rich-text/editor/tests/rich-text-editor-mention.spec.ts @@ -353,7 +353,7 @@ describe('RichTextEditorMention', () => { expect(pageObject.getMentionButtonLabel(0)).toBe(''); }); - // Skipped in Safari: https://github.com/ni/nimble/issues/1938 + // WebKit skipped, see https://github.com/ni/nimble/issues/1938 it('should have button title and text when `button-label` updated #SkipWebkit', async () => { const { userMentionElement } = await appendUserMentionConfiguration(element); userMentionElement.buttonLabel = 'at mention'; @@ -1033,7 +1033,7 @@ describe('RichTextEditor user mention via template', () => { expect(pageObject.getEditorFirstChildTextContent()).toBe('User @'); }); - // Skipped in Safari: https://github.com/ni/nimble/issues/1938 + // WebKit skipped, see https://github.com/ni/nimble/issues/1938 it('should get `@` text without a preceding whitespace after a hard break, when button clicked #SkipWebkit', async () => { await pageObject.setEditorTextContent('User'); await pageObject.pressShiftEnterKeysInEditor(); @@ -1047,7 +1047,7 @@ describe('RichTextEditor user mention via template', () => { expect(pageObject.getEditorFirstChildTextContent()).toBe('User@'); }); - // Skipped in Safari: https://github.com/ni/nimble/issues/1938 + // WebKit skipped, see https://github.com/ni/nimble/issues/1938 it('should get `@` text with a single preceding whitespace after a hard break with a text, when button clicked #SkipWebkit', async () => { await pageObject.setEditorTextContent('User'); await pageObject.pressShiftEnterKeysInEditor(); @@ -1357,7 +1357,7 @@ describe('RichTextEditorMentionListbox', () => { expect(pageObject.isMentionListboxOpened()).toBeFalse(); }); - // Skipped in Safari: https://github.com/ni/nimble/issues/1938 + // WebKit skipped, see https://github.com/ni/nimble/issues/1938 it('setting `disabled` should close the mention popup #SkipWebkit', async () => { await appendUserMentionConfiguration(element, [ { key: 'user:1', displayName: 'username1' }, diff --git a/packages/nimble-components/src/rich-text/editor/tests/rich-text-editor.spec.ts b/packages/nimble-components/src/rich-text/editor/tests/rich-text-editor.spec.ts index 2a720c81db..a7bccd0633 100644 --- a/packages/nimble-components/src/rich-text/editor/tests/rich-text-editor.spec.ts +++ b/packages/nimble-components/src/rich-text/editor/tests/rich-text-editor.spec.ts @@ -216,7 +216,7 @@ describe('RichTextEditor', () => { describe('keyboard shortcuts should update the checked state of the buttons', () => { parameterizeSpec(formattingButtons, (spec, name, value) => { spec( - // Skipped in Safari: https://github.com/ni/nimble/issues/1938 + // WebKit skipped, see https://github.com/ni/nimble/issues/1938 `"${name}" button keyboard shortcut check #SkipWebkit`, async () => { expect( @@ -263,7 +263,7 @@ describe('RichTextEditor', () => { }); describe('rich text formatting options to its respective HTML elements', () => { - // Skipped in Safari: https://github.com/ni/nimble/issues/1938 + // WebKit skipped, see https://github.com/ni/nimble/issues/1938 it('should have br tag name when pressing shift + enter #SkipWebkit', async () => { await pageObject.setEditorTextContent('Plain text 1'); await pageObject.pressShiftEnterKeysInEditor(); @@ -281,7 +281,7 @@ describe('RichTextEditor', () => { expect(pageObject.getEditorLeafContents()).toEqual(['bold']); }); - // Skipped in Safari: https://github.com/ni/nimble/issues/1938 + // WebKit skipped, see https://github.com/ni/nimble/issues/1938 it('should have br tag name when pressing shift + Enter with bold content #SkipWebkit', async () => { await pageObject.toggleFooterButton(ToolbarButton.bold); await pageObject.setEditorTextContent('bold1'); @@ -304,7 +304,7 @@ describe('RichTextEditor', () => { expect(pageObject.getEditorLeafContents()).toEqual(['italics']); }); - // Skipped in Safari: https://github.com/ni/nimble/issues/1938 + // WebKit skipped, see https://github.com/ni/nimble/issues/1938 it('should have br tag name when pressing shift + Enter with Italics content #SkipWebkit', async () => { await pageObject.toggleFooterButton(ToolbarButton.italics); await pageObject.setEditorTextContent('italics1'); @@ -448,7 +448,7 @@ describe('RichTextEditor', () => { }); }); - // Skipped in Safari: https://github.com/ni/nimble/issues/1938 + // WebKit skipped, see https://github.com/ni/nimble/issues/1938 it('should have br tag name when pressing shift + Enter with numbered list content #SkipWebkit', async () => { await pageObject.setEditorTextContent('numbered list1'); await pageObject.toggleFooterButton(ToolbarButton.numberedList); @@ -508,7 +508,7 @@ describe('RichTextEditor', () => { ).toBeTrue(); }); - // Skipped in Safari: https://github.com/ni/nimble/issues/1938 + // WebKit skipped, see https://github.com/ni/nimble/issues/1938 it('should have br tag name when pressing shift + Enter with nested numbered lists content #SkipWebkit', async () => { await pageObject.setEditorTextContent('List'); await pageObject.toggleFooterButton(ToolbarButton.numberedList); @@ -598,7 +598,7 @@ describe('RichTextEditor', () => { expect(pageObject.getEditorLeafContents()).toEqual(['Bullet List']); }); - // Skipped in Safari: https://github.com/ni/nimble/issues/1938 + // WebKit skipped, see https://github.com/ni/nimble/issues/1938 it('should have br tag name when pressing shift + Enter with bulleted list content #SkipWebkit', async () => { await pageObject.setEditorTextContent('Bulleted List 1'); await pageObject.toggleFooterButton(ToolbarButton.bulletList); @@ -658,7 +658,7 @@ describe('RichTextEditor', () => { ).toBeTrue(); }); - // Skipped in Safari: https://github.com/ni/nimble/issues/1938 + // WebKit skipped, see https://github.com/ni/nimble/issues/1938 it('should have br tag name when pressing shift + Enter with nested bulleted lists content #SkipWebkit', async () => { await pageObject.setEditorTextContent('List'); await pageObject.toggleFooterButton(ToolbarButton.bulletList); diff --git a/packages/nimble-components/src/rich-text/models/tests/markdown-serializer.spec.ts b/packages/nimble-components/src/rich-text/models/tests/markdown-serializer.spec.ts index 88f25dd1d6..121625c218 100644 --- a/packages/nimble-components/src/rich-text/models/tests/markdown-serializer.spec.ts +++ b/packages/nimble-components/src/rich-text/models/tests/markdown-serializer.spec.ts @@ -273,7 +273,7 @@ describe('Markdown serializer', () => { * Nested bulleted list`); }); - // Skipped in Safari: https://github.com/ni/nimble/issues/1938 + // WebKit skipped, see https://github.com/ni/nimble/issues/1938 it('Hard break #SkipWebkit', async () => { await pageObject.setEditorTextContent('Plain text 1'); await pageObject.pressShiftEnterKeysInEditor(); @@ -285,7 +285,7 @@ Plain text 2\ Plain text 3`); }); - // Skipped in Safari: https://github.com/ni/nimble/issues/1938 + // WebKit skipped, see https://github.com/ni/nimble/issues/1938 it('Hard break with bold #SkipWebkit', async () => { await pageObject.toggleFooterButton(ToolbarButton.bold); await pageObject.setEditorTextContent('Bold'); @@ -295,7 +295,7 @@ Plain text 3`); **Bold**`); }); - // Skipped in Safari: https://github.com/ni/nimble/issues/1938 + // WebKit skipped, see https://github.com/ni/nimble/issues/1938 it('Hard break with italics #SkipWebkit', async () => { await pageObject.toggleFooterButton(ToolbarButton.italics); await pageObject.setEditorTextContent('Italics'); @@ -305,7 +305,7 @@ Plain text 3`); *Italics*`); }); - // Skipped in Safari: https://github.com/ni/nimble/issues/1938 + // WebKit skipped, see https://github.com/ni/nimble/issues/1938 it('Hard break with bulleted list #SkipWebkit', async () => { await pageObject.setEditorTextContent('Bulleted'); await pageObject.toggleFooterButton(ToolbarButton.bulletList); @@ -315,7 +315,7 @@ Plain text 3`); list`); }); - // Skipped in Safari: https://github.com/ni/nimble/issues/1938 + // WebKit skipped, see https://github.com/ni/nimble/issues/1938 it('Hard break with numbered list #SkipWebkit', async () => { await pageObject.setEditorTextContent('Numbered'); await pageObject.toggleFooterButton(ToolbarButton.numberedList); @@ -325,7 +325,7 @@ Plain text 3`); list`); }); - // Skipped in Safari: https://github.com/ni/nimble/issues/1938 + // WebKit skipped, see https://github.com/ni/nimble/issues/1938 it('Hard break with mention node #SkipWebkit', async () => { await appendUserMentionConfiguration(element, [ { key: 'user:1', displayName: 'username1' } diff --git a/packages/nimble-components/src/table/tests/table-column-sizing.spec.ts b/packages/nimble-components/src/table/tests/table-column-sizing.spec.ts index c4b87255a6..56012c72c5 100644 --- a/packages/nimble-components/src/table/tests/table-column-sizing.spec.ts +++ b/packages/nimble-components/src/table/tests/table-column-sizing.spec.ts @@ -495,7 +495,7 @@ describe('Table Interactive Column Sizing', () => { expect(pageObject.isHorizontalScrollbarVisible()).toBeTrue(); }); - // Disabled on webkit https://github.com/ni/nimble/issues/1939 + // WebKit skipped, see https://github.com/ni/nimble/issues/1939 it('sizing table with a horizontal scrollbar does not change column widths until sized beyond current column pixel widths #SkipWebkit', async () => { // create horizontal scrollbar with total column width of 450 pageObject.dragSizeColumnByRightDivider(2, [100]); From a29f000864e777edb26580f2d5adb6aa0fba1e3e Mon Sep 17 00:00:00 2001 From: Jesse Attas Date: Fri, 15 Mar 2024 17:17:02 -0500 Subject: [PATCH 09/12] consistent tagging --- .../date-text/tests/table-column-date-text.spec.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/nimble-components/src/table-column/date-text/tests/table-column-date-text.spec.ts b/packages/nimble-components/src/table-column/date-text/tests/table-column-date-text.spec.ts index 1c2ae6c757..39c27995ff 100644 --- a/packages/nimble-components/src/table-column/date-text/tests/table-column-date-text.spec.ts +++ b/packages/nimble-components/src/table-column/date-text/tests/table-column-date-text.spec.ts @@ -119,7 +119,7 @@ describe('TableColumnDateText', () => { }); }); - // Disabled in WebKit: https://github.com/ni/nimble/issues/1940 + // WebKit skipped, see https://github.com/ni/nimble/issues/1940 it('changing fieldName updates display #SkipWebkit', async () => { await table.setData([ { @@ -137,7 +137,7 @@ describe('TableColumnDateText', () => { ); }); - // Disabled in WebKit: https://github.com/ni/nimble/issues/1940 + // WebKit skipped, see https://github.com/ni/nimble/issues/1940 it('changing data from value to null displays blank #SkipWebkit', async () => { await table.setData([ { field: new Date('Dec 10, 2012, 10:35:05 PM').valueOf() } @@ -155,7 +155,7 @@ describe('TableColumnDateText', () => { expect(pageObject.getRenderedCellContent(0, 0)).toEqual(''); }); - // Disabled in WebKit: https://github.com/ni/nimble/issues/1940 + // WebKit skipped, see https://github.com/ni/nimble/issues/1940 it('changing data from null to value displays value #SkipWebkit', async () => { await table.setData([{ field: null }]); await waitForUpdatesAsync(); @@ -181,7 +181,7 @@ describe('TableColumnDateText', () => { expect(pageObject.getRenderedCellContent(0, 0)).toEqual(''); }); - // Disabled in WebKit: https://github.com/ni/nimble/issues/1940 + // WebKit skipped, see https://github.com/ni/nimble/issues/1940 it('sets title when cell text is ellipsized #SkipWebkit', async () => { table.style.width = '200px'; await table.setData([ @@ -234,7 +234,7 @@ describe('TableColumnDateText', () => { expect(pageObject.getCellTitle(0, 0)).toEqual(''); }); - // Disabled in WebKit: https://github.com/ni/nimble/issues/1940 + // WebKit skipped, see https://github.com/ni/nimble/issues/1940 it('sets group header text to rendered date value #SkipWebkit', async () => { await table.setData([ { field: new Date('Dec 10, 2012, 10:35:05 PM').valueOf() } @@ -255,7 +255,7 @@ describe('TableColumnDateText', () => { expect(pageObject.getRenderedCellContent(0, 0)).toBe('12/10/2012'); }); - // Disabled in WebKit: https://github.com/ni/nimble/issues/1940 + // WebKit skipped, see https://github.com/ni/nimble/issues/1940 it('updates displayed date when lang token changes #SkipWebkit', async () => { await table.setData([ { field: new Date('Dec 10, 2012, 10:35:05 PM').valueOf() } From fcf66b002ffc7380f2cc5a3892fc621eab855ea1 Mon Sep 17 00:00:00 2001 From: Jesse Attas Date: Fri, 15 Mar 2024 17:27:13 -0500 Subject: [PATCH 10/12] Another table test --- packages/nimble-components/src/table/tests/table.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/nimble-components/src/table/tests/table.spec.ts b/packages/nimble-components/src/table/tests/table.spec.ts index 8d0fad78c7..0eaaa3ee11 100644 --- a/packages/nimble-components/src/table/tests/table.spec.ts +++ b/packages/nimble-components/src/table/tests/table.spec.ts @@ -677,7 +677,8 @@ describe('Table', () => { verifyRenderedData(dataSubsetAtEnd); }); - it('and calls focusedRecycleCallback on focused cell views when a scroll happens', async () => { + // WebKit skipped, see https://github.com/ni/nimble/issues/1942 + it('and calls focusedRecycleCallback on focused cell views when a scroll happens #SkipWebkit', async () => { const focusableColumn = document.createElement( focusableColumnName ) as TestFocusableTableColumn; From 2f134bafbd52b8292d9fe1a11ea4d391e8b935ef Mon Sep 17 00:00:00 2001 From: Jesse Attas Date: Fri, 15 Mar 2024 17:39:02 -0500 Subject: [PATCH 11/12] Different issue for dialog equality failure --- packages/nimble-components/src/dialog/tests/dialog.spec.ts | 2 +- packages/nimble-components/src/drawer/tests/drawer.spec.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nimble-components/src/dialog/tests/dialog.spec.ts b/packages/nimble-components/src/dialog/tests/dialog.spec.ts index ae1225179e..89a81e6cdc 100644 --- a/packages/nimble-components/src/dialog/tests/dialog.spec.ts +++ b/packages/nimble-components/src/dialog/tests/dialog.spec.ts @@ -300,7 +300,7 @@ describe('Dialog', () => { await disconnect(); }); - // Some browsers skipped, see: https://github.com/ni/nimble/issues/1936 + // Some browsers skipped, see: https://github.com/ni/nimble/issues/1943 it('supports opening multiple dialogs on top of each other #SkipFirefox #SkipWebkit', async () => { const { element, connect, disconnect } = await setup(); await connect(); diff --git a/packages/nimble-components/src/drawer/tests/drawer.spec.ts b/packages/nimble-components/src/drawer/tests/drawer.spec.ts index 2c07e2eb6f..eefa3b0f52 100644 --- a/packages/nimble-components/src/drawer/tests/drawer.spec.ts +++ b/packages/nimble-components/src/drawer/tests/drawer.spec.ts @@ -251,7 +251,7 @@ describe('Drawer', () => { expect(document.activeElement).toBe(cancelButton); }); - // Some browsers skipped, see: https://github.com/ni/nimble/issues/1936 + // Some browsers skipped, see: https://github.com/ni/nimble/issues/1943 it('supports opening multiple drawers on top of each other #SkipFirefox #SkipWebkit', () => { const secondDrawer = document.createElement('nimble-drawer'); const secondDrawerButton = document.createElement('nimble-button'); From 64bdf6c87b1dfdd283d062ad4a269c19f1692569 Mon Sep 17 00:00:00 2001 From: Jesse Attas Date: Fri, 15 Mar 2024 17:44:43 -0500 Subject: [PATCH 12/12] Unskip tests that now pass in Firefox --- .../src/table/components/header/tests/table-header.spec.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/nimble-components/src/table/components/header/tests/table-header.spec.ts b/packages/nimble-components/src/table/components/header/tests/table-header.spec.ts index 73afb916b5..fd72467373 100644 --- a/packages/nimble-components/src/table/components/header/tests/table-header.spec.ts +++ b/packages/nimble-components/src/table/components/header/tests/table-header.spec.ts @@ -46,8 +46,7 @@ describe('TableHeader', () => { expect(pageObject.isSortDescendingIconVisible()).toBeFalse(); }); - // Firefox skipped, see: https://github.com/ni/nimble/issues/1075 - it('has correct state when sorted ascending #SkipFirefox', async () => { + it('has correct state when sorted ascending', async () => { element.sortDirection = TableColumnSortDirection.ascending; element.firstSortedColumn = true; await waitForUpdatesAsync(); @@ -57,8 +56,7 @@ describe('TableHeader', () => { expect(pageObject.isSortDescendingIconVisible()).toBeFalse(); }); - // Firefox skipped, see: https://github.com/ni/nimble/issues/1075 - it('has correct state when sorted descending #SkipFirefox', async () => { + it('has correct state when sorted descending', async () => { element.sortDirection = TableColumnSortDirection.descending; element.firstSortedColumn = true; await waitForUpdatesAsync();