<commit_before>'use strict';

var LoginPage = require('../pages/login_page.js');

describe('OCL Collections Page', function () {

    it('should login', function () {
        var loginPage = new LoginPage();
        loginPage.visit();
        loginPage.login('awadhwa','root123');

        expect(element(by.linkText('awadhwa')).getText()).toEqual('awadhwa');
    });

    it('should create collection', function () {
        element(by.linkText('New User Collection')).click();
        element(by.id('id_short_code')).sendKeys('C1');
        element(by.id('id_name')).sendKeys('<NAME>');
        element(by.id('id_full_name')).sendKeys('<NAME>');
        element(by.id('id_supported_locales')).sendKeys('en,es,fr');
        element(by.buttonText('Add')).click();

        expect(element(by.className('alert-info')).getText()).toEqual('Collection created');
    })

    it('should edit collection', function () {
        element(by.css('span.glyphicon-cog')).click();
        element(by.id('id_description')).sendKeys('collection description');
        element(by.id('id_external_id')).sendKeys('123456');
        element(by.buttonText('Update')).click();

        expect(element(by.className('alert-info')).getText()).toEqual('Collection updated');
        expect(element(by.id('id_coll_description')).getText()).toEqual('collection description');
        expect(element(by.id('id_coll_externalId')).getText()).toEqual('123456');

    })

    it('should delete collection', function () {
        element(by.css('span.glyphicon-cog')).click();
        element(by.css('span.glyphicon-trash')).click();
        element(by.buttonText('Delete')).click();

        expect(element(by.className('alert-info')).getText()).toEqual('Collection Deleted');
    })

    it('should logout', function () {
        element(by.linkText('Logout')).click();
        element(by.buttonText('Sign Out')).click();

        expect(element(by.className('alert-success')).getText()).toEqual('You have signed out.');<commit_msg>Added assertions for edit collection<commit_after>'use strict';

var LoginPage = require('../pages/login_page.js');

describe('OCL Collections Page', function () {

    it('should login', function () {
        var loginPage = new LoginPage();
        loginPage.visit();
        loginPage.login('awadhwa','root123');

        expect(element(by.linkText('awadhwa')).getText()).toEqual('awadhwa');
    });

    it('should create collection', function () {
        element(by.linkText('New User Collection')).click();
        element(by.id('id_short_code')).sendKeys('C1');
        element(by.id('id_name')).sendKeys('<NAME>');
        element(by.id('id_full_name')).sendKeys('<NAME>');
        element(by.id('id_supported_locales')).sendKeys('en,es,fr');
        element(by.buttonText('Add')).click();

        expect(element(by.className('alert-info')).getText()).toEqual('Collection created');
    })

    it('should edit collection', function () {
        element(by.css('span.glyphicon-cog')).click();
        element(by.id('id_description')).sendKeys('collection description');
        element(by.id('id_external_id')).sendKeys('123456');
        element(by.buttonText('Update')).click();

        expect(element(by.className('alert-info')).getText()).toEqual('Collection updated');
        expect(element(by.id('id_coll_description')).getText()).toEqual('Description collection description');
        expect(element(by.id('id_coll_externalId')).getText()).toEqual('External ID 123456');

    })

    it('should delete collection', function () {
        element(by.css('span.glyphicon-cog')).click();
        element(by.css('span.glyphicon-trash')).click();
        element(by.buttonText('Delete')).click();

        expect(element(by.className('alert-info')).getText()).toEqual('Collection Deleted');
    })

    it('should logout', function () {
        element(by.linkText('Logout')).click();
        element(by.buttonText('Sign Out')).click();

        expect(element(by.className('alert-success')).getText()).toEqual('You have signed out.');
{'fraction_non_alphanumeric': 0.20004939491232404, 'fraction_numerical': 0.0079031859718449, 'mean_word_length': 4.0, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '5037339', 'n_tokens_mistral': 1166, 'n_tokens_neox': 1168, 'n_words': 138}