This repository has been archived by the owner on Dec 18, 2024. It is now read-only.
-
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.
* build(eslint): align with rezervo-web standard * fix(eslint): --fix or ignore * ci(node): bump node version to lts
- Loading branch information
1 parent
1f7e84b
commit 738086d
Showing
108 changed files
with
1,612 additions
and
914 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
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 @@ | ||
_ |
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,4 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx --no -- commitlint --edit "" | ||
yarn commitlint --edit "$1" |
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,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
yarn install |
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,4 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx pretty-quick --staged | ||
yarn prettier:check && yarn lint |
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 +1,3 @@ | ||
module.exports = { extends: ["@commitlint/config-conventional"] }; | ||
module.exports = { | ||
extends: ["@commitlint/config-conventional"], | ||
}; |
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
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 |
---|---|---|
|
@@ -38,7 +38,7 @@ describe("Login", () => { | |
cy.getBySel("email-field").type("petter@"); | ||
cy.getBySel("error-message").should( | ||
"contain", | ||
"Du må fylle inn en gyldig epost" | ||
"Du må fylle inn en gyldig epost", | ||
); | ||
cy.getBySel("login-submit").should("be.disabled"); | ||
|
||
|
@@ -55,7 +55,7 @@ describe("Login", () => { | |
cy.getBySel("password-field").type("password"); | ||
cy.getBySel("error-message").should("not.exist"); | ||
cy.getBySel("login-submit").should("not.be.disabled"); | ||
} | ||
}, | ||
); | ||
|
||
it("displays an error message when username and password is wrong", () => { | ||
|
@@ -68,14 +68,14 @@ describe("Login", () => { | |
cy.wait("@login").its("response.statusCode").should("eq", 401); | ||
cy.getBySel("api-error").should( | ||
"contain", | ||
"Error: username or password is wrong" | ||
"Error: username or password is wrong", | ||
); | ||
}); | ||
|
||
it("can log in with registered user", () => { | ||
cy.login( | ||
"[email protected]", | ||
"Programming is not a science. Programming is a craft." | ||
"Programming is not a science. Programming is a craft.", | ||
); | ||
cy.url().should("not.include", "login"); | ||
cy.getBySel("MenuIcon").click(); | ||
|
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 |
---|---|---|
|
@@ -47,7 +47,7 @@ describe("Register", () => { | |
it("correctly validates a regular user", () => { | ||
cy.getBySel("email-field").type("[email protected]"); | ||
cy.getBySel("password-field").type( | ||
"Programming is not a science. Programming is a craft." | ||
"Programming is not a science. Programming is a craft.", | ||
); | ||
cy.getBySel("first-name-field").type("Richard"); | ||
cy.getBySel("last-name-field").type("Stallman"); | ||
|
@@ -64,7 +64,7 @@ describe("Register", () => { | |
it("correctly validates an underage user", () => { | ||
cy.getBySel("email-field").type("[email protected]"); | ||
cy.getBySel("password-field").type( | ||
"Programming is not a science. Programming is a craft." | ||
"Programming is not a science. Programming is a craft.", | ||
); | ||
|
||
cy.getBySel("birthday-field").clear(); | ||
|
@@ -80,7 +80,7 @@ describe("Register", () => { | |
it("correctly displays postal city", () => { | ||
cy.getBySel("email-field").type("[email protected]"); | ||
cy.getBySel("password-field").type( | ||
"Programming is not a science. Programming is a craft." | ||
"Programming is not a science. Programming is a craft.", | ||
); | ||
cy.getBySel("postal-code-field").clear(); | ||
cy.getBySel("postal-code-field").type("7032"); | ||
|
@@ -91,10 +91,11 @@ describe("Register", () => { | |
cy.getBySel("submit-button").should("be.disabled"); | ||
cy.getBySel("error-message").should( | ||
"contain", | ||
"Du må oppgi et gyldig norsk postnummer" | ||
"Du må oppgi et gyldig norsk postnummer", | ||
); | ||
|
||
cy.get("#postalCode").clear(); | ||
// eslint-disable-next-line cypress/unsafe-to-chain-command | ||
cy.get("#postalCode").type("0977").blur(); | ||
cy.getBySel("postal-city-preview").should("contain", "Oslo"); | ||
cy.getBySel("submit-button").should("not.be.disabled"); | ||
|
@@ -116,7 +117,7 @@ describe("Register", () => { | |
|
||
cy.getBySel("email-field").type("[email protected]"); | ||
cy.getBySel("password-field").type( | ||
"Programming is not a science. Programming is a craft." | ||
"Programming is not a science. Programming is a craft.", | ||
); | ||
cy.getBySel("first-name-field").type("Richard"); | ||
cy.getBySel("last-name-field").type("Stallman"); | ||
|
@@ -144,6 +145,7 @@ describe("Register", () => { | |
|
||
it("cannot register when passord is invalid", () => { | ||
cy.get("#password").clear(); | ||
// eslint-disable-next-line cypress/unsafe-to-chain-command | ||
cy.get("#password").type("pass").blur(); | ||
cy.getBySel("error-message").should("be.visible"); | ||
cy.getBySel("submit-button").should("be.disabled"); | ||
|
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
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.
738086d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
bl-next – ./
bl-next-git-production-boklisten.vercel.app
next.boklisten.no
bl-next-boklisten.vercel.app