Skip to content

Add test to list the tenants in Operator UI #1605

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 22, 2022
Merged

Add test to list the tenants in Operator UI #1605

merged 2 commits into from
Feb 22, 2022

Conversation

cniackz
Copy link
Collaborator

@cniackz cniackz commented Feb 18, 2022

Fixes https://github.com/miniohq/engineering/issues/514

Objective:

To add a test in Operator UI where we can list the different tenants.

The test is:

import { diagnosticsElement, supportElement } from "../utils/elements-menu";
import { Selector } from 'testcafe';


fixture("For user with default permissions").page("http://localhost:9090");

test("Create Tenant", async (t) => {

	const osCount = Selector(`#root > div > main > div[class] > div > div > div > div:nth-child(1) > div > div > div`).count;

	await t
		.navigateTo("http://localhost:9090/login")
		.typeText("#jwt","anyrandompasswordwillwork")
		.click("button.MuiButton-root")
		.click(Selector('button[tabindex="0"][type="button"]').withText('Create Tenant'))
		.typeText("#tenant-name","thufeb1754epm")
		.typeText("#namespace","default")
		.wait(2000)
		.click("button[tabindex=\"0\"]:nth-of-type(2)")
		.click(Selector('button[tabindex="0"][type="button"]').withText('Done'))
		.expect(osCount).eql(2);

});

Test result:

 Running tests in:
 - Chrome 98.0.4758.80 / Linux 0.0

 For user with default permissions
 ✓ Create Tenant

 For user with default permissions
 ✓ Login to Operator Web Page


 2 passed (10s)

How to test locally:

https://docs.google.com/document/d/1utbXYazQ_orLmY8LbQsx7InxIM9GN04wfPYuuDhLh9o/edit?usp=sharing

@cniackz cniackz self-assigned this Feb 18, 2022
@cniackz cniackz added the WIP This PR is WIP and cannot be merged yet label Feb 18, 2022
@cniackz cniackz changed the title Add test to list the tenants in Operator UI [WIP] - Add test to list the tenants in Operator UI Feb 18, 2022
@cniackz cniackz changed the title [WIP] - Add test to list the tenants in Operator UI Add test to list the tenants in Operator UI Feb 18, 2022
@cniackz cniackz removed the WIP This PR is WIP and cannot be merged yet label Feb 18, 2022
Copy link
Collaborator

@bexsoft bexsoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dvaldivia dvaldivia merged commit 844162a into minio:master Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants