Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workflow-ruktah #455

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
1 change: 1 addition & 0 deletions .eslintcache
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should be ignored from git

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"C:\\FRONTEND noroff\\social-media-client\\cypress.config.js":"1","C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\1-getting-started\\todo.cy.js":"2","C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\2-advanced-examples\\actions.cy.js":"3","C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\2-advanced-examples\\aliasing.cy.js":"4","C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\2-advanced-examples\\assertions.cy.js":"5","C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\2-advanced-examples\\connectors.cy.js":"6","C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\2-advanced-examples\\cookies.cy.js":"7","C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\2-advanced-examples\\cypress_api.cy.js":"8","C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\2-advanced-examples\\files.cy.js":"9","C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\2-advanced-examples\\location.cy.js":"10","C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\2-advanced-examples\\misc.cy.js":"11","C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\2-advanced-examples\\navigation.cy.js":"12","C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\2-advanced-examples\\network_requests.cy.js":"13","C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\2-advanced-examples\\querying.cy.js":"14","C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\2-advanced-examples\\spies_stubs_clocks.cy.js":"15","C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\2-advanced-examples\\storage.cy.js":"16","C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\2-advanced-examples\\traversal.cy.js":"17","C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\2-advanced-examples\\utilities.cy.js":"18","C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\2-advanced-examples\\viewport.cy.js":"19","C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\2-advanced-examples\\waiting.cy.js":"20","C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\2-advanced-examples\\window.cy.js":"21","C:\\FRONTEND noroff\\social-media-client\\cypress\\support\\commands.js":"22","C:\\FRONTEND noroff\\social-media-client\\cypress\\support\\e2e.js":"23","C:\\FRONTEND noroff\\social-media-client\\src\\js\\api\\auth\\login.test.js":"24","C:\\FRONTEND noroff\\social-media-client\\src\\js\\api\\auth\\logout.test.js":"25","C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\failed_login.cy.js":"26","C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\login.cy.js":"27","C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\logout.cy.js":"28","C:\\FRONTEND noroff\\social-media-client\\src\\js\\api\\auth\\localStorage.mock.js":"29"},{"size":191,"mtime":1713171870483,"results":"30","hashOfConfig":"31"},{"size":6220,"mtime":1713171470783,"results":"32","hashOfConfig":"31"},{"size":12345,"mtime":1713171470784,"results":"33","hashOfConfig":"31"},{"size":1147,"mtime":1713171470785,"results":"34","hashOfConfig":"31"},{"size":5810,"mtime":1713171470793,"results":"35","hashOfConfig":"31"},{"size":3008,"mtime":1713171470794,"results":"36","hashOfConfig":"31"},{"size":3967,"mtime":1713171470795,"results":"37","hashOfConfig":"31"},{"size":5747,"mtime":1713171470796,"results":"38","hashOfConfig":"31"},{"size":2775,"mtime":1713171470797,"results":"39","hashOfConfig":"31"},{"size":1107,"mtime":1713171470798,"results":"40","hashOfConfig":"31"},{"size":2783,"mtime":1713171470799,"results":"41","hashOfConfig":"31"},{"size":1660,"mtime":1713171470799,"results":"42","hashOfConfig":"31"},{"size":6294,"mtime":1713171470800,"results":"43","hashOfConfig":"31"},{"size":3681,"mtime":1713171470801,"results":"44","hashOfConfig":"31"},{"size":6056,"mtime":1713171470802,"results":"45","hashOfConfig":"31"},{"size":4303,"mtime":1713171470803,"results":"46","hashOfConfig":"31"},{"size":3781,"mtime":1713171470804,"results":"47","hashOfConfig":"31"},{"size":3299,"mtime":1713171470805,"results":"48","hashOfConfig":"31"},{"size":1776,"mtime":1713171470806,"results":"49","hashOfConfig":"31"},{"size":1021,"mtime":1713171470807,"results":"50","hashOfConfig":"31"},{"size":624,"mtime":1713171470809,"results":"51","hashOfConfig":"31"},{"size":861,"mtime":1713171470812,"results":"52","hashOfConfig":"31"},{"size":686,"mtime":1713171470814,"results":"53","hashOfConfig":"31"},{"size":788,"mtime":1713174782181,"results":"54","hashOfConfig":"31"},{"size":390,"mtime":1713342357309,"results":"55","hashOfConfig":"31"},{"size":564,"mtime":1713344575258,"results":"56","hashOfConfig":"31"},{"size":814,"mtime":1713253009259,"results":"57","hashOfConfig":"31"},{"size":662,"mtime":1713252544453,"results":"58","hashOfConfig":"31"},{"size":461,"mtime":1713342384265,"results":"59","hashOfConfig":"31"},{"filePath":"60","messages":"61","suppressedMessages":"62","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"gun504",{"filePath":"63","messages":"64","suppressedMessages":"65","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"66","messages":"67","suppressedMessages":"68","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"69","messages":"70","suppressedMessages":"71","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"72","messages":"73","suppressedMessages":"74","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"75","messages":"76","suppressedMessages":"77","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"78","messages":"79","suppressedMessages":"80","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"81","messages":"82","suppressedMessages":"83","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"84","messages":"85","suppressedMessages":"86","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"87","messages":"88","suppressedMessages":"89","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"90","messages":"91","suppressedMessages":"92","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"93","messages":"94","suppressedMessages":"95","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"96","messages":"97","suppressedMessages":"98","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"99","messages":"100","suppressedMessages":"101","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"102","messages":"103","suppressedMessages":"104","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"105","messages":"106","suppressedMessages":"107","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"108","messages":"109","suppressedMessages":"110","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"111","messages":"112","suppressedMessages":"113","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"114","messages":"115","suppressedMessages":"116","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"117","messages":"118","suppressedMessages":"119","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"120","messages":"121","suppressedMessages":"122","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"123","messages":"124","suppressedMessages":"125","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"126","messages":"127","suppressedMessages":"128","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"129","messages":"130","suppressedMessages":"131","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"132","messages":"133","suppressedMessages":"134","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"135","messages":"136","suppressedMessages":"137","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"138","messages":"139","suppressedMessages":"140","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"141","messages":"142","suppressedMessages":"143","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"144","messages":"145","suppressedMessages":"146","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"C:\\FRONTEND noroff\\social-media-client\\cypress.config.js",["147","148"],[],"C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\1-getting-started\\todo.cy.js",[],[],"C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\2-advanced-examples\\actions.cy.js",[],[],"C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\2-advanced-examples\\aliasing.cy.js",[],[],"C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\2-advanced-examples\\assertions.cy.js",[],[],"C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\2-advanced-examples\\connectors.cy.js",[],[],"C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\2-advanced-examples\\cookies.cy.js",[],[],"C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\2-advanced-examples\\cypress_api.cy.js",[],[],"C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\2-advanced-examples\\files.cy.js",[],[],"C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\2-advanced-examples\\location.cy.js",[],[],"C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\2-advanced-examples\\misc.cy.js",[],[],"C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\2-advanced-examples\\navigation.cy.js",[],[],"C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\2-advanced-examples\\network_requests.cy.js",[],[],"C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\2-advanced-examples\\querying.cy.js",[],[],"C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\2-advanced-examples\\spies_stubs_clocks.cy.js",[],[],"C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\2-advanced-examples\\storage.cy.js",[],[],"C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\2-advanced-examples\\traversal.cy.js",[],[],"C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\2-advanced-examples\\utilities.cy.js",[],[],"C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\2-advanced-examples\\viewport.cy.js",[],[],"C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\2-advanced-examples\\waiting.cy.js",[],[],"C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\2-advanced-examples\\window.cy.js",[],[],"C:\\FRONTEND noroff\\social-media-client\\cypress\\support\\commands.js",[],[],"C:\\FRONTEND noroff\\social-media-client\\cypress\\support\\e2e.js",[],[],"C:\\FRONTEND noroff\\social-media-client\\src\\js\\api\\auth\\login.test.js",[],[],"C:\\FRONTEND noroff\\social-media-client\\src\\js\\api\\auth\\logout.test.js",[],[],"C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\failed_login.cy.js",[],[],"C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\login.cy.js",[],[],"C:\\FRONTEND noroff\\social-media-client\\cypress\\e2e\\logout.cy.js",[],[],"C:\\FRONTEND noroff\\social-media-client\\src\\js\\api\\auth\\localStorage.mock.js",[],[],{"ruleId":"149","severity":1,"message":"150","line":5,"column":21,"nodeType":"151","messageId":"152","endLine":5,"endColumn":23},{"ruleId":"149","severity":1,"message":"153","line":5,"column":25,"nodeType":"151","messageId":"152","endLine":5,"endColumn":31},"no-unused-vars","'on' is defined but never used.","Identifier","unusedVar","'config' is defined but never used."]
54 changes: 54 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"env": {
"browser": true,
"es2021": true,
"node": true
},
"extends": "eslint:recommended",
"overrides": [
{
"files": [
"**/*.cy.js"
],
"env": {
"cypress/globals": true
},
"plugins": [
"cypress"
],
"extends": [
"plugin:cypress/recommended"
],
"rules": {
"cypress/no-unnecessary-waiting": "off",
"no-unused-vars": "off"
}
},
{
"files": [
"**/*.test.js",
"**/*.mock.js"
],
"env": {
"jest": true
},
"plugins": [
"jest"
],
"extends": [
"plugin:jest/recommended"
],
"rules": {
"jest/prefer-expect-assertions": "off"
}
}
],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
"no-undef": "off",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally you should avoid changing global rules and stick to the overrides instead. These rules are helpful for the normal app code.

"no-unused-vars": "warn"
}
}
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
15 changes: 15 additions & 0 deletions 6
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

added 61 packages, and audited 1021 packages in 6s

141 packages are looking for funding
run `npm fund` for details

4 high severity vulnerabilities

To address issues that do not require attention, run:
npm audit fix

To address all issues (including breaking changes), run:
npm audit fix --force

Run `npm audit` for details.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
WORKFLOW CA- social media client

Prerequisites Git Node JS VS-code/other compiler
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file could use some formatting. I recommend reading about markdown formatting.


Dependencies Bootstrap Dark 5: Styling application SASS : Extention and pre-processor for CSS ESLint: Code linting Prettier: Code formatting Lint-Staged: Linting staged files Husky: Git hooks on save and commit Jest: Unit testing Cypress: E2E-testing

Installing Clone the repo and open in code editor

git clone

Install dev-dependencies and other dependencies npm install --save-dev npm install

Running the tests Run unit test & E2E-test:

npm run test-unit Run unit test

npm run test Run E2E-tests

Authors Rukaiya Tahsin
12 changes: 12 additions & 0 deletions babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": "current"
}
}
]
]
}
9 changes: 9 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const { defineConfig } = require("cypress");

module.exports = defineConfig({
e2e: {
setupNodeEvents(on, config) {
// implement node event listeners here
},
},
});
Loading