Skip to content

Commit

Permalink
Site replication status ui-test
Browse files Browse the repository at this point in the history
  • Loading branch information
prakashsvmx committed Apr 13, 2022
1 parent 77ae11d commit cbe0f89
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions portal-ui/tests/permissions-2/site-replication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,13 @@ let testDomainUrl = "http://localhost:9090";
const screenUrl = `${testDomainUrl}${IAM_PAGES.SITE_REPLICATION}`;
const siteReplicationEl = Selector("span").withText("Site Replication");
export const addSitesBtn = Selector("button").withText("Add Sites");
export const replicationStatusBtn =
Selector("button").withText("Replication Status");

/* Begin Local Testing config block */
// For local Testing Create users and assign policies then update here.
// Command to invoke the test locally: testcafe chrome tests/permissions/site-replication.ts
/* End Local Testing config block */

fixture("Site Replication for user with Admin permissions")
fixture("Site Replication Status for user with Admin permissions")
.page(testDomainUrl)
.beforeEach(async (t) => {
await t.useRole(roles.settings);
Expand All @@ -48,13 +46,7 @@ test("Site replication sidebar item exists", async (t) => {

test("Add Sites button exists", async (t) => {
const addSitesBtnExists = addSitesBtn.exists;
const replicationStatusBtnPresent = replicationStatusBtn.exists;
await t
.navigateTo(screenUrl)
.expect(addSitesBtnExists)
.ok()
.expect(replicationStatusBtnPresent)
.ok();
await t.navigateTo(screenUrl).expect(addSitesBtnExists).ok();
});

test("Add Sites button is clickable", async (t) => {
Expand Down

0 comments on commit cbe0f89

Please sign in to comment.