Skip to content
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

Isolating users test in Testcafe #2094

Merged
merged 3 commits into from Jun 7, 2022

Conversation

cniackz
Copy link
Collaborator

@cniackz cniackz commented Jun 6, 2022

Permissions Tests Part 1 is failing many times in the PRs. I am isolating this test to make it easier to debug, faster to run and more robust when running since no intervention from other test will intervine. Current failure is:

 For user with Users permissions
 ✓ Users sidebar item exists
 ✓ Create User button exists
 ✓ Create User button is clickable
 ✖ Create User Page to create a user
   1) AssertionError: expected false to be truthy
      Browser: Chrome 102.0.5005.61 / Linux 0.0
         62 |  const accessKeyInputExists =
      elements.usersAccessKeyInput.exists;
         63 |  const secretKeyInputExists =
      elements.usersSecretKeyInput.exists;
         64 |  await t
         65 |    .navigateTo(usersAddPageUrl)
         66 |    .expect(accessKeyInputExists)
       > 67 |    .ok()
         68 |    .expect(secretKeyInputExists)
         69 |    .ok()
         70 |    .typeText(elements.usersAccessKeyInput,
      constants.TEST_USER_NAME)
         71 |    .typeText(elements.usersSecretKeyInput,
      constants.TEST_PASSWORD)
         72 |    .click(elements.saveButton);
         at <anonymous>
   (/home/runner/work/console/console/portal-ui/tests/permissions-1/users.ts:67:6)
         at <anonymous>
   (/home/runner/work/console/console/portal-ui/tests/permissions-1/users.ts:23:71)
         at __awaiter
   (/home/runner/work/console/console/portal-ui/tests/permissions-1/users.ts:19:12)
         at <anonymous>
      (/home/runner/work/console/console/portal-ui/tests/permissions-1/users.ts:61:55)
 ✓ Users table exists
 ✓ Created User can be viewed and deleted
 1/34 failed (1m 45s)
child_process.js:674
    throw err;
    ^
Error: Command failed: xvfb-run --server-args="-screen 0 1280x720x24" npx testcafe "chrome:headless" portal-ui/tests/permissions-1/ --skip-js-errors -c 3
    at checkExecSyncError (child_process.js:635:11)
    at execSync (child_process.js:671:15)
    at Object.<anonymous> (/home/runner/work/_actions/DevExpress/testcafe-action/latest/index.js:64:1)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
    at internal/main/run_main_module.js:17:47 {
  status: 1,
  signal: null,
  output: [ null, null, null ],
  pid: 7720,
  stdout: null,
  stderr: null
}

Test results:

 For user with Users permissions
 ✓ Users sidebar item exists
 ✓ Create User button exists
 ✓ Create User button is clickable
 ✓ Create User Page to create a user
 ✓ Users table exists
 ✓ Created User can be viewed and deleted
 6 passed (21s)

Copy link
Member

@prakashsvmx prakashsvmx left a comment

Choose a reason for hiding this comment

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

👍

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

@bexsoft bexsoft merged commit 427a751 into minio:master Jun 7, 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.

None yet

5 participants