Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TBI - Add Freestyle OPA test templates and logic to ui5-test-writers #2932

Open
kjose90 opened this issue Feb 17, 2025 · 0 comments
Open

TBI - Add Freestyle OPA test templates and logic to ui5-test-writers #2932

kjose90 opened this issue Feb 17, 2025 · 0 comments
Assignees

Comments

@kjose90
Copy link
Member

kjose90 commented Feb 17, 2025

Description (include screenshots)

  • Add EJS templates to generate tests for fiori freestyle templates to ui5-test-writers.

  • AddgenerateFreestyleOPAFiles function to write OPA tests.

/**
 * Configuration interface for generating freestyle OPA test files
 */
export interface FFOPAConfig {
    appId: string;    
    applicationTitle?: string;
    applicationDescription?: string;
    enableTypeScript?: boolean;
    viewName?: string;
    ui5Version?: string;
    ui5Theme?: string;
}


export async function generateFreestyleOPAFiles(
    basePath: string,
    opaConfig: FFOPAConfig,
    fs?: Editor,
    log?: Logger
): Promise<Editor>
  • AddaddTests to FreestyleApp, appOptions, if addTests enabled - write OPA tests for fiori freestyle app.
export interface FreestyleApp<T> extends Ui5App {
    template: Template<T>;
    service?: OdataService & {
        capService?: CapServiceCdsInfo;
    };
    app: FioriApp;
    appOptions: Partial<AppOptions> & {
        /**
         * Generate OPA based tests, for Simple template.
         * This will eventually move up to {@link Ui5App.appOptions}
         */
        addTests?: boolean;
    };
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant