From 502ee18758ac985dabffe8878e82b16e2a23c70d Mon Sep 17 00:00:00 2001 From: Malgorzata Dzienia <39510143+MalgorzataDzienia@users.noreply.github.com> Date: Fri, 12 Jul 2024 08:00:38 +0200 Subject: [PATCH] Fix/cleaning (#430) * github actions, playwriht version update * fix on working directory in github actions * fix * video off * Monkey Tests introduces * fix on Allure story * cleaning, and preparing for DEMO --- .../NAMING_CONVENTIONS.md | 42 +++++++++++++++++++ .../resources/demo}/playwrightRecoding.txt | 0 2 files changed, 42 insertions(+) create mode 100644 mrchecker-playwright-framework/NAMING_CONVENTIONS.md rename {mrchecker-playwright-framework-empty => mrchecker-playwright-framework/src/test/resources/demo}/playwrightRecoding.txt (100%) diff --git a/mrchecker-playwright-framework/NAMING_CONVENTIONS.md b/mrchecker-playwright-framework/NAMING_CONVENTIONS.md new file mode 100644 index 00000000..0005bbed --- /dev/null +++ b/mrchecker-playwright-framework/NAMING_CONVENTIONS.md @@ -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 \ No newline at end of file diff --git a/mrchecker-playwright-framework-empty/playwrightRecoding.txt b/mrchecker-playwright-framework/src/test/resources/demo/playwrightRecoding.txt similarity index 100% rename from mrchecker-playwright-framework-empty/playwrightRecoding.txt rename to mrchecker-playwright-framework/src/test/resources/demo/playwrightRecoding.txt