Skip to content

Commit

Permalink
Merge pull request #49 from plang-psm/revert-38-prettier-wf-test
Browse files Browse the repository at this point in the history
Revert 38 prettier wf test
  • Loading branch information
plang-psm authored Jun 11, 2024
2 parents aee9316 + 41609dc commit c9057c4
Show file tree
Hide file tree
Showing 64 changed files with 21,879 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist
build
coverage
9 changes: 9 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
singleQuote: true,
trailingComma: 'all',
printWidth: 100,
tabWidth: 2,
useTabs: false,
bracketSpacing: true,

};
13 changes: 13 additions & 0 deletions build/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"files": {
"main.css": "/static/css/main.e7326792.css",
"main.js": "/static/js/main.4dbc6ca2.js",
"index.html": "/index.html",
"main.e7326792.css.map": "/static/css/main.e7326792.css.map",
"main.4dbc6ca2.js.map": "/static/js/main.4dbc6ca2.js.map"
},
"entrypoints": [
"static/css/main.e7326792.css",
"static/js/main.4dbc6ca2.js"
]
}
Binary file added build/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions build/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>Popfliix</title><script defer="defer" src="/static/js/main.4dbc6ca2.js"></script><link href="/static/css/main.e7326792.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
Binary file added build/logo192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/logo512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions build/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
3 changes: 3 additions & 0 deletions build/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
4 changes: 4 additions & 0 deletions build/static/css/main.e7326792.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions build/static/css/main.e7326792.css.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions build/static/js/main.4dbc6ca2.js

Large diffs are not rendered by default.

128 changes: 128 additions & 0 deletions build/static/js/main.4dbc6ca2.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */

/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */

/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* use-sync-external-store-shim.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* use-sync-external-store-shim/with-selector.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @remix-run/router v1.6.2
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/

/**
* React Router DOM v6.11.2
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/

/**
* React Router v6.11.2
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/

/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
1 change: 1 addition & 0 deletions build/static/js/main.4dbc6ca2.js.map

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions cypress/e2e/forms/login-form.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
describe('Test Login form', () => {
beforeEach(() => {
cy.visit('/users/login');
});
it('Test email login', () => {
cy.contains(/login/i);
cy.getDataTest('email-input').type('[email protected]');
cy.getDataTest('pwd-input').type('p');
cy.getDataTest('submit-button').click();
cy.contains(/Logged in as/i).should('exist');
cy.location('pathname').should('eq', '/');
});
});

describe('Test signup button on Login form', () => {
beforeEach(() => {
cy.visit('/users/login');
});
it('Test signup button', () => {
cy.getDataTest('signup-button').click();
cy.location('pathname').should('eq', '/users/signup');
});
});
24 changes: 24 additions & 0 deletions cypress/e2e/forms/signup-form.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
describe('Test Signup form', () => {
beforeEach(() => {
cy.visit('/users/signup');
});
it('Test email signup', () => {
cy.contains(/signup/i);
cy.getDataTest('username-input').type('test');
cy.getDataTest('email-input').type('[email protected]');
cy.getDataTest('pwd-input').type('Test1234!');
cy.getDataTest('confirm-pwd-input').type('Test1234!');
cy.getDataTest('submit-button').click();
cy.contains(/User already exist/i).should('exist');
});
});

describe('Test login button on Signup form', () => {
beforeEach(() => {
cy.visit('/users/signup');
});
it('Test login button', () => {
cy.getDataTest('login-button').click();
cy.location('pathname').should('eq', '/users/login');
});
});
5 changes: 5 additions & 0 deletions cypress/e2e/home/site-verify-spec.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
describe('Test if site is running', () => {
it('passes', () => {
cy.visit('/');
});
});
5 changes: 5 additions & 0 deletions cypress/fixtures/example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "Using fixtures to represent data",
"email": "[email protected]",
"body": "Fixtures are a great way to mock data for responses to routes"
}
29 changes: 29 additions & 0 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// ***********************************************
// This example commands.js shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
// ***********************************************
//
//
// -- This is a parent command --
// Cypress.Commands.add('login', (email, password) => { ... })
//
//
// -- This is a child command --
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
//
//
// -- This is a dual command --
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })

Cypress.Commands.add('getDataTest', (selector) => {
return cy.get(`[data-test="${selector}"]`);
});
20 changes: 20 additions & 0 deletions cypress/support/e2e.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// ***********************************************************
// This example support/e2e.js is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// You can change the location of this file or turn off
// automatically serving support files with the
// 'supportFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/configuration
// ***********************************************************

// Import commands.js using ES2015 syntax:
import './commands';

// Alternatively you can use CommonJS syntax:
// require('./commands')
8 changes: 8 additions & 0 deletions dev.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const { defineConfig } = require('cypress');

module.exports = defineConfig({
e2e: {
setupNodeEvents(on, config) {},
baseUrl: 'http://localhost:3000/',
},
});
Loading

0 comments on commit c9057c4

Please sign in to comment.