Skip to content

Instantly share code, notes, and snippets.

View Sharondio's full-sized avatar
🏃‍♀️
Out-running deadlines

Sharon DiOrio Sharondio

🏃‍♀️
Out-running deadlines
View GitHub Profile
Edit Quiz
1) Can add items to a previously saved quiz
0 passing (13s)
1 failing
1) Edit Quiz Can add items to a previously saved quiz:
CypressError: Timed out retrying: Expected to find element: ':nth-child(1) > .datatable-body-row > .datatable-row-center > [style="width: 46.8333px; max-width: 50px; height: 88px;"] > .datatable-body-cell-label > .datatable-checkbox > input', but never found it.
at Object.cypressErr (https://localhost.achievementnetwork.org:4200/__cypress/runner/cypress_runner.js:63751:11)
@Sharondio
Sharondio / cypress_failing_test.js
Created December 20, 2018 23:20
Cypress failing test.
it.only('Can add items to a previously saved quiz', () => {
cy.route('GET', '**/quizapi/quizzes/*', '@quizUnpublished').as('getQuiz');
cy.route('POST', '**/quizapi/items/query', { data: [] }).as('getItems');
cy.route('POST', '**/qtmongo/items/query', '@items').as('getAllItems');
cy.route('PATCH', '**/quizapi/quizzes', {
data: [{ reference: 'qz100369' }]
}).as('patchQuiz');
cy.visit(quizzesPath);
cy.wait('@getQuizzes');
cy.get(':nth-child(2) > .datatable-body-row').click();
@Sharondio
Sharondio / elizabot
Created May 14, 2014 23:07
From my IRC bot demo during cfobjective
fusiongrokker: please tell me sharon is pulling up irc on stage…
[4:40pm] RyanGuill: that would be awesome
[4:40pm] elizabot joined the chat room.
[4:40pm] fusiongrokker: YAY
[4:40pm] fusiongrokker: hi mom
[4:41pm] abram: hey Sharon
[4:41pm] fusiongrokker: I CAN SEE MY HOUSE FROM HERE
[4:41pm] bittersweetryan joined the chat room.
[4:41pm] sharondio: elizabot: Hello
[4:41pm] elizabot: sharondio: How do you do. Please tell me your problem.
@Sharondio
Sharondio / bootstrap
Created January 27, 2014 19:58
Bootstrapping an angular app
// ************ Bootstrap App ****************
angular.element(document).ready(function () {
angular.bootstrap(document.getElementById('main_container'), ['my-app'])
})
// *******************************************
@Sharondio
Sharondio / gist:8563315
Created January 22, 2014 17:38
A simple string filter to format zeros and nulls to dash.
angular.module('my-app', [])
.filter('dash', function() {
return function(input) {
return input ? input : '-';
};
});
@Sharondio
Sharondio / gist:8105460
Created December 23, 2013 21:52
Jade in a gruntfile, taking from my views directory and creating along with all sub-folders in my static directory.
jade: {
dynamic_mappings: {
files: [
{
expand: true,
cwd: 'views/',
src: ['**/*.jade'],
dest: 'static',
ext: '.html'
}
@Sharondio
Sharondio / gist:7809034
Last active December 30, 2015 09:28
Example of a simple service mock.
// MOCK SERVICES
beforeEach(mock.module('app-name', function ($provide) {
getContentData = require('../data/getContentData.json');
getVersionsData = require('../data/getVersionsData.json');
newPost = require('../data/newPost.json');
fullPost = require('../data/fullPost.json');
$provide.value('ContentSvc', {
find: function(filter, options, cb) {
@Sharondio
Sharondio / .jshintrc
Created November 7, 2013 02:06
My somewhat lax jshint prefs
{
// Settings
"passfail" : false, // Stop on first error.
"maxerr" : 100, // Maximum errors before stopping.
// Predefined globals whom JSHint will ignore.
"browser" : true, // Standard browser globals e.g. `window`, `document`.
"node" : true,
/**
* Paginator
*
* The paginator can be used within any controller to easily set up
* some pagination options, including number of pages, page navigation
* and more. It is built to work with Laravel's own pagination library,
* which returns data in a particular format.
*
* Usage:
* Before you can use paginator, make sure you specify the URLs to your pagination
@Sharondio
Sharondio / gist:5061834
Last active December 14, 2015 08:59
AngularJS $rootScope.$apply() attempt (not working, don't copy!)
'use strict';
module.exports = function (module) {
module.factory('PageEventsService', ['$rootScope', function ($rootScope) {
return {
// can't get it to receive :-(
on: function(event, callback) {