fix(editor): Issue showing Auth2 callback section when all properties are overriden (#8999)

This commit is contained in:
Ricardo Espinoza
2024-04-04 05:30:37 -04:00
committed by GitHub
parent bc6575afbb
commit dff8f7ac94
3 changed files with 51 additions and 2 deletions

View File

@@ -236,4 +236,29 @@ describe('Credentials', () => {
.find('input')
.should('have.value', NEW_QUERY_AUTH_ACCOUNT_NAME);
});
it('should not show OAuth redirect URL section when OAuth2 credentials are overridden', () => {
cy.intercept('/types/credentials.json', { middleware: true }, (req) => {
req.headers['cache-control'] = 'no-cache, no-store';
req.on('response', (res) => {
const credentials = res.body || [];
const index = credentials.findIndex((c) => c.name === 'slackOAuth2Api');
credentials[index] = {
...credentials[index],
__overwrittenProperties: ['clientId', 'clientSecret'],
};
});
});
workflowPage.actions.visit(true);
workflowPage.actions.addNodeToCanvas('Slack');
workflowPage.actions.openNode('Slack');
workflowPage.getters.nodeCredentialsSelect().click();
getVisibleSelect().find('li').last().click();
credentialsModal.getters.credentialAuthTypeRadioButtons().first().click();
nodeDetailsView.getters.copyInput().should('not.exist');
});
});