Skip to content

Instantly share code, notes, and snippets.

View IsmagilovQA's full-sized avatar

Vitaliy IsmagilovQA

  • Brightgrove LTD
  • Kharkiv, Ukraine
View GitHub Profile
@IsmagilovQA
IsmagilovQA / SystemSetupExtension
Last active January 5, 2022 14:54 — forked from Legionivo/SystemSetupExtension
Custom Extension which executes code only once before all tests are started and after all tests finished
/**
* Custom Extension which executes code only once before all tests are started and after all tests finished.
* This is temporary solution until https://github.com/junit-team/junit5/issues/456 will not be released
*/
public class SystemSetupExtension implements BeforeAllCallback, ExtensionContext.Store.CloseableResource {
private static boolean systemReady = false;
/**
@IsmagilovQA
IsmagilovQA / gist:311ad0d31c6832e9d247acba44926833
Last active January 5, 2022 14:55
Selenide | Custom condition: ElementWithinViewportCondition
https://gist.github.com/BorisOsipov/16a1ac309f0f9acd9ee34ac50fc0b45f
@ParametersAreNonnullByDefault
public class ElementWithinViewportCondition extends Condition {
public ElementWithinViewportCondition() {
super("visible");
}
@IsmagilovQA
IsmagilovQA / gist:ee59a5bd61f7cadfe3efe1a03dda6d73
Created January 5, 2022 14:44
Installing Jenkins in docker on digitalOcean (Pirogov example)
- Select servlet with docker -> get ip of virtual machine
- ssh root@[ip of virtual machine]
- docker run -p 8080:8080 -v /var/run/docker.sock:/var/run/docker.sock -v jenkins-data:/var/jenkins_home jenkinsci/blueocean
@IsmagilovQA
IsmagilovQA / gist:3776b4da1c6dcc638065b69537cd1d32
Last active January 5, 2022 14:57
Digital Ocean settings
- ssh root@ip
- vel - public key
- docker ps -> make sure no running images
- git clone url of app from GitHub
- cd microservices-demo
- cd deploy
- cd docker-compose (where we have docker-compose.yml)
- docker-compose up -d
@IsmagilovQA
IsmagilovQA / gist:feebe283dbfc0bd97dfde2d47760cb89
Created January 5, 2022 14:46
[IntelliJ IDEA hotkeys on macOS]
- Double shift -> open search panel;
- Command + 1 -> open/close left navigation bar
- Command + N -> `New` (in navigation bar) / `Generate` (in main window)
- Command + D -> Duplicate the code row
- Option + Command + V -> extract variable (every part of line can be extracted). Option 1
- .var - at the end of line to declare variable (postfix completion). Option 2
- Control + Space -> completion (Control + Space x 2 -> suggest variants in case no imports)
- Control + Shift + Space -> smart completion (only available options for current type)
- Option + Enter -> resolving the problem (e.g. add imports automatically, optimise imports, run test)
- Control + Option + O -> optimise imports
Basics
Searching is based on Tags and Attributes.
Instructions:
/ -> absolute xpath, start searching from the root node
// -> relative xpath, starts from the node of your choice
//* -> we can put * if we don’t want to specify tag name (means ANY tag)
[@attributeName] -> @ means attribute in [ ]
‘Value’ -> all values we should put inside ‘ ‘
COURSE [CSS Selectors]
Searching is based on Tags and Attributes.
Tags: div, input, a, ul, li
Attributes: id, class, name, type
Special annotations (shortcuts):
for id -> #idName
For class -> .className
COURSE [GIT]
https://ru.hexlet.io/courses/intro_to_git
Основы Git
git --version - посмотреть установленную версию
brew install git - установить гит
echo "export LANG=en_US.UTF-8" >> ~/.bashrc потом source ~/.bashrc - изменяет язык гита в консоли
git config --global user.name "Vitaliy Ismagilov" - установить имя
git config --global user.email "[email protected]" - установить почту
(интерпретатор - оболочка -> bash for Unix systems)
( use this link: https://appleinsider.ru/tips-tricks/mac-os-x-nachinayushhim-o-rabote-v-terminale.html)
Интерпретатор zsh по сути улучшенный bash.
В заголовке терминала отображен текущий каталог
ls посмотреть содержимое текущего каталога (LIST)
ls -ltr посмотреть с датой и правами (нижний в списке будет последним добавленным/измененным)
COURSE [Chrome Dev Tools]
Arsbatyrov.ru/chrome/main ->
https://playground.learnqa.ru/chrome/#
Открыть dev tools -> Command+Option+i
Вкладка Elements
Теги
< tag>