-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of github.com:Open-Earth-Foundation/CityCataly…
…st into feature/manual-input
- Loading branch information
Showing
101 changed files
with
5,839 additions
and
2,908 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"extends": "next", | ||
"rules": { | ||
"react/no-unescaped-entities": "off" | ||
} | ||
"extends": "next", | ||
"rules": { | ||
"react/no-unescaped-entities": "off" | ||
} | ||
} |
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,3 @@ | ||
{ | ||
"extends": [ | ||
"next/core-web-vitals", | ||
"plugin:storybook/recommended" | ||
] | ||
"extends": ["next/core-web-vitals", "plugin:storybook/recommended"] | ||
} |
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 @@ | ||
# Ignore artifacts: | ||
build | ||
coverage | ||
node_modules | ||
.next |
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,3 @@ | ||
{ | ||
"semi": true | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
const conf = require('dotenv/config'); | ||
const conf = require("dotenv/config"); | ||
|
||
module.exports = { | ||
"development": { | ||
"username": process.env.DATABASE_USER, | ||
"password": process.env.DATABASE_PASSWORD || null, | ||
"database": process.env.DATABASE_NAME, | ||
"host": process.env.DATABASE_HOST, | ||
"dialect": "postgres", | ||
"logging": true | ||
development: { | ||
username: process.env.DATABASE_USER, | ||
password: process.env.DATABASE_PASSWORD || null, | ||
database: process.env.DATABASE_NAME, | ||
host: process.env.DATABASE_HOST, | ||
dialect: "postgres", | ||
logging: true, | ||
}, | ||
"test": { | ||
"username": process.env.DATABASE_USER, | ||
"password": process.env.DATABASE_PASSWORD || null, | ||
"database": process.env.DATABASE_NAME, | ||
"host": process.env.DATABASE_HOST, | ||
"dialect": "postgres" | ||
test: { | ||
username: process.env.DATABASE_USER, | ||
password: process.env.DATABASE_PASSWORD || null, | ||
database: process.env.DATABASE_NAME, | ||
host: process.env.DATABASE_HOST, | ||
dialect: "postgres", | ||
}, | ||
"production": { | ||
"username": process.env.DATABASE_USER, | ||
"password": process.env.DATABASE_PASSWORD || null, | ||
"database": process.env.DATABASE_NAME, | ||
"host": process.env.DATABASE_HOST, | ||
"dialect": "postgres" | ||
} | ||
} | ||
production: { | ||
username: process.env.DATABASE_USER, | ||
password: process.env.DATABASE_PASSWORD || null, | ||
database: process.env.DATABASE_NAME, | ||
host: process.env.DATABASE_HOST, | ||
dialect: "postgres", | ||
}, | ||
}; |
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 |
---|---|---|
@@ -1,26 +1,25 @@ | ||
describe('Login page', () => { | ||
it('redirects to dashboard after entering correct data', () => { | ||
cy.visit('/login') | ||
cy.contains('Log In') | ||
cy.get('input[name="email"]').type('test@openearth.org') | ||
cy.get('input[name="password"]').type('password') | ||
cy.get('button[type="submit"]').click() | ||
describe("Login page", () => { | ||
it("redirects to dashboard after entering correct data", () => { | ||
cy.visit("/login"); | ||
cy.contains("Log In"); | ||
cy.get('input[name="email"]').type("test@openearth.org"); | ||
cy.get('input[name="password"]').type("password"); | ||
cy.get('button[type="submit"]').click(); | ||
|
||
cy.url().should('equal', Cypress.config().baseUrl + '/en') | ||
cy.contains('Welcome Back,') | ||
}) | ||
cy.url().should("equal", Cypress.config().baseUrl + "/en"); | ||
cy.contains("Welcome Back,"); | ||
}); | ||
|
||
it('shows errors when entering invalid data', () => { | ||
cy.visit('/login') | ||
cy.contains('Log In') | ||
it("shows errors when entering invalid data", () => { | ||
cy.visit("/login"); | ||
cy.contains("Log In"); | ||
|
||
cy.get('input[name="email"]').type('testopenearthorg') | ||
cy.get('input[name="password"]').type('pas') | ||
cy.get('button[type="submit"]').click() | ||
|
||
cy.url().should('equal', Cypress.config().baseUrl + '/en/login') | ||
cy.contains('valid email address') | ||
cy.contains('Minimum length') | ||
}) | ||
}) | ||
cy.get('input[name="email"]').type("testopenearthorg"); | ||
cy.get('input[name="password"]').type("pas"); | ||
cy.get('button[type="submit"]').click(); | ||
|
||
cy.url().should("equal", Cypress.config().baseUrl + "/en/login"); | ||
cy.contains("valid email address"); | ||
cy.contains("Minimum length"); | ||
}); | ||
}); |
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,49 +1,52 @@ | ||
describe('Signup page', () => { | ||
it('redirects to dashboard after entering correct data', () => { | ||
cy.visit('/signup') | ||
cy.contains('Sign Up') | ||
cy.get('input[name="name"]').type('Test Account') | ||
cy.get('input[name="email"]').type('test@openearth.org') | ||
cy.get('input[name="password"]').type('Password1') | ||
cy.get('input[name="confirmPassword"]').type('Password1') | ||
cy.get('input[name="inviteCode"]').type('ABCDEF') | ||
cy.get('input[name="acceptTerms"]').siblings('.chakra-checkbox__control').click() | ||
cy.get('button[type="submit"]').click() | ||
describe("Signup page", () => { | ||
it("redirects to dashboard after entering correct data", () => { | ||
cy.visit("/signup"); | ||
cy.contains("Sign Up"); | ||
cy.get('input[name="name"]').type("Test Account"); | ||
cy.get('input[name="email"]').type("test@openearth.org"); | ||
cy.get('input[name="password"]').type("Password1"); | ||
cy.get('input[name="confirmPassword"]').type("Password1"); | ||
cy.get('input[name="inviteCode"]').type("ABCDEF"); | ||
cy.get('input[name="acceptTerms"]') | ||
.siblings(".chakra-checkbox__control") | ||
.click(); | ||
cy.get('button[type="submit"]').click(); | ||
|
||
cy.url().should('contain', '/check-email') | ||
cy.contains('Check Your Email') | ||
}) | ||
cy.url().should("contain", "/check-email"); | ||
cy.contains("Check Your Email"); | ||
}); | ||
|
||
it('shows errors when entering invalid data', () => { | ||
cy.visit('/signup') | ||
cy.contains('Sign Up') | ||
cy.get('input[name="name"]').type('asd') | ||
cy.get('input[name="email"]').type('testopenearthorg') | ||
cy.get('input[name="password"]').type('Pas') | ||
cy.get('input[name="confirmPassword"]').type('Pa1') | ||
cy.get('input[name="inviteCode"]').type('ABCDE') | ||
cy.get('button[type="submit"]').click() | ||
it("shows errors when entering invalid data", () => { | ||
cy.visit("/signup"); | ||
cy.contains("Sign Up"); | ||
cy.get('input[name="name"]').type("asd"); | ||
cy.get('input[name="email"]').type("testopenearthorg"); | ||
cy.get('input[name="password"]').type("Pas"); | ||
cy.get('input[name="confirmPassword"]').type("Pa1"); | ||
cy.get('input[name="inviteCode"]').type("ABCDE"); | ||
cy.get('button[type="submit"]').click(); | ||
|
||
cy.url().should('contain', '/signup') | ||
cy.contains('valid email address') | ||
cy.contains('Minimum length') | ||
cy.contains('Invalid invite code') | ||
cy.contains('Please accept the terms') | ||
}) | ||
cy.url().should("contain", "/signup"); | ||
cy.contains("valid email address"); | ||
cy.contains("Minimum length"); | ||
cy.contains("Invalid invite code"); | ||
cy.contains("Please accept the terms"); | ||
}); | ||
|
||
it('should require matching passwords', () => { | ||
cy.visit('/signup') | ||
cy.contains('Sign Up') | ||
cy.get('input[name="name"]').type('Test Account') | ||
cy.get('input[name="email"]').type('test@openearth.org') | ||
cy.get('input[name="password"]').type('Password1') | ||
cy.get('input[name="confirmPassword"]').type('Password2') | ||
cy.get('input[name="inviteCode"]').type('ABCDEF') | ||
cy.get('input[name="acceptTerms"]').siblings('.chakra-checkbox__control').click() | ||
cy.get('button[type="submit"]').click() | ||
|
||
cy.url().should('contain', '/signup') | ||
cy.contains('Passwords don\'t match') | ||
}) | ||
}) | ||
it("should require matching passwords", () => { | ||
cy.visit("/signup"); | ||
cy.contains("Sign Up"); | ||
cy.get('input[name="name"]').type("Test Account"); | ||
cy.get('input[name="email"]').type("test@openearth.org"); | ||
cy.get('input[name="password"]').type("Password1"); | ||
cy.get('input[name="confirmPassword"]').type("Password2"); | ||
cy.get('input[name="inviteCode"]').type("ABCDEF"); | ||
cy.get('input[name="acceptTerms"]') | ||
.siblings(".chakra-checkbox__control") | ||
.click(); | ||
cy.get('button[type="submit"]').click(); | ||
|
||
cy.url().should("contain", "/signup"); | ||
cy.contains("Passwords don't match"); | ||
}); | ||
}); |
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.