Initial commit
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/node_modules
|
||||||
9
cypress.config.js
Normal file
9
cypress.config.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
const { defineConfig } = require("cypress");
|
||||||
|
|
||||||
|
module.exports = defineConfig({
|
||||||
|
e2e: {
|
||||||
|
setupNodeEvents(on, config) {
|
||||||
|
// implement node event listeners here
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
11
cypress/e2e/shooter/shooter.cy.js
Normal file
11
cypress/e2e/shooter/shooter.cy.js
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
describe('from store.steampowered.com/widget/2977820', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
cy.viewport(600, 190)
|
||||||
|
cy.visit('https://store.steampowered.com/widget/2977820/')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('takes screenshot', () => {
|
||||||
|
const fileName = String(Date.now());
|
||||||
|
cy.screenshot(fileName)
|
||||||
|
})
|
||||||
|
})
|
||||||
25
cypress/support/commands.js
Normal file
25
cypress/support/commands.js
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
// ***********************************************
|
||||||
|
// This example commands.js shows you how to
|
||||||
|
// create various custom commands and overwrite
|
||||||
|
// existing commands.
|
||||||
|
//
|
||||||
|
// For more comprehensive examples of custom
|
||||||
|
// commands please read more here:
|
||||||
|
// https://on.cypress.io/custom-commands
|
||||||
|
// ***********************************************
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// -- This is a parent command --
|
||||||
|
// Cypress.Commands.add('login', (email, password) => { ... })
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// -- This is a child command --
|
||||||
|
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// -- This is a dual command --
|
||||||
|
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// -- This will overwrite an existing command --
|
||||||
|
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
|
||||||
17
cypress/support/e2e.js
Normal file
17
cypress/support/e2e.js
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
// ***********************************************************
|
||||||
|
// This example support/e2e.js is processed and
|
||||||
|
// loaded automatically before your test files.
|
||||||
|
//
|
||||||
|
// This is a great place to put global configuration and
|
||||||
|
// behavior that modifies Cypress.
|
||||||
|
//
|
||||||
|
// You can change the location of this file or turn off
|
||||||
|
// automatically serving support files with the
|
||||||
|
// 'supportFile' configuration option.
|
||||||
|
//
|
||||||
|
// You can read more here:
|
||||||
|
// https://on.cypress.io/configuration
|
||||||
|
// ***********************************************************
|
||||||
|
|
||||||
|
// Import commands.js using ES2015 syntax:
|
||||||
|
import './commands'
|
||||||
2029
package-lock.json
generated
Normal file
2029
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
16
package.json
Normal file
16
package.json
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"name": "shooter",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "Take a screenshoot",
|
||||||
|
"license": "ISC",
|
||||||
|
"author": "Gabriel De Los Rios",
|
||||||
|
"type": "commonjs",
|
||||||
|
"main": "index.js",
|
||||||
|
"scripts": {
|
||||||
|
"shooter": "npx cypress run --spec \"cypress/e2e/shooter/shooter.cy.js\"",
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"cypress": "^15.9.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
23
readme.md
Normal file
23
readme.md
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# 📸 Shooter
|
||||||
|
|
||||||
|
A streamlined utility for capturing automated screenshots using the power of Cypress.
|
||||||
|
|
||||||
|
## 🚀 Features
|
||||||
|
- **Automated Captures**: Quickly snap screenshots of your web applications.
|
||||||
|
- **Simple Workflow**: Integrated directly into your npm scripts.
|
||||||
|
- **Organized Storage**: Automatically categorizes screenshots for easy access. (Lol, it made up this feature)
|
||||||
|
|
||||||
|
## 🛠 Usage
|
||||||
|
|
||||||
|
To trigger the screenshot process, run the following command in your terminal:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm run shoot
|
||||||
|
```
|
||||||
|
Till here this readme was AI generated
|
||||||
|
|
||||||
|
## Docs
|
||||||
|
- https://docs.cypress.io/app/get-started/install-cypress#System-requirements
|
||||||
|
- https://docs.cypress.io/api/cypress-api/screenshot-api#__docusaurus_skipToContent_fallback
|
||||||
|
|
||||||
|
Clone, install, inside the folder npm run shoot and you should be good to go
|
||||||
Reference in New Issue
Block a user