<commit_before>describe('Near Field Communication Tests', function () {

    describe("Adapter specs without engine activation", function () {

        it("Property \"supported\" should return true if NFC supported on this device", function () {
            var spec = new ManualSpec(jasmine, window.document);
            spec.addGoal(jasmine.getEnv().currentSpec.description);
            spec.addExpectation("Property \"supported\" should return \"true\" if device supports NFC feature");
            spec.displayScenario();
            spec.waitForButtonPressing("Run test");

            runs(function () {
                spec.addResult("Property \"supported\"", Rho.NFC.Adapter.supported);
                spec.displayResults();
                spec.waitForResponse();
            });
        });

        it("Property \"version\" should return version of the NFC engine", function () {
            var spec = new ManualSpec(jasmine, window.document);
            spec.addGoal(jasmine.getEnv().currentSpec.description);
            spec.addPrecondition("Device with NFC feature");
            spec.addExpectation("Property \"version\" should return string with version of NFC engine");
            spec.displayScenario();
            spec.waitForButtonPressing("Run test");

            runs(function () {
                spec.addResult("Property \"version\"", Rho.NFC.Adapter.version);
                spec.displayResults();
                spec.waitForResponse();
            });
        });

        it("Method \"activate\" should activate NFC engine", function () {
            var spec = new ManualSpec(jasmine, window.document);
            spec.addGoal(jasmine.getEnv().currentSpec.description);
            spec.addPrecondition("Device with NFC feature");
            spec.addExpectation("Result of method activate should be \"OK\" if NFC engine activated successfully");
            spec.addExpectation("Property \"isActive\" should return true if NFC engine activated successfully");
            spec.displayScenario();
            spec.waitForButtonPressing("Run test");

            runs(function () {
                spec.addResult("Result of executing method \"activate\"", Rho.NFC.Adapter.activate());
                spec.addResult("Property \"isActive\"", Rho.NFC.Adapter.isActive);
                spec.displayResults();
                spec.waitForResponse();
            });
        });

        it("Method \"stop\" should deactivate NFC engine", function () {
            var spec = new ManualSpec(jasmine, window.document);
            spec.addGoal(jasmine.getEnv().currentSpec.description);
            spec.addPrecondition("Device with NFC feature");
            spec.addExpectation("Result of method stop should be \"OK\" if NFC engine deactivated successfully");
            spec.addExpectation("Property \"isActive\" should return false if NFC engine deactivated successfully");
            spec.displayScenario();
            spec.waitForButtonPressing("Run test");

            runs(function () {
                Rho.NFC.Adapter.activate();
                spec.addResult("Result of executing method \"stop\"", Rho.NFC.Adapter.stop());
                spec.addResult("Property \"isActive\"", Rho.NFC.Adapter.isActive);
                spec.displayResults();
                spec.waitForResponse();<commit_msg>NFC specs updated<commit_after>describe('Near Field Communication Tests', function () {

    describe("Adapter specs without engine activation", function () {

        it("Property \"supported\" should return true if NFC supported on this device", function () {
            var spec = new ManualSpec(jasmine, window.document);
            spec.addGoal(jasmine.getEnv().currentSpec.description);
            spec.addExpectation("Property \"supported\" should return \"true\" if device supports NFC feature");
            spec.displayScenario();
            spec.waitForButtonPressing("Run test");

            runs(function () {
                spec.addResult("Property \"supported\"", Rho.NFC.Adapter.supported);
                spec.displayResults();
                spec.waitForResponse();
            });
        });

        it("Property \"version\" should return version of the NFC engine", function () {
            var spec = new ManualSpec(jasmine, window.document);
            spec.addGoal(jasmine.getEnv().currentSpec.description);
            spec.addPrecondition("Device with NFC feature");
            spec.addExpectation("Property \"version\" should return string with version of NFC engine");
            spec.displayScenario();
            spec.waitForButtonPressing("Run test");

            runs(function () {
                spec.addResult("Property \"version\"", Rho.NFC.Adapter.version);
                spec.displayResults();
                spec.waitForResponse();
            });
        });

        it("Method \"activate\" should activate NFC engine", function () {
            var spec = new ManualSpec(jasmine, window.document);
            spec.addGoal(jasmine.getEnv().currentSpec.description);
            spec.addPrecondition("Device with NFC feature");
            spec.addExpectation("Result of method activate should be \"OK\" if NFC engine activated successfully");
            spec.addExpectation("Property \"isActive\" should return true if NFC engine activated successfully");
            spec.displayScenario();
            spec.waitForButtonPressing("Run test");

            runs(function () {
                Rho.NFC.Adapter.activate();
                spec.addResult("Property \"isActive\"", Rho.NFC.Adapter.isActive);
                spec.displayResults();
                spec.waitForResponse();
            });
        });

        it("Method \"stop\" should deactivate NFC engine", function () {
            var spec = new ManualSpec(jasmine, window.document);
            spec.addGoal(jasmine.getEnv().currentSpec.description);
            spec.addPrecondition("Device with NFC feature");
            spec.addExpectation("Result of method stop should be \"OK\" if NFC engine deactivated successfully");
            spec.addExpectation("Property \"isActive\" should return false if NFC engine deactivated successfully");
            spec.displayScenario();
            spec.waitForButtonPressing("Run test");

            runs(function () {
                Rho.NFC.Adapter.activate();
                Rho.NFC.Adapter.stop();
                spec.addResult("Property \"isActive\"", Rho.NFC.Adapter.isActive);
                spec.displayResults();
                spec.waitForResponse();
            });
        });

        it("Method \"reset\" should reset configuration of NFC engine", function () {
            var spec = new ManualSpec(jasmine, window.document);
            spec.addGoal(jasmine.getEnv().currentSpec.description);
            spec.addPrecondition("Device with NFC feature");
            spec.addExpectation("Value of \"pollingTimeout\" property should be 90");
            spec.addExpectation("Value of \"passKey\" property should be empty string");
            spec.displayScenario();
            spec.waitForButtonPressing("Run test");

            runs(function () {
                Rho.NFC.Adapter.pollingTimeout = 10;
                Rho.NFC.Adapter.passKey = "123456";
                Rho.NFC.Adapter.reset();
                spec.addResult("Property \"pollingTimeout\"", Rho.NFC.Adapter.pollingTimeout);
                spec.addResult("Property \"passKey\"", Rho.NFC.Adapter.passkey);
                spec.displayResults();
                spec.waitForResponse();
{'fraction_non_alphanumeric': 0.12023731048121292, 'fraction_numerical': 0.0013183915622940012, 'mean_word_length': 2.19814502529511, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '143744', 'n_tokens_mistral': 1889, 'n_tokens_neox': 1750, 'n_words': 434}