Skip to content

Commit

Permalink
Merge branch 'staging' into restyle-landing-page
Browse files Browse the repository at this point in the history
  • Loading branch information
gkorland authored Jan 28, 2025
2 parents 9bd266a + 68302fd commit c416fe3
Show file tree
Hide file tree
Showing 10 changed files with 194 additions and 46 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nextjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "18"
node-version: "22"
cache: ${{ steps.detect-package-manager.outputs.manager }}

- name: Restore cache
Expand Down
13 changes: 12 additions & 1 deletion .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

services:
falkordb:
image: falkordb/falkordb:latest
image: falkordb/falkordb:v4.4.1
ports:
- 6379:6379

Expand All @@ -34,9 +34,20 @@ jobs:
npm install
npm run build
NEXTAUTH_SECRET=SECRET npm start & npx playwright test --reporter=dot,list
- name: Ensure required directories exist
run: |
mkdir -p playwright-report
mkdir -p playwright-report/artifacts
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
- name: Upload failed test screenshots
if: always()
uses: actions/upload-artifact@v4
with:
name: failed-test-screenshots
path: playwright-report/artifacts/
retention-days: 30
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18-alpine AS base
FROM node:22-alpine AS base

# Install dependencies only when needed
FROM base AS deps
Expand Down Expand Up @@ -68,4 +68,4 @@ ENV HOSTNAME "0.0.0.0"

# server.js is created by next build from the standalone output
# https://nextjs.org/docs/pages/api-reference/next-config-js/output
CMD ["node", "server.js"]
CMD ["node", "server.js"]
2 changes: 1 addition & 1 deletion components/ui/table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const Table = React.forwardRef<
HTMLTableElement,
TableProps
>(({ className, parentClassName, ...props }, ref) => (
<div className={cn("relative w-full overflow-auto", parentClassName)}>
<div className={cn("relative w-full overflow-auto", parentClassName)} id="tableContent">
<table
ref={ref}
className={cn("w-full caption-bottom text-sm", className)}
Expand Down
17 changes: 9 additions & 8 deletions e2e/config/settingsConfigData.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@
{ "input": "yes", "description": "valid input - yes value", "expected": true }
],
"roleModificationData": [
{"role": "MAX_QUEUED_QUERIES", "description": "modify maxQueuedQueries", "input": "20", "expected": true},
{"role": "TIMEOUT_MAX", "description": "modify maxTimeOut", "input": "25", "expected": true},
{"role": "TIMEOUT_DEFAULT", "description": "modify defaultTimeOut", "input": "10", "expected": true},
{"role": "RESULTSET_SIZE", "description": "modify resultSetSize", "input": "20", "expected": true},
{"role": "QUERY_MEM_CAPACITY", "description": "modify queryMemCapacity", "input": "20", "expected": true},
{"role": "VKEY_MAX_ENTITY_COUNT", "description": "modify vKeyMaxEntityCount", "input": "20", "expected": true},
{"role": "CMD_INFO", "description": "modify cmdInfo", "input": "yes", "expected": true},
{"role": "MAX_INFO_QUERIES", "description": "modify maxInfoQueries", "input": "20", "expected": true}
{"role": "MAX_QUEUED_QUERIES", "description": "modify maxQueuedQueries", "input": "24", "expected": true},
{"role": "TIMEOUT", "description": "modify timeOut", "input": "1001", "expected": true},
{"role": "TIMEOUT_MAX", "description": "modify maxTimeOut", "input": "1", "expected": true},
{"role": "TIMEOUT_DEFAULT", "description": "modify defaultTimeOut", "input": "1", "expected": true},
{"role": "RESULTSET_SIZE", "description": "modify resultSetSize", "input": "10001", "expected": true},
{"role": "QUERY_MEM_CAPACITY", "description": "modify queryMemCapacity", "input": "1", "expected": true},
{"role": "VKEY_MAX_ENTITY_COUNT", "description": "modify vKeyMaxEntityCount", "input": "100001", "expected": true},
{"role": "CMD_INFO", "description": "modify cmdInfo", "input": "no", "expected": true},
{"role": "MAX_INFO_QUERIES", "description": "modify maxInfoQueries", "input": "999", "expected": true}
]
}

15 changes: 15 additions & 0 deletions e2e/logic/POM/settingsConfigPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ export default class SettingsConfigPage extends BasePage {
return (role: string) => this.page.locator(`//tbody//tr[@data-id='${role}']/td[3]/div/div/button[1]`)
}

private get toastCloseBtn(): Locator {
return this.page.locator("//li[@role='status']/button");
}

private get tableContent(): Locator {
return this.page.locator("//div[@id='tableContent']");
}

async modifyRoleValue(role: string, input: string): Promise<string | null> {
await this.roleContentValue(role).hover();
await this.EditRoleButton(role).click();
Expand All @@ -33,4 +41,11 @@ export default class SettingsConfigPage extends BasePage {
return value
}

async clickOnToastCloseBtn(): Promise<void>{
await this.toastCloseBtn.click();
}

async scrollToBottomInTable(): Promise<void> {
await this.tableContent.evaluate((el) => el.scrollTo(0, el.scrollHeight));
}
}
1 change: 1 addition & 0 deletions e2e/logic/api/apiCalls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export default class ApiCalls {
async getSettingsRoleValue(roleName: string, data?: any): Promise<GetSettingsRoleValue> {
const result = await getRequest(urls.api.settingsConfig + roleName, data)
const jsonData = await result.json();
console.log("api calls res:", jsonData, " role: ", roleName);
return jsonData
}

Expand Down
2 changes: 2 additions & 0 deletions e2e/tests/auth.setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ setup("admin authentication", async () => {
try {
const browserWrapper = new BrowserWrapper();
const loginPage = await browserWrapper.createNewPage(LoginPage, urls.loginUrl);
await browserWrapper.setPageToFullScreen();
await loginPage.clickOnConnect();
await loginPage.dismissDialogAtStart();
const context = browserWrapper.getContext();
Expand All @@ -37,6 +38,7 @@ userRoles.forEach(({ name, file, userName }) => {
try {
const browserWrapper = new BrowserWrapper();
const loginPage = await browserWrapper.createNewPage(LoginPage, urls.loginUrl);
await browserWrapper.setPageToFullScreen();
await loginPage.connectWithCredentials(userName, user.password);
await loginPage.dismissDialogAtStart();
const context = browserWrapper.getContext();
Expand Down
Loading

0 comments on commit c416fe3

Please sign in to comment.