Skip to content

Commit 40d3852

Browse files
authored
test: Have updated for Description in service account playwright (openobserve#6999)
Have updated for Description in place of First Name and Last Name for service account playwright
1 parent 578fb9a commit 40d3852

File tree

2 files changed

+23
-13
lines changed

2 files changed

+23
-13
lines changed

tests/ui-testing/pages/iamPage.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,11 @@ export class IamPage {
218218
await refreshButtonLocator.click({ force: true });
219219
}
220220

221+
async enterDescriptionSA() {
222+
const descriptionField = this.page.getByLabel('Description');
223+
await descriptionField.click();
224+
await descriptionField.fill('Description Details for Service Account');
225+
}
221226

222227

223228
}

tests/ui-testing/playwright-tests/serviceAccount.spec.js

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ import { IamPage } from "../pages/iamPage.js";
66

77
test.describe("Service Account for API access", () => {
88
let loginPage, iamPage;
9-
const emailName = `email${Date.now()}@gmail.com`;
9+
10+
const timestamp = Date.now();
11+
const randomSuffix = Math.floor(Math.random() * 1000);
12+
const emailName = `email${timestamp}${randomSuffix}@gmail.com`;
13+
14+
1015

1116
test.beforeEach(async ({ page }) => {
1217
loginPage = new LoginPage(page);
@@ -49,14 +54,14 @@ test.describe("Service Account for API access", () => {
4954
await iamPage.verifySuccessMessage('User already exists');
5055

5156
});
52-
//this is actually failing , so skipping it
53-
test.skip("Service Account not created if Cancel clicked", async ({ page }) => {
57+
58+
test("Service Account not created if Cancel clicked", async ({ page }) => {
5459

5560
await iamPage.gotoIamPage();
5661
await iamPage.iamPageServiceAccountsTab();
5762
await iamPage.iamPageAddServiceAccount();
5863
await iamPage.enterEmailServiceAccount(emailName);
59-
await iamPage.enterFirstLastNameServiceAccount();
64+
await iamPage.enterDescriptionSA();
6065
await iamPage.clickCancelServiceAccount();
6166

6267
});
@@ -73,8 +78,8 @@ test.describe("Service Account for API access", () => {
7378

7479

7580
});
76-
//this is flaky , so skipping it
77-
test.skip("Service Account Download Token", async ({ page }) => {
81+
82+
test("Service Account Download Token", async ({ page }) => {
7883

7984
await iamPage.gotoIamPage();
8085
await iamPage.iamPageServiceAccountsTab();
@@ -86,8 +91,8 @@ test.describe("Service Account for API access", () => {
8691

8792

8893
});
89-
//this is flaky , so skipping it
90-
test.skip("Service Account Token Pop Up Closed", async ({ page }) => {
94+
95+
test("Service Account Token Pop Up Closed", async ({ page }) => {
9196

9297
await iamPage.gotoIamPage();
9398
await iamPage.iamPageServiceAccountsTab();
@@ -99,8 +104,8 @@ test.describe("Service Account for API access", () => {
99104

100105
});
101106

102-
//this is flaky , so skipping it
103-
test.skip("Service Account Created and deleted", async ({ page }) => {
107+
108+
test("Service Account Created and deleted", async ({ page }) => {
104109

105110
await iamPage.gotoIamPage();
106111
await iamPage.iamPageServiceAccountsTab();
@@ -131,8 +136,8 @@ test.describe("Service Account for API access", () => {
131136

132137
});
133138

134-
//this is actually failing , so skipping it
135-
test.skip("Service Account Created and updated details", async ({ page }) => {
139+
140+
test("Service Account Created and updated details", async ({ page }) => {
136141

137142
await iamPage.gotoIamPage();
138143
await iamPage.iamPageServiceAccountsTab();
@@ -143,7 +148,7 @@ test.describe("Service Account for API access", () => {
143148
await iamPage.clickServiceAccountPopUpClosed();
144149
await iamPage.reloadServiceAccountPage();
145150
await iamPage.updatedServiceAccount(emailName);
146-
await iamPage.enterFirstLastNameServiceAccount();
151+
await iamPage.enterDescriptionSA();
147152
await iamPage.clickSaveServiceAccount();
148153
await iamPage.verifySuccessMessage('Service Account updated successfully.');
149154

0 commit comments

Comments
 (0)