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

Init playwright and tests #631

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
8c2b9ff
Init playwright
sharma-shray Jul 23, 2024
c27b511
Merge pull request #1 from sharma-shray/plw-init
sharma-shray Jul 23, 2024
1e4b74e
restaurant page tests
sharma-shray Jul 24, 2024
dedbea9
Merge pull request #2 from sharma-shray/restaurant-tests
sharma-shray Jul 24, 2024
2a97eb3
Update enatega-multivendor-web/__tests__/tests/restaurant.spec.ts
sharma-shray Jul 24, 2024
9f7a220
Update enatega-multivendor-web/__tests__/tests/restaurant.spec.ts
sharma-shray Jul 24, 2024
01cc0ce
Update enatega-multivendor-web/__tests__/tests/restaurant.spec.ts
sharma-shray Jul 24, 2024
430fc68
Home page tests
sharma-shray Jul 25, 2024
a0f8c63
Merge pull request #3 from sharma-shray/home-tests
sharma-shray Jul 25, 2024
69d78a9
restaurant list page tests
sharma-shray Jul 26, 2024
7214551
Merge pull request #4 from sharma-shray/rest-list-tests
sharma-shray Jul 26, 2024
6a4b33d
Check for text on terms page
sharma-shray Jul 30, 2024
6f02ab4
Merge pull request #5 from sharma-shray/terms-check
sharma-shray Jul 30, 2024
598122c
Terms tests
sharma-shray Jul 31, 2024
c882b8c
Merge pull request #6 from sharma-shray/terms-upd2
sharma-shray Jul 31, 2024
b2d2bfe
Update enatega-multivendor-web/__tests__/tests/restaurant-list.spec.ts
sharma-shray Aug 1, 2024
12006d9
Update terms check
sharma-shray Aug 1, 2024
8f4ecca
Merge pull request #7 from sharma-shray/terms-upd3
sharma-shray Aug 1, 2024
69ced9c
Login page tests
sharma-shray Aug 3, 2024
9f0e790
Merge pull request #8 from sharma-shray/login-tests
sharma-shray Aug 3, 2024
2354911
Check for main components on shop page
sharma-shray Aug 5, 2024
106290b
Merge pull request #9 from sharma-shray/shop-tests
sharma-shray Aug 5, 2024
2a19433
rename test
sharma-shray Aug 5, 2024
8071a5f
update shop tests
sharma-shray Aug 7, 2024
8d932ad
Merge pull request #10 from sharma-shray/shop-update
sharma-shray Aug 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 97 additions & 0 deletions enatega-multivendor-web/__tests__/package-lock.json

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

14 changes: 14 additions & 0 deletions enatega-multivendor-web/__tests__/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "__tests__",
"version": "1.0.0",
"main": "index.js",
"scripts": {},
"keywords": [],
"author": "",
"license": "ISC",
"description": "",
"devDependencies": {
"@playwright/test": "^1.45.3",
"@types/node": "^20.14.11"
}
}
68 changes: 68 additions & 0 deletions enatega-multivendor-web/__tests__/playwright-report/index.html

Large diffs are not rendered by default.

78 changes: 78 additions & 0 deletions enatega-multivendor-web/__tests__/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
import { defineConfig, devices } from '@playwright/test';

/**
* Read environment variables from file.
* https://github.com/motdotla/dotenv
*/
// import dotenv from 'dotenv';
// dotenv.config({ path: path.resolve(__dirname, '.env') });

/**
* See https://playwright.dev/docs/test-configuration.
*/
export default 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,
// },
});
Loading