Skip to content

Instantly share code, notes, and snippets.

Avatar
💤
asleep in my own mind

⚫️ nothingness negates itself dualyticalchemy

💤
asleep in my own mind
View GitHub Profile
View .newsboat--urls
# http://127.0.0.1/rss.xml me
https://www.romanzolotarev.com/rss.xml blog
https://debug.ninja/feed.xml blog
https://mwl.io/feed blog
https://thegriddle.net/feed.xml blog
https://asylum.madhouse-project.org/blog/atom.xml blog
http://hcoder.org/feed/ blog
https://www.peppercarrot.com/feed/en/rss webcomic
https://megatokyo.com/rss/strips.xml webcomic
https://megatokyo.com/rss/rants.xml blog
View tests--e2e--utils--has.js
const chalk = require('chalk');
module.exports = (chromeOptionsConfig, active) => {
const msg = [
`Are you testing for phone or tablet? Check`,
chalk.white('/tests/conf/platform.conf.json'),
`for the default`].join(' ');
const notifications = [
{
"rel": "help",
"command": chalk.blue(msg)
View home-unit_spec.js
describe('Home (iPad)', () => {
const baseUrl = Cypress.env('baseUrl:home-unit') || 'http://localhost:8000';
it('should check for localStorage', () => {
cy.visit(baseUrl);
const localStorage = cy.window().its('localStorage');
cy.log('checking for localStorage');
expect(localStorage).to.exist;
cy.log("condition: 'get' in localStorage", 'get' in localStorage);
expect('get' in localStorage).to.be.true;
});
View gherkin_spec.js
import { Given, When, Then } from '../../tests/bdd';
import { compose } from '../../tests/bdd/utils/compose.js';
const { load } = require('../../tests/bdd/utils/load.js');
const config = async () => {
const platformConf = await load(__dirname, 'platform.conf.json');
cy.log('reading file');
cy.log(platformConf);
return platformConf;
};
const { has } = require('../../tests/e2e/utils/has.js')(config(), 'homeUnitTabletConfig');
View features--index.feature
Scenario: Home - Unit
Given I am on "#home-unit"
When I click "Open"
Then I should see "Crew 2"
View features--given_test.feature
Scenario: Navigate to Unit Crew
Given I am on "#home-unit"
Given I am on "#unit-crew"
View features--UI__homeUnit--hamburger.feature
Scenario: Home - Unit
Given I am on "#home-unit"
When I click "Show navigation menu"
Then I should see "Logout"
View index.js
const { getElement } = require('./utils/getElement.js');
const { getScope } = require('./utils/getScope.js');
const { load } = require('./utils/load.js');
const config = async () => {
cy.log(__dirname);
const platformConf = await load(__dirname, '../../tests/conf/platform.conf.json');
cy.log(platformConf);
return platformConf;
};
const { has } = require('../../tests/e2e/utils/has.js')(config(), 'homeUnitTabletConfig');
View utils--load.js
const load = async (context, platformPath) => {
const path = require('path');
cy.load('context: ', context);
cy.load('platformPath: ', platformPath);
return await cy.readFile(path.resolve(context, platformPath));
};
module.exports = {
load
};
View utils--getScope.js
const { getElement } = require('./getElement.js');
const getScope = (sel) => {
return getElement.scope();
};
export {
getScope