Specced supplier main board jumber
This commit is contained in:
@@ -5,6 +5,7 @@ Qsupplier.App.Router.reopen
|
|||||||
rootURL: '/supplier'
|
rootURL: '/supplier'
|
||||||
|
|
||||||
Qsupplier.App.Router.map ->
|
Qsupplier.App.Router.map ->
|
||||||
|
@route '/', queryParams: ['section_id']
|
||||||
@resource 'sections', ->
|
@resource 'sections', ->
|
||||||
@resource 'section', path: ':section_id'
|
@resource 'section', path: ':section_id'
|
||||||
#@resource 'lists', queryParams: ['state']
|
#@resource 'lists', queryParams: ['state']
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
Qsupplier.App.HomeSectionJumperView = Ember.View.extend
|
Qsupplier.App.HomeSectionJumperView = Ember.View.extend
|
||||||
tagName: 'a'
|
tagName: 'a'
|
||||||
|
classNames: ['main-board-section-jumper']
|
||||||
attributeBindings: ['href']
|
attributeBindings: ['href']
|
||||||
href: (-> Routes.suppliers_section_path(@get('controller.active_section_id') || 'nothing')).property('controller.active_section_id')
|
#href: (-> Routes.suppliers_section_path(@get('controller.active_section_id') || 'nothing')).property('controller.active_section_id')
|
||||||
|
href: '#'
|
||||||
isVisible: (-> !!@get('controller.active_section_id') ).property('controller.active_section_id')
|
isVisible: (-> !!@get('controller.active_section_id') ).property('controller.active_section_id')
|
||||||
template: Ember.Handlebars.compile('=>')
|
template: Ember.Handlebars.compile('=>')
|
||||||
|
click: (e)->
|
||||||
|
e.preventDefault()
|
||||||
|
@get('controller').transitionToRoute 'section', @get('controller.active_section_id')
|
||||||
|
|||||||
@@ -59,3 +59,13 @@ Feature: Supplier main board
|
|||||||
When I reset the section selector in the supplier dashboard
|
When I reset the section selector in the supplier dashboard
|
||||||
Then I should see the list and the new list
|
Then I should see the list and the new list
|
||||||
And I should see the order and the new order
|
And I should see the order and the new order
|
||||||
|
|
||||||
|
@javascript
|
||||||
|
Scenario: Selecting a specific section and jumping towards section view
|
||||||
|
Given there is an active list and order
|
||||||
|
And I am signed in as supplier
|
||||||
|
Then I should not see the supplier main board section jumper
|
||||||
|
When I select the section in the supplier dashboard
|
||||||
|
And I click on the section main board section jumper
|
||||||
|
Then I should be redirected to the supplier section view
|
||||||
|
|
||||||
|
|||||||
@@ -114,6 +114,15 @@ end
|
|||||||
step "I select the new section in the supplier dashboard" do
|
step "I select the new section in the supplier dashboard" do
|
||||||
find(%|.section_selector option[value="#{@new_section.id}"]|).select_option
|
find(%|.section_selector option[value="#{@new_section.id}"]|).select_option
|
||||||
end
|
end
|
||||||
|
|
||||||
step "I reset the section selector in the supplier dashboard" do
|
step "I reset the section selector in the supplier dashboard" do
|
||||||
find(%|.section_selector option[value=""]|).select_option
|
find(%|.section_selector option[value=""]|).select_option
|
||||||
end
|
end
|
||||||
|
|
||||||
|
step "I should not see the supplier main board section jumper" do
|
||||||
|
page.should_not have_selector '.main-board-section-jumper'
|
||||||
|
end
|
||||||
|
|
||||||
|
step "I click on the section main board section jumper" do
|
||||||
|
find('.main-board-section-jumper').click
|
||||||
|
end
|
||||||
|
|||||||
@@ -64,3 +64,9 @@ step "the section table should not have any active list markings anymore" do
|
|||||||
css_class.should_not include 'active_order'
|
css_class.should_not include 'active_order'
|
||||||
css_class.should_not include 'needs_payment'
|
css_class.should_not include 'needs_payment'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
step "I should be redirected to the supplier section view" do
|
||||||
|
sleep 1
|
||||||
|
#page.current_path.should == "/supplier/sections/#{@section.id}"
|
||||||
|
page.evaluate_script('window.location.pathname').should == "/supplier/sections/#{@section.id}"
|
||||||
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user