-
Notifications
You must be signed in to change notification settings - Fork 433
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into vitals-gain
- Loading branch information
Showing
76 changed files
with
1,948 additions
and
2,910 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/// <reference types="cypress" /> | ||
|
||
import { cy, describe, before, beforeEach, it, afterEach } from "local-cypress"; | ||
import { AssetSearchPage } from "../../pageobject/Asset/AssetSearch"; | ||
import { AssetQRScanPage } from "../../pageobject/Asset/AssetQRScan"; | ||
import { AssetPagination } from "../../pageobject/Asset/AssetPagination"; | ||
import { AssetFilters } from "../../pageobject/Asset/AssetFilters"; | ||
|
||
describe("Asset Tab", () => { | ||
const assetSearchPage = new AssetSearchPage(); | ||
const assetQRScanPage = new AssetQRScanPage(); | ||
const assetPagination = new AssetPagination(); | ||
const assetFilters = new AssetFilters(); | ||
|
||
before(() => { | ||
cy.loginByApi("devdistrictadmin", "Coronasafe@123"); | ||
cy.saveLocalStorage(); | ||
}); | ||
|
||
beforeEach(() => { | ||
cy.restoreLocalStorage(); | ||
cy.awaitUrl("/assets"); | ||
}); | ||
|
||
// search for a element | ||
|
||
it("Search Asset Name", () => { | ||
const initialUrl = cy.url(); | ||
assetSearchPage.typeSearchKeyword("dummy camera 30"); | ||
assetSearchPage.pressEnter(); | ||
assetSearchPage.verifyUrlChanged(initialUrl); | ||
}); | ||
|
||
// scan a asset qr code | ||
|
||
it("Scan Asset QR", () => { | ||
assetQRScanPage.scanAssetQR(); | ||
}); | ||
|
||
// filter the asset and verify the badges are there | ||
|
||
it("Filter Asset", () => { | ||
assetFilters.filterAssets( | ||
"Dummy Facility 1", | ||
"INTERNAL", | ||
"ACTIVE", | ||
"ONVIF Camera" | ||
); | ||
}); | ||
|
||
// Verify the pagination in the page | ||
|
||
it("Next/Previous Page", () => { | ||
assetPagination.navigateToNextPage(); | ||
assetPagination.navigateToPreviousPage(); | ||
}); | ||
|
||
afterEach(() => { | ||
cy.saveLocalStorage(); | ||
}); | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/// <reference types="cypress" /> | ||
import { AssetPage } from "../../pageobject/Asset/AssetCreation"; | ||
import { v4 as uuidv4 } from "uuid"; | ||
|
||
describe("Asset", () => { | ||
const assetPage = new AssetPage(); | ||
const phone_number = "9999999999"; | ||
const serialNumber = Math.floor(Math.random() * 10 ** 10).toString(); | ||
|
||
before(() => { | ||
cy.loginByApi("devdistrictadmin", "Coronasafe@123"); | ||
cy.saveLocalStorage(); | ||
}); | ||
|
||
beforeEach(() => { | ||
cy.restoreLocalStorage(); | ||
cy.awaitUrl("/assets"); | ||
}); | ||
|
||
//Create an asset | ||
|
||
it("Create an Asset", () => { | ||
assetPage.createAsset(); | ||
assetPage.selectFacility("Dummy Facility 1"); | ||
assetPage.selectLocation("Camera Loc"); | ||
assetPage.selectAssetType("Internal"); | ||
assetPage.selectAssetClass("ONVIF Camera"); | ||
|
||
const qr_id = uuidv4(); | ||
|
||
assetPage.enterAssetDetails( | ||
"New Test Asset", | ||
"Test Description", | ||
"Working", | ||
qr_id, | ||
"Manufacturer's Name", | ||
"2025-12-25", | ||
"Customer Support's Name", | ||
phone_number, | ||
"email@support.com", | ||
"Vendor's Name", | ||
serialNumber, | ||
"2021-12-25", | ||
"Test note for asset creation!" | ||
); | ||
|
||
assetPage.clickCreateAsset(); | ||
|
||
assetPage.verifySuccessNotification("Asset created successfully"); | ||
}); | ||
|
||
// Edit an exisit asset | ||
|
||
afterEach(() => { | ||
cy.saveLocalStorage(); | ||
}); | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.