forked from umami-software/umami
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' of https://github.com/umami-software/umami into dev
- Loading branch information
Showing
12 changed files
with
772 additions
and
25 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,7 @@ yarn-error.log* | |
# local env files | ||
.env | ||
.env.* | ||
*.env.* | ||
|
||
*.dev.yml | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { defineConfig } from 'cypress'; | ||
|
||
export default defineConfig({ | ||
e2e: { | ||
baseUrl: 'http://localhost:3000', | ||
}, | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
describe('Login test', () => { | ||
it('logs user in with correct credentials and logs user out', () => { | ||
cy.visit('/login'); | ||
cy.dataCy('input-username').type(Cypress.env('umami_user')); | ||
cy.dataCy('input-password').type(Cypress.env('umami_password')); | ||
cy.dataCy('button-submit').click(); | ||
cy.url().should('eq', Cypress.config().baseUrl + '/dashboard'); | ||
cy.dataCy('button-profile').click(); | ||
cy.dataCy('item-logout').click(); | ||
cy.url().should('eq', Cypress.config().baseUrl + '/login'); | ||
}); | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/// <reference types="cypress" /> | ||
|
||
Cypress.Commands.add('dataCy', value => { | ||
return cy.get(`[data-cy=${value}]`); | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/// <reference types="cypress" /> | ||
|
||
declare namespace Cypress { | ||
interface Chainable { | ||
/** | ||
* Custom command to select DOM element by data-cy attribute. | ||
* @example cy.dataCy('greeting') | ||
*/ | ||
dataCy(value: string): Chainable<JQuery<HTMLElement>>; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es5", | ||
"lib": ["es5", "dom"], | ||
"types": ["cypress", "node"] | ||
}, | ||
"include": ["**/*.ts"] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "umami", | ||
"version": "2.10.0", | ||
"version": "2.11.0", | ||
"description": "A simple, fast, privacy-focused alternative to Google Analytics.", | ||
"author": "Mike Cao <[email protected]>", | ||
"license": "MIT", | ||
|
@@ -42,7 +42,8 @@ | |
"change-password": "node scripts/change-password.js", | ||
"lint": "next lint --quiet", | ||
"prepare": "node -e \"if (process.env.NODE_ENV !== 'production'){process.exit(1)} \" || husky install", | ||
"postbuild": "node scripts/postbuild.js" | ||
"postbuild": "node scripts/postbuild.js", | ||
"cypress-open": "cypress open" | ||
}, | ||
"lint-staged": { | ||
"**/*.{js,jsx,ts,tsx}": [ | ||
|
@@ -133,6 +134,7 @@ | |
"@typescript-eslint/eslint-plugin": "^6.7.3", | ||
"@typescript-eslint/parser": "^6.7.3", | ||
"cross-env": "^7.0.3", | ||
"cypress": "^13.6.6", | ||
"esbuild": "^0.17.17", | ||
"eslint": "^8.33.0", | ||
"eslint-config-next": "^14.0.4", | ||
|
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
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
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
Oops, something went wrong.