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

Karma reporting framework contains an non-functioning API (unable to write JSON result to file) #6

Closed
devanshah2 opened this issue Mar 16, 2017 · 1 comment
Labels
karma-accessibility-checker Issues in the karma-accessibility-checker component user-reported Issues identified outside of the core team

Comments

@devanshah2
Copy link

Currently there exists an issues open in the open source karma tool where we are not able to send object from client side to server side: karma-runner/karma#2192

Currently they have no plan to fix the issues, until there are more votes on the open source karma issues.

Therefore I am implementing a way for people to still be able to write the results to JSON from karma so that they can generate baselines files for their scans.

@devanshah2 devanshah2 changed the title Karma version v1.* broke the reporting framework, investigate what is causing it and talk to Karma developers Karma version v1.* broke the reporting framework Mar 16, 2017
@devanshah2 devanshah2 changed the title Karma version v1.* broke the reporting framework Placeholder Mar 16, 2017
@devanshah2 devanshah2 changed the title Placeholder Karma version v1.* broke the reporting framework Mar 21, 2017
@devanshah2
Copy link
Author

The way the work around works is, by simply calling the following: Focus on the block "REFER TO THIS PART"

                    // Perform the accessibility scan using the IBMaScan Wrapper
                    AAT.getCompliance(unitTestFile, unitTestFileKey, function (results) {

                        var returnCode = AAT.assertCompliance(results);
                         
                        // REFER TO THIS PART
                        // For the workaround need to make the testcase fail so that the results are sent to the server side and there is a parse that reads the string and converts it into JSON and writes it to file
                        expect(returnCode).toBe(0, JSON.stringify(results));

                        // Mark the testcases as done.
                        done();
                    });

Before making use of this workaround make sure you are using either frameworks jasmine or mocha and set color: false in karma config

        // enable / disable colors in the output (reporters and logs)
        colors: false,

Also make sure to only use the default karma reporter progress with AAT

reporters: ['progress', 'AAT']

@devanshah2 devanshah2 reopened this Mar 21, 2017
@devanshah2 devanshah2 changed the title Karma version v1.* broke the reporting framework Karma version v1.* broke the reporting framework (unable to write JSON result to file) Mar 21, 2017
@devanshah2 devanshah2 changed the title Karma version v1.* broke the reporting framework (unable to write JSON result to file) Karma reporting framework contains an non-functioning API (unable to write JSON result to file) Mar 29, 2017
marcjohlic referenced this issue in IBMa/Va11yS May 3, 2018
changed reporters from reporters: ['spec', 'AAT']  to 'progress' per Devan's workaround https://github.com/IBMa/AAT/issues/3#issuecomment-288124645
@tombrunet tombrunet transferred this issue from another repository Apr 2, 2020
@tombrunet tombrunet added the karma-accessibility-checker Issues in the karma-accessibility-checker component label May 19, 2020
@MHoov MHoov added the user-reported Issues identified outside of the core team label May 13, 2024
@MHoov MHoov closed this as completed May 13, 2024
@MHoov MHoov reopened this May 13, 2024
@MHoov MHoov closed this as completed Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
karma-accessibility-checker Issues in the karma-accessibility-checker component user-reported Issues identified outside of the core team
Projects
None yet
Development

No branches or pull requests

3 participants