fix: listen on 127.0.0.1
This commit is contained in:
parent
15c4f2fbde
commit
59b2c02532
5 changed files with 16 additions and 11 deletions
|
@ -1,6 +1,6 @@
|
||||||
AUTH_SECRET="auth_secret"
|
AUTH_SECRET="auth_secret"
|
||||||
AUTH_URL="http://localhost:3000"
|
AUTH_URL="http://127.0.0.1:3000"
|
||||||
HOSTNAME=0.0.0.0
|
HOSTNAME="127.0.0.1"
|
||||||
DATABASE_URL="file:./dev.db"
|
DATABASE_URL="file:./dev.db"
|
||||||
AUTH_AUTHENTIK_ID="id"
|
AUTH_AUTHENTIK_ID="id"
|
||||||
AUTH_AUTHENTIK_ISSUER="issuer"
|
AUTH_AUTHENTIK_ISSUER="issuer"
|
7
.github/workflows/tests.yml
vendored
7
.github/workflows/tests.yml
vendored
|
@ -22,14 +22,13 @@ jobs:
|
||||||
- name: Cypress run (e2e)
|
- name: Cypress run (e2e)
|
||||||
uses: https://github.com/cypress-io/github-action@v6
|
uses: https://github.com/cypress-io/github-action@v6
|
||||||
with:
|
with:
|
||||||
build: yarn run build
|
build: yarn cypress:build
|
||||||
start: yarn cypress:start_server
|
start: yarn cypress:start_server
|
||||||
e2e: true
|
e2e: true
|
||||||
wait-on: 'http://localhost:3000'
|
wait-on: 'http://127.0.0.1:3000'
|
||||||
|
|
||||||
- name: Cypress run (component)
|
- name: Cypress run (component)
|
||||||
uses: https://github.com/cypress-io/github-action@v6
|
uses: https://github.com/cypress-io/github-action@v6
|
||||||
with:
|
with:
|
||||||
build: yarn run build
|
|
||||||
start: yarn cypress:start_server
|
|
||||||
component: true
|
component: true
|
||||||
|
install: false
|
||||||
|
|
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -41,3 +41,8 @@ yarn-error.log*
|
||||||
# typescript
|
# typescript
|
||||||
*.tsbuildinfo
|
*.tsbuildinfo
|
||||||
next-env.d.ts
|
next-env.d.ts
|
||||||
|
|
||||||
|
# cypress
|
||||||
|
cypress/videos
|
||||||
|
cypress/screenshots
|
||||||
|
cypress/coverage
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
describe('login', () => {
|
describe('login', () => {
|
||||||
it('loads', () => {
|
it('loads', () => {
|
||||||
cy.visit('http://localhost:3000/');
|
cy.visit('http://127.0.0.1:3000/');
|
||||||
|
|
||||||
cy.getBySel('login-header').should('exist');
|
cy.getBySel('login-header').should('exist');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('shows login form', () => {
|
it('shows login form', () => {
|
||||||
cy.visit('http://localhost:3000/');
|
cy.visit('http://127.0.0.1:3000/');
|
||||||
|
|
||||||
cy.getBySel('login-form').should('exist');
|
cy.getBySel('login-form').should('exist');
|
||||||
cy.getBySel('email-input').should('exist');
|
cy.getBySel('email-input').should('exist');
|
||||||
|
@ -15,13 +15,13 @@ describe('login', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('shows sso button', () => {
|
it('shows sso button', () => {
|
||||||
cy.visit('http://localhost:3000/');
|
cy.visit('http://127.0.0.1:3000/');
|
||||||
|
|
||||||
cy.getBySel('sso-login-button_authentik').should('exist');
|
cy.getBySel('sso-login-button_authentik').should('exist');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('allows login', () => {
|
it('allows login', () => {
|
||||||
cy.visit('http://localhost:3000/');
|
cy.visit('http://127.0.0.1:3000/');
|
||||||
|
|
||||||
cy.getBySel('email-input').type('test@example.com');
|
cy.getBySel('email-input').type('test@example.com');
|
||||||
cy.getBySel('password-input').type('password');
|
cy.getBySel('password-input').type('password');
|
||||||
|
|
|
@ -8,7 +8,8 @@
|
||||||
"start": "node .next/standalone/server.js",
|
"start": "node .next/standalone/server.js",
|
||||||
"lint": "next lint",
|
"lint": "next lint",
|
||||||
"format": "prettier --write .",
|
"format": "prettier --write .",
|
||||||
"cypress:start_server": "cp public .next/standalone/ -r && cp .next/static/ .next/standalone/.next/ -r && dotenv -e .env.test -- node .next/standalone/server.js",
|
"cypress:build": "prettier --check . && NODE_ENV=test next build",
|
||||||
|
"cypress:start_server": "cp .env.test .next/standalone && cp public .next/standalone/ -r && cp .next/static/ .next/standalone/.next/ -r && NODE_ENV=test HOSTNAME=\"0.0.0.0\" dotenv -e .env.test -- node .next/standalone/server.js",
|
||||||
"cypress:open": "cypress open",
|
"cypress:open": "cypress open",
|
||||||
"cypress:run": "cypress run"
|
"cypress:run": "cypress run"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue