JoinColony / colonyDapp

Colony dApp client
49 stars 19 forks source link

E2E Test Adding and Removing a new Colony Admin #914

Closed rdig closed 4 years ago

rdig commented 5 years ago

As it says on the tin: write a cypress spec that tests changes made to Colony's admins.

Testing

It should cover:

Best practices

Please note that, as a best practice, prefer to add a new data-test attribute, to hook onto components, rather then relying on elements/class/ids selectors and filtering from there.

Example:

/*
 * Component (not the actual one, simplified)
 */
const AvatarDropdown = () => (
  <Popover ... >
    <button
      ...
      data-test="avatarDropdown"
    />
  </Popover>
);

/*
 * Test (not the actual one, simplified)
 */
it('Open the Claim Username flow', () => {
  ...
  cy.get('button[data-test="avatarDropdown"]').click();
  ...
});

See this example spec: https://github.com/JoinColony/colonyDapp/blob/master/cypress/integration/claim-username.js

Resources

A couple of resources to help you along you're journey:

rdig commented 4 years ago

Closing as E2E tests will have a different format now