refactor: Set up Cypress as pnpm workspace (no-changelog) (#6049)

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
Iván Ovejero
2024-06-10 15:49:50 +02:00
committed by GitHub
parent bc3dcf706f
commit af3ac2db28
79 changed files with 435 additions and 315 deletions

View File

@@ -10,7 +10,7 @@ export const getCloseBecomeTemplateCreatorCtaButton = () =>
//#region Actions
export const interceptCtaRequestWithResponse = (becomeCreator: boolean) => {
return cy.intercept('GET', `/rest/cta/become-creator`, {
return cy.intercept('GET', '/rest/cta/become-creator', {
body: becomeCreator,
});
};

View File

@@ -42,7 +42,7 @@ export function closeCredentialModal() {
getCredentialModalCloseButton().click();
}
export function setCredentialValues(values: Record<string, any>, save = true) {
export function setCredentialValues(values: Record<string, string>, save = true) {
Object.entries(values).forEach(([key, value]) => {
setCredentialConnectionParameterInputByName(key, value);
});

View File

@@ -2,7 +2,7 @@
* Getters
*/
import { getVisibleSelect } from "../utils";
import { getVisibleSelect } from '../utils';
export function getCredentialSelect(eq = 0) {
return cy.getByTestId('node-credentials-select').eq(eq);
@@ -75,7 +75,7 @@ export function setParameterInputByName(name: string, value: string) {
}
export function toggleParameterCheckboxInputByName(name: string) {
getParameterInputByName(name).find('input[type="checkbox"]').realClick()
getParameterInputByName(name).find('input[type="checkbox"]').realClick();
}
export function setParameterSelectByContent(name: string, content: string) {

View File

@@ -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")');

View File

@@ -51,7 +51,7 @@ export function getNodeByName(name: string) {
export function disableNode(name: string) {
const target = getNodeByName(name);
target.rightclick(name ? 'center' : 'topLeft', { force: true });
cy.getByTestId(`context-menu-item-toggle_activation`).click();
cy.getByTestId('context-menu-item-toggle_activation').click();
}
export function getConnectionBySourceAndTarget(source: string, target: string) {