Last active
December 14, 2021 17:31
-
-
Save rochabianca/c9e7b2512a7cdc91b90d90e91c25ee02 to your computer and use it in GitHub Desktop.
my javascript snippers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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