Skip to content

Commit

Permalink
For simple study e2e project
Browse files Browse the repository at this point in the history
  • Loading branch information
azaworld authored Jun 11, 2024
0 parents commit ae13104
Show file tree
Hide file tree
Showing 10 changed files with 5,768 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
REACT_APP_GOOGLE_CLIENTID = '421389601384-3ftolb627rdeqvfpf14cedj2kc0aq8ro.apps.googleusercontent.com'
REACT_APP_GOOGLE_CLIENT_SECRET = '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t'
GOOGLE_REFRESH_TOKEN = '1//04PS8SpTv57l7CgYIARAAGAQSNgF-L9Ira6nF-UiXFFderEzDML3w56velT3kJTzVE2beNKpVghags_5Ajhl23VYuRzX0yODrCA'
22 changes: 22 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
/node_modules

# cypress output
/cypress/videos
/cypress/screenshots

# Environments
.env
.history
cypress.env.json

npm-debug.log*
.pnpm-debug.log*
yarn-debug.log*
yarn-error.log*
.vscode/settings.json

# local History
.lh/
61 changes: 61 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# SimpleStudy Web Portal Cypress Tests

Cypress documentation: (https://docs.cypress.io/guides/end-to-end-testing/writing-your-first-end-to-end-test)[https://docs.cypress.io/guides/end-to-end-testing/writing-your-first-end-to-end-test]

## Getting Started

Follow these steps to get your testing environment up and running.

### Prerequisites

- Git
- Node.js and npm (Node Package Manager)

### 1. Clone the Repository
First, clone the repository to your local machine:
```bash
# clone the repo
$ git clone https://github.com/SimplesStudy/cypress-webportal-tests
$ cd cypress-webportal-tests
```

### 2. Configure Environment Variables
Copy the environment template configuration file:
```bash
$ cp cypress.env.example.json cypress.env.json
```

***User Credentials:*** Ensure the supportEmail and supportPassword variables are set to your support email and password.

```bash
supportEmail
supportPassword
```

### 3. Install Dependencies

Install the necessary dependencies for the project:

```bash
$ npm install
```

# Running Tests
There are two ways to run your Cypress tests: using the Cypress UI or running them directly via the command line.

### Open Cypress Ui Test Runner

```bash
# from app's directory run following command
$ npx cypress open
```
This opens the Cypress interface, where you can run individual tests interactively.


### Running Tests via CLI
To run tests without the Cypress Test Runner and record the results, use this command:
```bash
# from app's directory run following command
$ npx cypress run --record --key aecfab60-1961-458c-9155-4397d5bf9de8
```

8 changes: 8 additions & 0 deletions SimpleStudy.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="GENERAL_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
24 changes: 24 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
const { defineConfig } = require("cypress");

module.exports = defineConfig({
projectId: 'y3nfzn',
viewportWidth: 1200,
viewportHeight: 660,
defaultCommandTimeout: 10000,

e2e: {
experimentalModifyObstructiveThirdPartyCode: true,
setupNodeEvents(on, config) {
// implement node event listeners here
},
},
});

// module.exports = {
// e2e: {
// experimentalModifyObstructiveThirdPartyCode: true,
// setupNodeEvents(on, config) {
// // implement node event listeners here
// },
// },
// };
6 changes: 6 additions & 0 deletions cypress.env.example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"baseUrl": "http://localhost",
"supportEmail": "[email protected]",
"supportPassword": "upload123",
"successToastClass": ".react-toast-notifications__toast--success"
}
11 changes: 11 additions & 0 deletions cypress.env.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"baseUrl": "https://simplestudy.cloud/",
"settingsUrl": "https://simplestudy.cloud/account/settings",
"experimentalSessionAndOrigin": true,
"supportEmail": "[email protected]",
"supportPassword": "upload123",
"chromeWebSecurity": false
}



Loading

0 comments on commit ae13104

Please sign in to comment.