[QA] Fix resource API fabrication documentation
The precedence of methods to fetch a product's attribute value was changed recently: 1. API response 2. Web UI block 3. Inheritance from the factory 4. Raise a `QA::Factory::Product::NoValueError` error otherwise
This commit is contained in:
parent
0621c8ba8c
commit
280a4b95c0
|
@ -254,8 +254,7 @@ module QA
|
||||||
project.name = 'project-to-create-a-shirt'
|
project.name = 'project-to-create-a-shirt'
|
||||||
end
|
end
|
||||||
|
|
||||||
# Attribute inherited from the Shirt factory if present,
|
# Attribute from the Browser UI (using the block)
|
||||||
# or from the Browser UI otherwise (using the block)
|
|
||||||
product :brand do
|
product :brand do
|
||||||
Page::Shirt::Show.perform do |shirt_show|
|
Page::Shirt::Show.perform do |shirt_show|
|
||||||
shirt_show.fetch_brand_from_page
|
shirt_show.fetch_brand_from_page
|
||||||
|
@ -347,8 +346,7 @@ module QA
|
||||||
project.name = 'project-to-create-a-shirt'
|
project.name = 'project-to-create-a-shirt'
|
||||||
end
|
end
|
||||||
|
|
||||||
# Attribute fetched from the API response if present if present,
|
# Attribute fetched from the API response if present,
|
||||||
# or from the Shirt factory if present,
|
|
||||||
# or from the Browser UI otherwise (using the block)
|
# or from the Browser UI otherwise (using the block)
|
||||||
product :brand do
|
product :brand do
|
||||||
Page::Shirt::Show.perform do |shirt_show|
|
Page::Shirt::Show.perform do |shirt_show|
|
||||||
|
@ -356,7 +354,7 @@ module QA
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Attribute fetched from the API response if present if present,
|
# Attribute fetched from the API response if present,
|
||||||
# or from the Shirt factory if present,
|
# or from the Shirt factory if present,
|
||||||
# or a QA::Factory::Product::NoValueError is raised otherwise
|
# or a QA::Factory::Product::NoValueError is raised otherwise
|
||||||
product :name
|
product :name
|
||||||
|
@ -414,9 +412,9 @@ end
|
||||||
**Notes on attributes precedence:**
|
**Notes on attributes precedence:**
|
||||||
|
|
||||||
- attributes from the API response take precedence over attributes from the
|
- attributes from the API response take precedence over attributes from the
|
||||||
|
Browser UI
|
||||||
|
- attributes from the Browser UI take precedence over attributes from the
|
||||||
factory (i.e inherited)
|
factory (i.e inherited)
|
||||||
- attributes from the factory (i.e inherited) take precedence over attributes
|
|
||||||
from the Browser UI
|
|
||||||
- attributes without a value will raise a `QA::Factory::Product::NoValueError` error
|
- attributes without a value will raise a `QA::Factory::Product::NoValueError` error
|
||||||
|
|
||||||
## Creating resources in your tests
|
## Creating resources in your tests
|
||||||
|
|
Loading…
Reference in New Issue