Skip to content

Commit

Permalink
Fix leftnav nav-sync issue (SAP#1271)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxmarkus committed Apr 21, 2020
1 parent 4e94c20 commit dc909cf
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
1 change: 1 addition & 0 deletions core/src/App.html
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@
node.openNodeInModal === true ? {} : node.openNodeInModal
);
} else {
getComponentWrapper().set({ isNavigationSyncEnabled: true });
Routing.handleRouteClick(node, getComponentWrapper());
}
});
Expand Down
58 changes: 58 additions & 0 deletions test/e2e-test-application/e2e/tests/1-angular/navigation.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,64 @@ describe('Navigation', () => {

cy.get('[data-testid=modal-mf]').should('not.be.visible');
});

it('Nav sync - click sidenav', () => {
// projects page
cy.get('.fd-shellbar')
.contains('Projects')
.click();

//projects page
cy.get('.fd-app__sidebar')
.contains('Project Two')
.click();

cy.get('.fd-app__sidebar')
.contains('Nav Sync')
.click();

cy.expectPathToBe('/projects/pr2/nav-sync/one');

['four', 'three', 'two', 'three', 'two'].forEach(label => {
cy.get('.fd-app__sidebar')
.contains(label)
.click();

cy.expectPathToBe('/projects/pr2/nav-sync/' + label);

cy.getIframeBody().then($iframeBody => {
cy.wrap($iframeBody)
.find('.fd-list-group__item')
.contains('Current pathsegment: ' + label);
});
});
});
it('Nav sync - use synched nav', () => {
// projects page
cy.get('.fd-shellbar')
.contains('Projects')
.click();

//projects page
cy.get('.fd-app__sidebar')
.contains('Project Two')
.click();

cy.get('.fd-app__sidebar')
.contains('Nav Sync')
.click();

cy.expectPathToBe('/projects/pr2/nav-sync/one');

['two', 'three', 'four', 'one'].forEach((label, index) => {
cy.getIframeBody().then($iframeBody => {
cy.wrap($iframeBody)
.find('.fd-link')
.click();
});
cy.expectPathToBe('/projects/pr2/nav-sync/' + label);
});
});
});
describe('Horizontal Tab Navigation', () => {
context('Desktop', () => {
Expand Down

0 comments on commit dc909cf

Please sign in to comment.