Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1411,8 +1411,8 @@ jobs:
yarn add -D nyc
yarn add -D react-app-rewired
yarn add -D create-react-app
yarn add -D @playwright/test
yarn init -y
yarn add --dev @playwright/test
echo "yarn install"
yarn install

Expand All @@ -1434,6 +1434,8 @@ jobs:
run: |
echo "Run tests under playwright folder only"
cd $GITHUB_WORKSPACE/portal-ui
yarn remove playwright
yarn add --dev @playwright/test
echo "npx playwright test"
npx playwright test # To run the tests
echo "npx nyc report"
Expand Down
7 changes: 5 additions & 2 deletions portal-ui/e2e/buckets.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,20 @@ test.use({ storageState: minioadminFile });

test.beforeEach(async ({ page }) => {
await page.goto(BUCKET_LIST_PAGE);
await page.waitForTimeout(1000);
});

test("create a new bucket", async ({ page }) => {
await page.getByRole("link", { name: "Buckets Buckets" }).click();
await page.getByRole("button", { name: "Buckets" }).click();
await page.getByRole("button", { name: "Create Bucket" }).click();
await page.getByLabel("Bucket Name*").click();

const bucketName = `new-bucket-${generateUUID()}`;

await page.getByLabel("Bucket Name*").fill(bucketName);
await page.getByRole("button", { name: "Create Bucket" }).click();
await page.getByPlaceholder("Search Buckets").fill(bucketName);

await expect(page.locator(`#manageBucket-${bucketName}`)).toBeTruthy();
const bucketLocatorEl = `#manageBucket-${bucketName}`;
await page.locator(bucketLocatorEl).click();
Expand All @@ -44,7 +47,7 @@ test("create a new bucket", async ({ page }) => {
});

test("invalid bucket name", async ({ page }) => {
await page.getByRole("link", { name: "Buckets Buckets" }).click();
await page.getByRole("button", { name: "Buckets" }).click();
await page.getByRole("button", { name: "Create Bucket" }).click();
await page.getByLabel("Bucket Name*").click();
await page.getByLabel("Bucket Name*").fill("invalid name");
Expand Down
4 changes: 2 additions & 2 deletions portal-ui/e2e/groups.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ test.beforeEach(async ({ page }) => {
});

test("Add a new group", async ({ page }) => {
await page.getByRole("button", { name: "Identity Identity" }).click();
await page.getByRole("link", { name: "Groups Groups" }).click();
await page.getByRole("button", { name: "Identity" }).click();
await page.getByRole("button", { name: "Groups" }).click();
await page.getByRole("button", { name: "Create Group" }).click();

const groupName = `new-group-${generateUUID()}`;
Expand Down
2 changes: 1 addition & 1 deletion portal-ui/e2e/policies.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ test.beforeEach(async ({ page }) => {
});

test("Can create a policy", async ({ page }) => {
await page.getByRole("link", { name: "Policies" }).click();
await page.getByRole("button", { name: "Policies" }).click();
await page.getByRole("button", { name: "Create Policy" }).click();
await page.getByLabel("Policy Name").click();

Expand Down
3 changes: 1 addition & 2 deletions portal-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
},
"proxy": "http://localhost:9090/",
"devDependencies": {
"@playwright/test": "^1.34.3",
"@playwright/test": "^1.35.0",
"@types/lodash": "^4.14.195",
"@types/luxon": "^3.3.0",
"@types/minio": "^7.1.0",
Expand All @@ -88,7 +88,6 @@
"customize-cra": "^1.0.0",
"minio": "^7.1.1",
"nyc": "^15.1.0",
"playwright": "^1.34.3",
"prettier": "2.8.8",
"react-app-rewire-hot-loader": "^2.0.1",
"react-app-rewired": "^2.2.1",
Expand Down
2 changes: 1 addition & 1 deletion portal-ui/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default defineConfig({
/* Retry on CI only */
retries: process.env.CI ? 2 : 0,
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
workers: process.env.CI ? 3 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: "html",
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
Expand Down
4 changes: 3 additions & 1 deletion portal-ui/playwright/jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,12 @@ jobs:
echo "Install dependencies"
cd $GITHUB_WORKSPACE/portal-ui
yarn add -D playwright
yarn add -D @playwright/test
yarn add -D babel-plugin-istanbul
yarn add -D nyc
yarn add -D react-app-rewired
yarn add -D create-react-app
yarn init -y
yarn add --dev @playwright/test
echo "yarn install"
yarn install

Expand All @@ -207,6 +207,8 @@ jobs:
run: |
echo "Run tests under playwright folder only"
cd $GITHUB_WORKSPACE/portal-ui
yarn remove playwright
yarn add --dev @playwright/test
echo "npx playwright test"
npx playwright test # To run the tests
echo "npx nyc report"
Expand Down
9 changes: 1 addition & 8 deletions portal-ui/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1981,7 +1981,7 @@
"@nodelib/fs.scandir" "2.1.5"
fastq "^1.6.0"

"@playwright/test@^1.34.3":
"@playwright/test@^1.35.0":
version "1.35.0"
resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.35.0.tgz#532603399a0dd46731fbc31a0df5ce357dafa486"
integrity sha512-6qXdd5edCBynOwsz1YcNfgX8tNWeuS9fxy5o59D0rvHXxRtjXRebB4gE4vFVfEMXl/z8zTnAzfOs7aQDEs8G4Q==
Expand Down Expand Up @@ -9233,13 +9233,6 @@ [email protected]:
resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.35.0.tgz#b7871b742b4a5c8714b7fa2f570c280a061cb414"
integrity sha512-muMXyPmIx/2DPrCHOD1H1ePT01o7OdKxKj2ebmCAYvqhUy+Y1bpal7B0rdoxros7YrXI294JT/DWw2LqyiqTPA==

playwright@^1.34.3:
version "1.35.0"
resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.35.0.tgz#4e3b3ea2495d6fd671700f77b2f97b3adedf80f1"
integrity sha512-xhFhsoBmKPQfj3dM+HbIiFVlqRCZp2rwdJd/QFd9YBuidabo3TkVv0iuxPQ4vZoMwtSI7qzjY93f5ohdC97hww==
dependencies:
playwright-core "1.35.0"

pngjs@^3.3.1:
version "3.4.0"
resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-3.4.0.tgz#99ca7d725965fb655814eaf65f38f12bbdbf555f"
Expand Down