Skip to content

Commit

Permalink
Merge branch 'develop' into issue#5364
Browse files Browse the repository at this point in the history
  • Loading branch information
aeswibon authored May 24, 2023
2 parents ba5bdc4 + 14f9547 commit 736eeef
Show file tree
Hide file tree
Showing 98 changed files with 3,821 additions and 4,918 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/cypress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,20 @@ jobs:
run: curl -o /dev/null -s -w "%{http_code}\n" http://localhost:9000

- name: Change api proxy url 📝
run: 'sed --in-place "s^\"proxy\": .*,^\"proxy\": \"http://localhost:9000\",^g" package.json'
run: 'sed --in-place "s^\"target\": .*,^\"target\": \"http://localhost:9000\",^g" vite.config.ts'

- name: Install dependencies 📦
run: npm install --legacy-peer-deps
run: npm install

- name: Compile rescript files ⚙️
run: "npm run build:res"

- name: Cypress run 🥬
uses: cypress-io/github-action@v4
uses: cypress-io/github-action@v5
with:
env: SKIP_PREFLIGHT_CHECK=true
install: false
start: "npm run dev:react"
start: "npx vite --host"
wait-on: "http://localhost:4000"
wait-on-timeout: 300
browser: electron
Expand All @@ -73,15 +73,15 @@ jobs:
labels: cypress failed

- name: Upload cypress screenshots on failure 📸
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots

# Test run video was always captured, so this action uses "always()" condition
- name: Upload cypress videos 📹
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
if: always()
with:
name: cypress-videos
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

- 💬 Comment on the issue if you are willing to take it up, and link the pull request with the issue.
- 🏷️ Tag `@coronasafe/code-reviewers` for faster resolution.
- 📸 Attach screenshots in the pull requests shwoing the changes made in the UI.
- 📸 Attach screenshots in the pull requests showing the changes made in the UI.

#### Install the required dependencies

Expand Down
29 changes: 26 additions & 3 deletions cypress/e2e/assets_spec/filter.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,40 @@ describe("Assets Filter", () => {
expect(interception.response.statusCode).to.equal(200);
expect(interception.request.url).to.include("search_text=test");
});
cy.contains("Apply").click();
cy.contains("Facility:");
});

it("Filter by Asset Type", () => {
cy.get("[name='asset_type']").select("EXTERNAL");
cy.get("[id='asset-type'] > div > button")
.click()
.get("li")
.contains("EXTERNAL")
.click();
cy.contains("Apply").click();
cy.contains("Asset Type: EXTERNAL");
});

it("Filter by Asset Status", () => {
cy.get("[name='asset_status']").select("ACTIVE");
cy.get("[id='asset-status'] > div > button")
.click()
.get("li")
.contains("ACTIVE")
.click();
cy.contains("Apply").click();
cy.contains("Status: ACTIVE");
});

afterEach(() => {
it("Filter by Asset Class", () => {
cy.get("[id='asset-class'] > div > button")
.click()
.get("li")
.contains("ONVIF Camera")
.click();
cy.contains("Apply").click();
cy.contains("Asset Class: ONVIF");
});
afterEach(() => {
cy.saveLocalStorage();
});
});
2 changes: 1 addition & 1 deletion cypress/e2e/auth_spec/auth.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe("Authorisation/Authentication", () => {
cy.url().should("include", "/");
});

it("Try login admin with incorrect password", () => {
it("Try login as admin with incorrect password", () => {
cy.log("Logging in the user: devdistrictadmin:Coronasafe@123");

cy.awaitUrl("/", true);
Expand Down
143 changes: 0 additions & 143 deletions cypress/integration/1-getting-started/todo.spec.js

This file was deleted.

Loading

0 comments on commit 736eeef

Please sign in to comment.