Skip to content

Commit

Permalink
correction
Browse files Browse the repository at this point in the history
  • Loading branch information
nabim777 committed Feb 3, 2024
1 parent 5f88e49 commit 54ab73b
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 128 deletions.
32 changes: 1 addition & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,34 +47,4 @@ jobs:
- name: run web-ui tests
run: |
npx playwright install
npm run test:e2e **/tests
# GitHub Actions workflow defined here named "Main Workflow." This workflow is triggered on pushes and pull requests to the master branch. Here's a breakdown of what this workflow does:
# Checkout repo code:


# Uses the actions/checkout action to fetch the repository's codebase.
# Set up Node.js:

# Uses the actions/setup-node action to set up Node.js version 16.x.
# Set up Go programming language:

# Uses the actions/setup-go action to set up Go version 1.20.
# Set up the file application:

# Clones the filebrowser repository from GitHub.
# Navigates to the filebrowser/frontend directory.
# Installs npm dependencies and builds the frontend.
# Goes back to the root directory and downloads Go modules.
# Runs the main Go application (main.go).
# Wait for file browser:

# Installs the wait-for-it utility via apt-get.
# Waits for the file browser application to be available at localhost:8080 for a maximum of 10 seconds.
# Install dependencies:

# Installs npm dependencies again.
# Run web UI tests:

# Installs Playwright using npx playwright install.
# Runs end-to-end tests located in the tests directory using npm run test:e2e.
npm run test:e2e **/tests
68 changes: 0 additions & 68 deletions .idea/workspace.xml

This file was deleted.

24 changes: 0 additions & 24 deletions .vscode/settings.json

This file was deleted.

2 changes: 0 additions & 2 deletions akriti/.gitignore

This file was deleted.

85 changes: 84 additions & 1 deletion akriti/note.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,86 @@
#when user create a new users( jun kura test garney),
# aru Given test
#donot include the multiple data in data tables like admin tables
#donot include the multiple data in data tables like admin tables

# notes about the github actions tools

name: Main Workflow

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
run-e2e-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repo code
uses: actions/checkout@v3

- name: set up node
uses: actions/setup-node@v3
with:
node-version: 16.x

- name: set up go
uses: actions/setup-go@v4
with:
go-version: "1.20"

- name: set up the file application
run: |
git clone https://github.com/Grisha596/filebrowser.git
cd filebrowser/frontend
npm install
npm run build
cd ..
go mod download
go run main.go &

- name: wait file browser
run: |
sudo apt-get install wait-for-it -y
wait-for-it -h localhost -p 8080 -t 10

- name: install dependencies
run: |
npm install

- name: run web-ui tests
run: |
npx playwright install
npm run test:e2e **/tests

# GitHub Actions workflow defined here named "Main Workflow." This workflow is triggered on pushes and pull requests to the master branch. Here's a breakdown of what this workflow does:
# Checkout repo code:


# Uses the actions/checkout action to fetch the repository's codebase.
# Set up Node.js:

# Uses the actions/setup-node action to set up Node.js version 16.x.
# Set up Go programming language:

# Uses the actions/setup-go action to set up Go version 1.20.
# Set up the file application:

# Clones the filebrowser repository from GitHub.
# Navigates to the filebrowser/frontend directory.
# Installs npm dependencies and builds the frontend.
# Goes back to the root directory and downloads Go modules.
# Runs the main Go application (main.go).
# Wait for file browser:

# Installs the wait-for-it utility via apt-get.
# Waits for the file browser application to be available at localhost:8080 for a maximum of 10 seconds.
# Install dependencies:

# Installs npm dependencies again.
# Run web UI tests:

# Installs Playwright using npx playwright install.
# Runs end-to-end tests located in the tests directory using npm run test:e2e.
3 changes: 2 additions & 1 deletion akriti/tests/acceptance/PageObjects/UserPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ class UserPage {
this.languageSelector = "//input[@id='language']";
this.adminPermissionSelector = "//input[@id='adminpermission']";
this.submitSelector = "//input[@type='submit']";
this.tableUserSelector ='//tr[last()]/td'
this.tableUserSelector ='//td[contains(text(),"%s")]'
this.userManagementPageUrl = 'http://localhost:8080/settings/users'
}

async userManagementSetting() {
Expand Down
4 changes: 3 additions & 1 deletion akriti/tests/acceptance/stepDefinitions/createUserContext.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const { Given, When, Then } = require("@cucumber/cucumber");
const UserPage = require("../PageObjects/UserPage.js")
const assert = require('assert')
const { expect } = require("@playwright/test");

const util = require ('util')
const userPage = new UserPage;
Given('the user has navigated to the Settings and selected the User Management page', async function () {
Expand All @@ -12,6 +13,7 @@ When('user enters on the following data:', async function (dataTable) {
});

Then('user should be able to see a new user with username {string}', async function (username) {
await page.goto(userPage.userManagementPageUrl)
const userLocator = page.locator(util.format(userPage.tableUserSelector, username));
await expect(userLocator).toBeVisible()
});

0 comments on commit 54ab73b

Please sign in to comment.