Skip to content

Commit

Permalink
Ensure default Link Action behaviour is not changed (no need to set t…
Browse files Browse the repository at this point in the history
…arget to '_blank')
  • Loading branch information
lukestanley committed Jul 5, 2024
1 parent 0ea04b8 commit 915b69b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions cypress/e2e/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ describe('LinkActionComponent', () => {
cy.get('app-link-action a').should('have.attr', 'href', '/testAdapter/testWorkflow');
});

it('should open the link with a blank target', () => {
it('should not have no link target by default', () => {
// The default behavior should be to open the link in the same tab,
// it's up to the user and their user-agent to decide how to handle the link.
loadFlowCode([
{
"type": "link-action",
Expand All @@ -100,7 +102,7 @@ describe('LinkActionComponent', () => {
"workflowId": "myWorkflow"
}
]);
cy.get('app-link-action a').should('have.attr', 'target', '_blank');
cy.get('app-link-action a').should('not.have.attr', 'target');
});

});
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<a [href]="linkUrl" target="_blank" mat-flat-button>{{ label }}</a>
<a [href]="linkUrl" mat-flat-button>{{ label }}</a>

0 comments on commit 915b69b

Please sign in to comment.