mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-09 22:24:05 -08:00
fix: Adjust set up template button styles (no-changelog) (#8259)
This commit is contained in:
parent
fc2903096e
commit
38d91c43e3
|
@ -2,4 +2,4 @@
|
|||
* Getters
|
||||
*/
|
||||
|
||||
export const getSetupWorkflowCredentialsButton = () => cy.get(`button:contains("Set up Template")`);
|
||||
export const getSetupWorkflowCredentialsButton = () => cy.get(`button:contains("Set up template")`);
|
||||
|
|
|
@ -15,6 +15,20 @@ const workflowPage = new WorkflowPage();
|
|||
|
||||
const testTemplate = templateCredentialsSetupPage.testData.simpleTemplate;
|
||||
|
||||
// NodeView uses beforeunload listener that will show a browser
|
||||
// native popup, which will block cypress from continuing / exiting.
|
||||
// This prevent the registration of the listener.
|
||||
Cypress.on('window:before:load', (win) => {
|
||||
const origAddEventListener = win.addEventListener;
|
||||
win.addEventListener = (eventName: string, listener: any, opts: any) => {
|
||||
if (eventName === 'beforeunload') {
|
||||
return;
|
||||
}
|
||||
|
||||
return origAddEventListener.call(win, eventName, listener, opts);
|
||||
};
|
||||
});
|
||||
|
||||
describe('Template credentials setup', () => {
|
||||
beforeEach(() => {
|
||||
cy.intercept('GET', `https://api.n8n.io/api/templates/workflows/${testTemplate.id}`, {
|
||||
|
@ -159,10 +173,6 @@ describe('Template credentials setup', () => {
|
|||
templateCredentialsSetupPage.getters.skipLink().click();
|
||||
|
||||
getSetupWorkflowCredentialsButton().should('be.visible');
|
||||
|
||||
// We need to save the workflow or otherwise a browser native popup
|
||||
// will block cypress from continuing
|
||||
workflowPage.actions.saveWorkflowOnButtonClick();
|
||||
});
|
||||
|
||||
it('should allow credential setup from workflow editor if user fills in credentials partially during template setup', () => {
|
||||
|
@ -203,10 +213,6 @@ describe('Template credentials setup', () => {
|
|||
});
|
||||
|
||||
getSetupWorkflowCredentialsButton().should('not.exist');
|
||||
|
||||
// We need to save the workflow or otherwise a browser native popup
|
||||
// will block cypress from continuing
|
||||
workflowPage.actions.saveWorkflowOnButtonClick();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -65,6 +65,8 @@ onBeforeUnmount(() => {
|
|||
v-if="showButton"
|
||||
:label="i18n.baseText('nodeView.setupTemplate')"
|
||||
size="large"
|
||||
icon="box-open"
|
||||
type="secondary"
|
||||
@click="handleClick()"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
@ -1095,7 +1095,7 @@
|
|||
"nodeView.zoomOut": "Zoom Out",
|
||||
"nodeView.zoomToFit": "Zoom to Fit",
|
||||
"nodeView.replaceMe": "Replace Me",
|
||||
"nodeView.setupTemplate": "Set up Template",
|
||||
"nodeView.setupTemplate": "Set up template",
|
||||
"contextMenu.node": "node | nodes",
|
||||
"contextMenu.sticky": "sticky note | sticky notes",
|
||||
"contextMenu.selectAll": "Select all",
|
||||
|
|
Loading…
Reference in a new issue