Skip to content

new button driver, image driver, testing #2894

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 6 commits into from
Jan 16, 2024

Conversation

adids1221
Copy link
Contributor

Description

Button - create new driver and refactor tests to it

Changelog

Button - create new driver and refactor tests to it

Additional info

Comment on lines 20 to 30
const isLabelExist = () => {
return labelDriver.exists();
};

const getIconElement = () => {
return iconDriver.getElement();
};

const isIconExist = () => {
return iconDriver.exists();
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

The convention is to:

  const getLabel = () => {
    return labelDriver;
  };
...

Or in case you have a logic change:

  const getLabel = () => {
    const exists = (): boolean => {
      // New logic
    };

    return {...labelDriver, exists};
  };
...

@@ -0,0 +1,33 @@
import {ButtonProps} from './ButtonTypes';
Copy link
Collaborator

Choose a reason for hiding this comment

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

The props should be exported from the component IMO

Copy link
Collaborator

@M-i-k-e-l M-i-k-e-l Jan 16, 2024

Choose a reason for hiding this comment

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

Ethan commented on my PR that it should be from the types, not sure why it's named ButtonTypes and not types but it's not related to this PR

Comment on lines 17 to 23
const getLabel = () => {
const exists = (): boolean => {
return labelDriver.exists();
};

return {...labelDriver, exists};
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
const getLabel = () => {
const exists = (): boolean => {
return labelDriver.exists();
};
return {...labelDriver, exists};
};
const getLabel = () => {
return labelDriver;
};

@adids1221 adids1221 enabled auto-merge (squash) January 16, 2024 13:55
@adids1221 adids1221 merged commit 878a458 into master Jan 16, 2024
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