Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into tab-accessibility
Browse files Browse the repository at this point in the history
  • Loading branch information
iammola committed Jan 8, 2025
2 parents 658e56d + 148a05a commit 160d97b
Show file tree
Hide file tree
Showing 143 changed files with 4,314 additions and 5,003 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- run: npm run build
- run: npm run test:cov
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
uses: sonarsource/sonarqube-scan-action@v4.1.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"packages": [
"packages/*"
],
"version": "2.0.0",
"version": "3.0.0",
"npmClient": "yarn",
"command": {
"publish": {
Expand Down
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,5 @@
},
"engines": {
"node": ">=18.0"
},
"dependencies": {
"ag-grid-vue3": "^31.1.1"
}
}
4 changes: 2 additions & 2 deletions packages/dockview-angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dockview-angular",
"version": "2.0.0",
"version": "3.0.0",
"description": "Zero dependency layout manager supporting tabs, grids and splitviews",
"keywords": [
"splitview",
Expand Down Expand Up @@ -54,6 +54,6 @@
"test:cov": "cross-env ../../node_modules/.bin/jest --selectProjects dockview --coverage"
},
"dependencies": {
"dockview-core": "^2.0.0"
"dockview-core": "^3.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/dockview-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dockview-core",
"version": "2.0.0",
"version": "3.0.0",
"description": "Zero dependency layout manager supporting tabs, grids and splitviews",
"keywords": [
"splitview",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { fireEvent } from '@testing-library/dom';
import { TestPanel } from '../../dockviewGroupPanelModel.spec';
import { IDockviewPanel } from '../../../../dockview/dockviewPanel';
import { fromPartial } from '@total-typescript/shoehorn';
import { DockviewPanelApi } from '../../../../api/dockviewPanelApi';

describe('tabsContainer', () => {
test('that an external event does not render a drop target and calls through to the group mode', () => {
Expand Down Expand Up @@ -828,4 +829,35 @@ describe('tabsContainer', () => {
expect(result).toBeTruthy();
expect(result!.childNodes.length).toBe(0);
});

test('class dv-single-tab is present when only one tab exists`', () => {
const cut = new TabsContainer(
fromPartial<DockviewComponent>({
options: {},
}),
fromPartial<DockviewGroupPanel>({})
);

expect(cut.element.classList.contains('dv-single-tab')).toBeFalsy();

const panel1 = new TestPanel(
'panel_1',
fromPartial<DockviewPanelApi>({})
);
cut.openPanel(panel1);
expect(cut.element.classList.contains('dv-single-tab')).toBeTruthy();

const panel2 = new TestPanel(
'panel_2',
fromPartial<DockviewPanelApi>({})
);
cut.openPanel(panel2);
expect(cut.element.classList.contains('dv-single-tab')).toBeFalsy();

cut.closePanel(panel1);
expect(cut.element.classList.contains('dv-single-tab')).toBeTruthy();

cut.closePanel(panel2);
expect(cut.element.classList.contains('dv-single-tab')).toBeFalsy();
});
});

This file was deleted.

Loading

0 comments on commit 160d97b

Please sign in to comment.