Skip to content

Commit

Permalink
resolve merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
shreeharsha-factly committed Jun 27, 2024
2 parents 9804d6c + 86c191c commit 830f0cc
Show file tree
Hide file tree
Showing 129 changed files with 38,713 additions and 34,834 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Playwright Tests
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -190,4 +190,9 @@ dist/

setupConfig.sh

postgres
postgres
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
volumes
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,10 @@ Once the application is up and running you should be able to access it using the

- Create config file with name config (and extension .env, .yml, .json) in `server/`, `api/` and `templates/` add config variables (for eg see config.env.example in each folder)
- Create a `.env` file inside companion folder in root for companion config variables (for eg see .env.example file in companion folder)
git fetch upstream
git fetch upstream
- to add default env files automatically run `bash build.sh`

## Development Notes
- If there are updates to npm dependencies for `dega-studio`, run `bash build-nocache.sh` from the project root.
- If the script fails to update dependencies, enter the container and manually run `npm install --legacy-peer-deps`.

8 changes: 8 additions & 0 deletions build-nocache.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

# Create a unique cache bust value
CACHEBUST=$(date +%s)

# Pass the cache bust value as a build argument
docker-compose build --no-cache --build-arg CACHEBUST=$CACHEBUST dega-studio
docker-compose up
1 change: 1 addition & 0 deletions companion/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ COMPANION_DOMAIN=localhost:3020
COMPANION_PROTOCOL=http
COMPANION_DATADIR=/
COMPANION_SELF_ENDPOINT=localhost:3020
COMPANION_AWS_REGION=us-east-1
NODE_ENV=dev
11 changes: 10 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ services:
####### UPLOAD SERVICES #######
###########################################################################
companion:
image: transloadit/companion
image: transloadit/companion:sha-e80a7f7
ports:
- "3020:3020"
env_file:
Expand Down Expand Up @@ -461,10 +461,19 @@ services:
build:
context: ./studio
dockerfile: Dockerfile
no_cache: true
args:
- CACHEBUST
environment:
- PUBLIC_URL=http://127.0.0.1:4455/.factly/dega/studio
- REACT_APP_KAVACH_PUBLIC_URL=http://127.0.0.1:4455/.factly/kavach/web
- REACT_APP_SACH_API_URL=https://sach-server.factly.in
- WDS_SOCKET_HOST=127.0.0.1
- CHOKIDAR_USEPOLLING=true
- WATCHPACK_POLLING=true
- NODE_ENV=development
ports:
- "3000:3000"
volumes:
- type: bind
source: ./studio
Expand Down
140 changes: 140 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "dega",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {},
"repository": {
"type": "git",
"url": "git+https://github.com/factly/dega.git"
},
"keywords": [],
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/factly/dega/issues"
},
"homepage": "https://github.com/factly/dega#readme",
"devDependencies": {
"@playwright/test": "^1.44.1",
"@types/node": "^20.14.2"
}
}
79 changes: 79 additions & 0 deletions playwright.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
// @ts-check
const { defineConfig, devices } = require('@playwright/test');

/**
* Read environment variables from file.
* https://github.com/motdotla/dotenv
*/
// require('dotenv').config();

/**
* @see https://playwright.dev/docs/test-configuration
*/
module.exports = defineConfig({
testDir: './tests',
/* Run tests in files in parallel */
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
/* Retry on CI only */
retries: process.env.CI ? 2 : 0,
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: 'html',
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('/')`. */
// baseURL: 'http://127.0.0.1:3000',

/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',
},

/* Configure projects for major browsers */
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},

{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
},

{
name: 'webkit',
use: { ...devices['Desktop Safari'] },
},

/* Test against mobile viewports. */
// {
// name: 'Mobile Chrome',
// use: { ...devices['Pixel 5'] },
// },
// {
// name: 'Mobile Safari',
// use: { ...devices['iPhone 12'] },
// },

/* Test against branded browsers. */
// {
// name: 'Microsoft Edge',
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
// },
// {
// name: 'Google Chrome',
// use: { ...devices['Desktop Chrome'], channel: 'chrome' },
// },
],

/* Run your local dev server before starting the tests */
// webServer: {
// command: 'npm run start',
// url: 'http://127.0.0.1:3000',
// reuseExistingServer: !process.env.CI,
// },
});

35 changes: 35 additions & 0 deletions state.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"cookies": [
{
"name": "csrf_token_2d785ea2f6536900108362e9bfff73eef3a32be3921b3abc74b0a990093487c9",
"value": "ZuCBOfqeHHkR+fp3CumXSiUZHMeT/8PlRDFiyqiN7Go=",
"domain": "127.0.0.1",
"path": "/",
"expires": 1749818658.186398,
"httpOnly": true,
"secure": false,
"sameSite": "Lax"
},
{
"name": "ory_kratos_session",
"value": "MTcxODI4MjY1OHxKOWpGMERiNkpIaEhtVm1pa09NZkFxdVJkdTFtby1jOTJNcWNhZVBYMjlJRmVzWW1HdHllMlNKd0luc3NLWVJqYnZ1WmJaM0VaSFZ3UGVTX01Mb3dxdHRjaF9qWFpldmVBRFNoOThxaFdlZHBGaUp6NTk4M3pNaGVhWE1vYnlVd1pBdTVxZDJzREE9PXztrznqKo_KUBN2bi893EUAy67CSGX4doSttWyWUrCRyg==",
"domain": "127.0.0.1",
"path": "/",
"expires": 1718369058.186497,
"httpOnly": true,
"secure": false,
"sameSite": "Lax"
}
],
"origins": [
{
"origin": "http://127.0.0.1:4455",
"localStorage": [
{
"name": "returnTo",
"value": "http://127.0.0.1:4455/.factly/dega/studio/"
}
]
}
]
}
18 changes: 0 additions & 18 deletions studio/.eslintrc

This file was deleted.

Loading

0 comments on commit 830f0cc

Please sign in to comment.