Files
openobserve/tests/ui-testing/playwright-tests/secondsPrecisionAdded.spec.js
T
Shyam Panjiyar ca7b05aba6 test: service account API access automation (#5258)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Bug Fixes**
- Updated the locator for the management menu item to enhance navigation
reliability.
- Streamlined the control flow by removing unnecessary wait times in the
management navigation process.

- **New Features**
- Added methods for managing service accounts, including adding,
validating, and deleting service accounts.
- Introduced a new test suite for validating service account
functionality, covering error handling and successful operations during
creation.
- Added a new method for automatic login based on visibility of the
login option.

- **Improvements**
- Updated the login method to ensure it waits for the correct login page
URL before proceeding.
- Simplified the login process in UI tests by removing unnecessary
parameters and wait times.
- Enhanced test scripts with improved structure and clarity, including
comments for better understanding.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-12-17 09:50:29 +05:30

27 lines
856 B
JavaScript

// Implementation test.spec.js
import { test, expect } from "./baseFixtures";
import { LoginPage } from '../pages/loginPage.js';
import { LogsPage } from '../pages/logsPage.js';
import { startTimeValue, endTimeValue } from '../pages/CommonLocator.js';
test('Relative Seconds on Logs page', async ({ page }) => {
// Create page object instances
const loginPage = new LoginPage(page);
const logsPage = new LogsPage(page);
// Step 1: Navigate to the application and login
await loginPage.gotoLoginPage();
await loginPage.login();
// Step 2: Navigate to Logs Page
// await page.waitForTimeout(4000); // Wait for login process
await logsPage.navigateToLogs();
// Step 3: Set the time to past 30 seconds and verify
await logsPage.setTimeToPast30Seconds();
await logsPage.verifyTimeSetTo30Seconds();
await logsPage.signOut();
});