-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from EmmanuelDemey/master
Some Fix for A11Y
- Loading branch information
Showing
16 changed files
with
382 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,11 @@ | |
padding-right: 5px; | ||
} | ||
} | ||
|
||
.navbar-nav { | ||
width: 100%; | ||
} | ||
|
||
.navbar-icon { | ||
color: #ffffff; | ||
font-size: 17px; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
import { mapStateToProps, HELP, VIEW, CREATE } from './index'; | ||
import { NOT_LOADED, LOADED } from 'js/constants'; | ||
|
||
describe('', () => { | ||
it('should return NOT_LOADED for the metadataStructureStatus', () => { | ||
const input = {}; | ||
const expected = { | ||
metadataStructureStatus: NOT_LOADED, | ||
metadataStructure: [], | ||
}; | ||
expect(mapStateToProps(input)).toEqual(expected); | ||
}); | ||
|
||
it('should return a empty object as currenSims for the HELP MODE', () => { | ||
const input = { | ||
operationsMetadataStructureList: { | ||
results: 'operationsMetadataStructureList', | ||
status: LOADED, | ||
}, | ||
app: { | ||
properties: { | ||
lg1: 'lg1', | ||
lg2: 'lg2', | ||
}, | ||
}, | ||
}; | ||
|
||
const props = { | ||
mode: HELP, | ||
match: { | ||
params: { | ||
id: 1, | ||
}, | ||
}, | ||
}; | ||
const output = mapStateToProps(input, props); | ||
expect(output.currentSims).toEqual({}); | ||
}); | ||
|
||
it('should return a currenSims with a default label for the CREATE MODE', () => { | ||
const input = { | ||
operationsMetadataStructureList: { | ||
results: 'operationsMetadataStructureList', | ||
status: LOADED, | ||
}, | ||
app: { | ||
properties: { | ||
lg1: 'lg1', | ||
lg2: 'lg2', | ||
}, | ||
}, | ||
operationsSeriesCurrentStatus: LOADED, | ||
operationsSeriesCurrent: { | ||
id: 2, | ||
prefLabelLg1: 'prefLabelLg1', | ||
prefLabelLg2: 'prefLabelLg2', | ||
}, | ||
}; | ||
|
||
const props = { | ||
mode: CREATE, | ||
match: { | ||
params: { | ||
idParent: 2, | ||
0: 'series', | ||
}, | ||
}, | ||
}; | ||
const output = mapStateToProps(input, props); | ||
expect(output.currentSims).toEqual({ | ||
labelLg1: 'prefLabelLg1 SIMS', | ||
labelLg2: 'SIMS de la série prefLabelLg2', | ||
}); | ||
expect(output.parentType).toEqual('series'); | ||
}); | ||
|
||
it('should return a complete currenSims for the VIEW MODE', () => { | ||
const input = { | ||
operationsMetadataStructureList: { | ||
results: 'operationsMetadataStructureList', | ||
status: LOADED, | ||
}, | ||
app: { | ||
properties: { | ||
lg1: 'lg1', | ||
lg2: 'lg2', | ||
}, | ||
}, | ||
operationsSimsCurrent: { | ||
id: 1, | ||
idOperation: 2, | ||
}, | ||
}; | ||
|
||
const props = { | ||
mode: VIEW, | ||
match: { | ||
params: { | ||
id: 1, | ||
}, | ||
}, | ||
}; | ||
const output = mapStateToProps(input, props); | ||
expect(output.currentSims).toEqual({ | ||
id: 1, | ||
idOperation: 2, | ||
}); | ||
expect(output.parentType).toEqual('operation'); | ||
}); | ||
|
||
it('should return the langes', () => { | ||
const input = { | ||
operationsMetadataStructureList: { | ||
results: 'operationsMetadataStructureList', | ||
status: LOADED, | ||
}, | ||
app: { | ||
properties: { | ||
lg1: 'lg1', | ||
lg2: 'lg2', | ||
}, | ||
}, | ||
}; | ||
|
||
const props = { | ||
mode: HELP, | ||
match: { | ||
params: { | ||
id: 1, | ||
}, | ||
}, | ||
}; | ||
expect(mapStateToProps(input, props).langs).toEqual({ | ||
lg1: 'lg1', | ||
lg2: 'lg2', | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.