Skip to content

Commit

Permalink
chore: clean up code inconsistency
Browse files Browse the repository at this point in the history
  • Loading branch information
abdul99ahad committed Nov 13, 2024
1 parent de321aa commit aa5d66d
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions client/src/app/__tests__/AppSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const noop = () => {};

describe('<App>', function() {


describe('props', function() {

it('tabsProvider');
Expand All @@ -72,8 +73,10 @@ describe('<App>', function() {

describe('menu', function() {


describe('should update (calling onMenuUpdate)', function() {


it('on tab switch', async function() {

// given
Expand Down Expand Up @@ -154,6 +157,7 @@ describe('<App>', function() {

describe('should maintain initial state', function() {


it('on empty tab rendering', async function() {

// given
Expand All @@ -180,6 +184,7 @@ describe('<App>', function() {

describe('should indicate lastTab state', function() {


it('no last tab', async function() {

// given
Expand Down Expand Up @@ -257,6 +262,7 @@ describe('<App>', function() {

describe('should include activeTab', function() {


it('opened tab', async function() {

// given
Expand Down Expand Up @@ -307,6 +313,7 @@ describe('<App>', function() {

describe('no tabs', function() {


it('should render empty tab', function() {

// when
Expand All @@ -329,6 +336,7 @@ describe('<App>', function() {

describe('diagram creation', function() {


it('should create + open as tabs', async function() {

// given
Expand Down Expand Up @@ -366,6 +374,7 @@ describe('<App>', function() {

describe('#openFiles', function() {


it('should create tabs', async function() {

// given
Expand Down Expand Up @@ -524,6 +533,7 @@ describe('<App>', function() {

describe('#openEmptyFile', function() {


it('should open empty file', async function() {

// given
Expand Down Expand Up @@ -620,6 +630,7 @@ describe('<App>', function() {

describe('tab closing', function() {


it('should close active', async function() {

// given
Expand Down Expand Up @@ -1359,6 +1370,7 @@ describe('<App>', function() {

describe('tab loading', function() {


it('should support life-cycle', async function() {

// given
Expand Down Expand Up @@ -1808,6 +1820,7 @@ describe('<App>', function() {

describe('tab errors', function() {


it('should propagate', async function() {

// given
Expand Down Expand Up @@ -1884,6 +1897,7 @@ describe('<App>', function() {

describe('tab warnings', function() {


it('should propagate', async function() {

// given
Expand Down Expand Up @@ -1913,8 +1927,10 @@ describe('<App>', function() {

describe('workspace integration', function() {


describe('should notify #onWorkspaceChanged', function() {


it('on layout change', function() {

// given
Expand Down Expand Up @@ -1972,6 +1988,7 @@ describe('<App>', function() {

describe('panel', function() {


it('should render', function() {

// given
Expand Down Expand Up @@ -2207,6 +2224,7 @@ describe('<App>', function() {

describe('notifications', function() {


it('should display notification', async function() {

// given
Expand Down Expand Up @@ -2757,6 +2775,7 @@ describe('<App>', function() {

describe('#showOpenFilesDialog', function() {


it('should open dialog and open files', async function() {

// given
Expand Down Expand Up @@ -3025,6 +3044,7 @@ describe('<App>', function() {

describe('#loadPlugins', function() {


it('should load plugins', function() {

// given
Expand Down Expand Up @@ -3143,6 +3163,7 @@ describe('<App>', function() {

describe('#handleDrop', function() {


it('should try to open each dropped file', async function() {

// given
Expand Down Expand Up @@ -3224,8 +3245,10 @@ describe('<App>', function() {

describe('dialogs', function() {


describe('#getOpenFileErrorDialog', function() {


it('should list all supported file endings', function() {

// given
Expand Down Expand Up @@ -3280,6 +3303,7 @@ describe('<App>', function() {

describe('#revealTabInFileExplorer', function() {


it('should call dialog#showFileExplorerDialog', async function() {

// given
Expand Down Expand Up @@ -3309,6 +3333,7 @@ describe('<App>', function() {

describe('linting', function() {


it('should lint tab (no errors)', async function() {

// given
Expand Down Expand Up @@ -3512,8 +3537,10 @@ describe('<App>', function() {

describe('reload', function() {


describe('no unsaved changed', function() {


it('should not show dialog', async function() {

// given
Expand Down Expand Up @@ -3542,6 +3569,7 @@ describe('<App>', function() {

describe('unsaved changes', function() {


it('should sve changes and reload app', async function() {

// given
Expand Down Expand Up @@ -3569,6 +3597,7 @@ describe('<App>', function() {
expect(reload).to.have.been.called;
});


it('should reload app without saving', async function() {

// given
Expand Down

0 comments on commit aa5d66d

Please sign in to comment.