Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
70 changes: 65 additions & 5 deletions .github/workflows/Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Run Playwright Tests
on:
push:
branches:
- main
- dev-aayushi
pull_request:
branches:
- main
- dev-aayushi
workflow_dispatch:

permissions:
Expand Down Expand Up @@ -52,14 +52,74 @@ jobs:
- name: Install Playwright Browsers
run: npx playwright install --with-deps

- name: Run Playwright tests
- name: TC01- Run Playwright tests
run: npm run test:tc01
env:
WEBAPP_URL: ${{ vars.WEBAPP_URL }}

- name: Deploy Report 🚀
- name: Deploy Report for tc01🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: playwright-report # The folder the action should deploy.
target-folder: tests/tc-01/
target-folder: tests/tc-01/

- name: TC02- Run Playwright tests
run: npm run test:tc02
env:
WEBAPP_URL: ${{ vars.WEBAPP_URL }}

- name: Deploy Report for tc02🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: playwright-report # The folder the action should deploy.
target-folder: tests/tc-02/

- name: TC03- Run Playwright tests
run: npm run test:tc03
env:
WEBAPP_URL: ${{ vars.WEBAPP_URL }}

- name: Deploy Report for tc03🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: playwright-report # The folder the action should deploy.
target-folder: tests/tc-03/

- name: TC04- Run Playwright tests
run: npm run test:tc04
env:
WEBAPP_URL: ${{ vars.WEBAPP_URL }}

- name: Deploy Report for tc04🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: playwright-report # The folder the action should deploy.
target-folder: tests/tc-04/

- name: TC05- Run Playwright tests
run: npm run test:tc05
env:
WEBAPP_URL: ${{ vars.WEBAPP_URL }}

- name: Deploy Report for tc05🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: playwright-report # The folder the action should deploy.
target-folder: tests/tc-05/

- name: TC06- Run Playwright tests
run: npm run test:tc06
env:
WEBAPP_URL: ${{ vars.WEBAPP_URL }}

- name: Deploy Report for tc06🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: playwright-report # The folder the action should deploy.
target-folder: tests/tc-06/
6 changes: 5 additions & 1 deletion config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
require("dotenv").config()
require ("dotenv").config()

const AppConfig = {

TestURL: process.env.WEBAPP_URL

}

console.log("WEBAPP_URL:", process.env.WEBAPP_URL);

module.exports = AppConfig
1 change: 0 additions & 1 deletion env.example

This file was deleted.

4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
"test": "playwright test",
"test:tc01": "playwright test tests/TC01",
"test:tc02": "playwright test tests/TC02",
"test:tc03": "playwright test tests/TC03",
"test:tc04": "playwright test tests/TC04",
"test:tc05": "playwright test tests/TC05",
"test:tc06": "playwright test tests/TC06",
"dev": "node --inspect-brk ./node_modules/@playwright/test/cli.js test TC04DAOValues.spec.js --project=chromium --headed"
},
"keywords": [],
Expand Down
8 changes: 4 additions & 4 deletions tests/CommonFile/Action.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ async function changeNetwork(page){
console.log("WebApp URL for Testing:", AppConfig.TestURL)
await page.goto(AppConfig.TestURL);

await page.click(pageLocators.TokenCreator.EnterApp)
await page.click(pageLocators.TokenCreation.EnterApp)

await page.click(pageLocators.TokenCreator.MainNet);
await page.getByText(pageLocators.TokenCreation.MainNet).click()

await page.waitForSelector(pageLocators.TokenCreator.frame);
await page.waitForSelector(pageLocators.TokenCreation.frame);

await page.click(pageLocators.TokenCreator.GhostNet);
await page.getByText(pageLocators.TokenCreation.GhostNet).click();

}

Expand Down
Loading