Skip to content

Commit 1bdc5da

Browse files
authored
Add new info to the automation qa sliders (#254)
* Add new info to the automation qa sliders * Video links added
1 parent 7004fc3 commit 1bdc5da

6 files changed

Lines changed: 89 additions & 22 deletions

File tree

slides/automation-qa/capybara.markdown

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ DSL extensions for testing web-based UIs
1010
- CSS classes
1111
- Javascript calls
1212

13+
Link to course [video](https://drive.google.com/file/d/1Vu_wQGHRt2zvJIrf-2ZfnMR8sOWyk2PX/view?usp=sharing)
14+
1315
---
1416

1517
# Why Capybara Gem?
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
layout: slide
3+
title: Course videos
4+
---
5+
6+
[Lecture 1](https://drive.google.com/file/d/1o0VbIrVPjhlHYg0jvLQXKXzY87GxzRDV/view?usp=sharing)
7+
8+
[Lecture 2](https://drive.google.com/file/d/1ZwRju6syDDfcxx4m8YBBGyi-aExkJgQs/view?usp=sharing)
9+
10+
[Lecture 3](https://drive.google.com/file/d/1vnGkfeGMWVhZ3Kf8davCwpt5loSz-AUc/view?usp=sharing)
11+
12+
[Lecture 4](https://drive.google.com/file/d/1Vu_wQGHRt2zvJIrf-2ZfnMR8sOWyk2PX/view?usp=sharing)

slides/automation-qa/index.markdown

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,7 @@ title: QA Automation
4949
- [CircleCI](../circleci)
5050
<br>
5151
<small>CircleCI is Continuous Integration, for testing apps, which is fast, functional and flexible. </small>
52+
53+
- [Link to course videos](course-videos)
54+
<br>
55+
<small>Course videos</small>

slides/automation-qa/preprogramming-course.markdown

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ title: Pre Programming Course
120120

121121
- Interaction with elements
122122

123+
Link to course [video](https://drive.google.com/file/d/1o0VbIrVPjhlHYg0jvLQXKXzY87GxzRDV/view?usp=sharing)
124+
123125
---
124126

125127
# Git
@@ -166,6 +168,8 @@ title: Pre Programming Course
166168

167169
- Best practices for [commits](https://www.git-tower.com/learn/git/ebook/en/command-line/appendix/best-practices), [pull request](https://github.community/t5/Support-Protips/Best-practices-for-pull-requests/ba-p/4104), [branches](https://nvie.com/posts/a-successful-git-branching-model/), [etc](https://git-scm.com/book/ru/v2)
168170

171+
Link to course [video](https://drive.google.com/file/d/1ZwRju6syDDfcxx4m8YBBGyi-aExkJgQs/view?usp=sharing)
172+
169173
---
170174

171175
# Database

slides/automation-qa/rails-structure.markdown

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,18 @@ title: Rails
4343

4444
--
4545

46-
## Setup Ruby 2.6.5 via RVM
46+
## Setup Ruby 2.7.2 via RVM
4747

48-
Install a version of Ruby (eg 2.6.5)
48+
Install a version of Ruby (eg 2.7.2)
4949

5050
```bash
51-
$ rvm install 2.6.5
51+
$ rvm install 2.7.2
5252
```
5353

54-
Make Ruby 2.6.5 default
54+
Make Ruby 2.7.2 default
5555

5656
```bash
57-
$ rvm --default use 2.6.5
57+
$ rvm --default use 2.7.2
5858
```
5959

6060
Show list of all installed Ruby version on your machine
@@ -171,23 +171,9 @@ $ nvm list
171171
## Clone the repository
172172

173173
```bash
174-
$ git clone https://github.com/WoLkErSs/training_store
174+
$ git clone https://github.com/dobrinindima/Bookstore.git
175175

176-
$ cd training_store
177-
```
178-
179-
### Add secrets after clone
180-
181-
To run this application in the future we need create the file `.sekrets.key` which contains the key.
182-
183-
```bash
184-
$ echo "c9ca193febdae77d0d7317715bdd167e" >> .sekrets.key
185-
```
186-
187-
Run Rake task which will decrypt **.sekrets.key**
188-
189-
```bash
190-
$ rake sekrets:decrypt\[development\]
176+
$ cd Bookstore
191177
```
192178

193179
---
@@ -431,7 +417,7 @@ You can use the `ruby` keyword in your app’s Gemfile to specify a specific ver
431417
Gemfile <!-- .element class="filename" -->
432418
433419
```ruby
434-
ruby '2.6.5'
420+
ruby '2.7.2'
435421
```
436422
437423
--

slides/automation-qa/rspec.markdown

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ title: RSpec
1111

1212
RSpec is a unit test framework for the Ruby programming language. Tests written in RSpec focus on the "behavior" of an application being tested. RSpec does not put emphasis on, how the application works but instead on how it behaves, in other words, what the application actually does.
1313

14+
Link to course [video](https://drive.google.com/file/d/1vnGkfeGMWVhZ3Kf8davCwpt5loSz-AUc/view?usp=sharing)
15+
1416
---
1517

1618
# RSpec Test Types
@@ -1198,6 +1200,63 @@ describe "something", type: :feature do
11981200
end
11991201
```
12001202

1203+
--
1204+
1205+
### If your tests are time dependent you can use travel_to
1206+
Add the following to the `spec_helper.rb` file
1207+
1208+
```ruby
1209+
RSpec.configure do |config|
1210+
config.include ActiveSupport::Testing::TimeHelpers
1211+
end
1212+
```
1213+
1214+
Then in the test you can use
1215+
1216+
```ruby
1217+
before(:all) do
1218+
ENV['TZ'] = 'UTC'
1219+
travel_to Time.zone.local(2021, 03, 18, 12, 00, 00)
1220+
end
1221+
```
1222+
1223+
For more practices go
1224+
[here](http://lucasnogueira.me/en/How-to-time-travel-safely-but-only-on-your-tests)
1225+
1226+
--
1227+
1228+
### If you need to find a specific row in a table or something similar
1229+
You can create a method on the page object like the example below
1230+
1231+
```ruby
1232+
def get_needed_data_with_index(index)
1233+
within(:xpath, "//table/tbody/tr[#{index}]") do
1234+
block_given? ? yield : raise('data not provided')
1235+
end
1236+
end
1237+
```
1238+
1239+
Where `index` it's needed line in the table. `xpath` needs to be changed according to your DOM
1240+
1241+
--
1242+
1243+
### If you need to sort list of elements
1244+
```ruby
1245+
it 'sorts by ...' do
1246+
expect(page.element_ids.map(&:text)).to eq([element3, element2, element1].map(&:id).map(&:to_s))
1247+
1248+
page.sort_list_by(name: 'Name')
1249+
1250+
expect(page.element_ids.map(&:text)).to eq([element1, element2, element3].map(&:id).map(&:to_s))
1251+
end
1252+
```
1253+
`element_ids` this is elements in your page object
1254+
```ruby
1255+
elements :element_ids, 'some css'
1256+
```
1257+
1258+
--
1259+
12011260
---
12021261

12031262
# The End

0 commit comments

Comments
 (0)