Skip to content

Commit

Permalink
Merge branch 'main' into group-row-placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
mollykreis authored Mar 18, 2024
2 parents 0c5f479 + a112528 commit 33241ad
Show file tree
Hide file tree
Showing 10 changed files with 92 additions and 54 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Marking tests that fail on some browsers",
"packageName": "@ni/nimble-components",
"email": "[email protected]",
"dependentChangeType": "none"
}
12 changes: 6 additions & 6 deletions packages/nimble-components/src/dialog/tests/dialog.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')!;
Expand All @@ -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')!;
Expand All @@ -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/1943
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');
Expand Down
14 changes: 7 additions & 7 deletions packages/nimble-components/src/drawer/tests/drawer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ describe('Drawer', () => {
await expectAsync(promise).toBePending();
});

// Firefox skipped, see: https://github.com/ni/nimble/issues/1075
// Firefox skipped, see: https://github.com/ni/nimble/issues/1937
it('should resolve promise if drawer completely opens before being closed #SkipFirefox', async () => {
const promise = element.show();
await completeAnimationAsync(element);
Expand Down Expand Up @@ -235,24 +235,24 @@ 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();
void element.show();
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/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');
secondDrawer.append(secondDrawerButton);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,8 @@ describe('RichTextEditorMention', () => {
expect(pageObject.getMentionButtonLabel(0)).toBe('');
});

it('should have button title and text when `button-label` updated', async () => {
// 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';
await waitForUpdatesAsync();
Expand Down Expand Up @@ -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 () => {
// 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();
await pageObject.clickUserMentionButton();
Expand All @@ -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 () => {
// 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();
await pageObject.setEditorTextContent('Text');
Expand Down Expand Up @@ -1354,7 +1357,8 @@ describe('RichTextEditorMentionListbox', () => {
expect(pageObject.isMentionListboxOpened()).toBeFalse();
});

it('setting `disabled` should close the mention popup', async () => {
// 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' },
{ key: 'user:2', displayName: 'username2' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
// WebKit skipped, see 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();
}
);
});
});

Expand All @@ -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 () => {
// 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();
await pageObject.setEditorTextContent('Plain text 2');
Expand All @@ -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 () => {
// 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');
await pageObject.pressShiftEnterKeysInEditor();
Expand All @@ -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 () => {
// 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');
await pageObject.pressShiftEnterKeysInEditor();
Expand Down Expand Up @@ -437,7 +448,8 @@ describe('RichTextEditor', () => {
});
});

it('should have br tag name when pressing shift + Enter with numbered list content', async () => {
// 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);
await pageObject.pressShiftEnterKeysInEditor();
Expand Down Expand Up @@ -496,7 +508,8 @@ describe('RichTextEditor', () => {
).toBeTrue();
});

it('should have br tag name when pressing shift + Enter with nested numbered lists content', async () => {
// 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);
await pageObject.pressEnterKeyInEditor();
Expand Down Expand Up @@ -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 () => {
// 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);
await pageObject.pressShiftEnterKeysInEditor();
Expand Down Expand Up @@ -644,7 +658,8 @@ describe('RichTextEditor', () => {
).toBeTrue();
});

it('should have br tag name when pressing shift + Enter with nested bulleted lists content', async () => {
// 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);
await pageObject.pressEnterKeyInEditor();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,8 @@ describe('Markdown serializer', () => {
* Nested bulleted list`);
});

it('Hard break', async () => {
// WebKit skipped, see 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');
Expand All @@ -284,7 +285,8 @@ Plain text 2\
Plain text 3`);
});

it('Hard break with bold', async () => {
// 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');
await pageObject.pressShiftEnterKeysInEditor();
Expand All @@ -293,7 +295,8 @@ Plain text 3`);
**Bold**`);
});

it('Hard break with italics', async () => {
// 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');
await pageObject.pressShiftEnterKeysInEditor();
Expand All @@ -302,7 +305,8 @@ Plain text 3`);
*Italics*`);
});

it('Hard break with bulleted list', async () => {
// 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);
await pageObject.pressShiftEnterKeysInEditor();
Expand All @@ -311,7 +315,8 @@ Plain text 3`);
list`);
});

it('Hard break with numbered list', async () => {
// 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);
await pageObject.pressShiftEnterKeysInEditor();
Expand All @@ -320,7 +325,8 @@ Plain text 3`);
list`);
});

it('Hard break with mention node', async () => {
// 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' }
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ describe('TableColumnDateText', () => {
});
});

it('changing fieldName updates display', async () => {
// WebKit skipped, see 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(),
Expand All @@ -137,7 +138,8 @@ describe('TableColumnDateText', () => {
);
});

it('changing data from value to null displays blank', async () => {
// 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() }
]);
Expand All @@ -154,7 +156,8 @@ describe('TableColumnDateText', () => {
expect(pageObject.getRenderedCellContent(0, 0)).toEqual('');
});

it('changing data from null to value displays value', async () => {
// 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();
expect(pageObject.getRenderedCellContent(0, 0)).toEqual('');
Expand All @@ -179,7 +182,8 @@ describe('TableColumnDateText', () => {
expect(pageObject.getRenderedCellContent(0, 0)).toEqual('');
});

it('sets title when cell text is ellipsized', async () => {
// 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([
{ field: new Date('Dec 10, 2012, 10:35:05 PM').valueOf() }
Expand Down Expand Up @@ -231,7 +235,8 @@ describe('TableColumnDateText', () => {
expect(pageObject.getCellTitle(0, 0)).toEqual('');
});

it('sets group header text to rendered date value', async () => {
// 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() }
]);
Expand All @@ -251,7 +256,8 @@ describe('TableColumnDateText', () => {
expect(pageObject.getRenderedCellContent(0, 0)).toBe('12/10/2012');
});

it('updates displayed date when lang token changes', async () => {
// 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() }
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
// 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]);
// size table below threshhold of total column widths
Expand Down
Loading

0 comments on commit 33241ad

Please sign in to comment.