Skip to content

Instantly share code, notes, and snippets.

@rochabianca
Last active December 14, 2021 17:31
Show Gist options
  • Save rochabianca/c9e7b2512a7cdc91b90d90e91c25ee02 to your computer and use it in GitHub Desktop.
Save rochabianca/c9e7b2512a7cdc91b90d90e91c25ee02 to your computer and use it in GitHub Desktop.
my javascript snippers
{
"starts test template": {
"prefix": "e2e",
"body": [
"import ${TM_FILENAME_BASE/(.*)/${1:/capitalize}/} from '../page-objects/${TM_FILENAME_BASE/(.*)/${1:/capitalize}/}'",
"import General from '../page-objects/General'",
"",
"describe('${TM_FILENAME_BASE/(.*)/${1:/capitalize}/} Tests', () => {",
" const $TM_FILENAME_BASE = new ${TM_FILENAME_BASE/(.*)/${1:/capitalize}/}()",
" const general = new General()",
"",
" before(() => {",
" cy.visit('/')",
" cy.loginToApp()",
" })",
"",
" describe('List Test', () => {",
"",
" })",
"",
" describe('Creation Test', () => {",
"",
" })",
"",
" describe('Edit Test', () => {",
"",
" })",
"",
" describe('Delete Test', () => {",
"",
" })",
"})",
""
],
"description": "Init a test template"
},
"class template": {
"prefix": "gclass",
"body": [
"export default class ${TM_FILENAME_BASE/(.*)/${1:/capitalize}/} {",
"$1",
"}"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment