Skip to content

Commit

Permalink
cleaning, and preparing for DEMO
Browse files Browse the repository at this point in the history
  • Loading branch information
MalgorzataDzienia committed Jul 12, 2024
1 parent 2c0c3bb commit fc8ef82
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions mrchecker-playwright-framework/NAMING_CONVENTIONS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
## Locators naming conventions
1. Every locator should start with prefix: locator
2. Every locator/selector should have suffix which indicate what kind of element it is:
- Button
- Input
- Link
- Label
- Dropdown
- Checkbox
- Image
- Icon
- Tab
- Table
- etc...


Example:
` locatorSearchButton, locatorWarningIcon



## Methods naming conventions:
Methods start with prefix
- clickOn - for clicking on elements, submiting
- fill - for filling input elements
- check - for asserting, ex. checkVisible, checkEnabled, checkSelected
- select - for selecting dropdown elements
- get - for getting the value of element
- is - for getting the boolean information about element, ex. isVisible, isEnabled, isSelected

Methods should have suffix which indicates the type of element - the same as locators, example: clickOnSubmitButton, fillNameInput


## Page object conventions:
1. locators should be initialized in initLocators method
2. page should be initializes with PlaywrightFactory.getPage()


## Test conventions:
1. Test should inherit from BaseTest class
2. Test data should be put as a class variable in TestCases class
3. Test should use page object methods to interact with the page

0 comments on commit fc8ef82

Please sign in to comment.