-
Notifications
You must be signed in to change notification settings - Fork 269
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
59 additions
and
0 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
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,17 @@ | ||
import LoginPage from "../pages/LoginPage"; | ||
|
||
let homePage = null; | ||
let loginPage = null; | ||
let adminPage = null; | ||
|
||
before("login", () => { | ||
loginPage = new LoginPage(); | ||
loginPage.visit(); | ||
}); | ||
|
||
describe("Admin Component Menu", function () { | ||
it("User navigates to the Admin Component Menu", function () { | ||
homePage = loginPage.goToHomePage(); | ||
adminPage = homePage.goToAdminPage(); | ||
}); | ||
}); |
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,4 @@ | ||
{ | ||
"username": "admin", | ||
"password": "adminADMIN!" | ||
} |
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,3 @@ | ||
{ | ||
"labNo": "DEV01250000000000087" | ||
} |
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,27 @@ | ||
class AdminPage { | ||
visit() { | ||
cy.visit("/admin"); | ||
} | ||
|
||
getHeader() { | ||
return cy.get("h1"); | ||
} | ||
|
||
// Add more methods to interact with elements on the admin page as needed | ||
clickSomeAdminButton() { | ||
return cy.get("#someAdminButton").click(); | ||
} | ||
|
||
// Example method to verify an element on the admin page | ||
verifyAdminElement() { | ||
return cy.get("#adminElement").should("be.visible"); | ||
} | ||
goToAdminPage() { | ||
this.openNavigationMenu(); | ||
cy.get("#menu_admin").click(); | ||
cy.get("#menu_admin_nav").click(); | ||
return new AdminPage(); | ||
} | ||
} | ||
|
||
export default AdminPage; |
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