Initialise BPE page with 'Available On' column hidden

This commit is contained in:
Rob H
2014-01-10 00:46:42 +08:00
parent ee2da3e008
commit 29ba0ccc97
2 changed files with 11 additions and 4 deletions

View File

@@ -127,7 +127,7 @@ productsApp.controller "AdminBulkProductsCtrl", [
unit: {name: "Unit", visible: true}
price: {name: "Price", visible: true}
on_hand: {name: "On Hand", visible: true}
available_on: {name: "Available On", visible: true}
available_on: {name: "Available On", visible: false}
$scope.variant_unit_options = [
["Weight (g)", "weight_1"],

View File

@@ -240,6 +240,9 @@ feature %q{
login_to_admin_section
visit '/admin/products/bulk_edit'
first("div.option_tab_titles h6", :text => "Toggle Columns").click
first("li.column-list-item", text: "Available On").click
page.should have_field "product_name", with: p.name
page.should have_select "supplier", selected: s1.name
@@ -580,6 +583,9 @@ feature %q{
login_to_admin_section
visit '/admin/products/bulk_edit'
first("div.option_tab_titles h6", :text => "Toggle Columns").click
first("li.column-list-item", text: "Available On").click
page.should have_selector "th", :text => "NAME"
page.should have_selector "th", :text => "SUPPLIER"
@@ -589,10 +595,8 @@ feature %q{
page.should have_selector "div.option_tab_titles h6", :text => "Toggle Columns"
first("div.option_tab_titles h6", :text => "Toggle Columns").click
page.should have_selector "div ul.column-list li.column-list-item", text: "Supplier"
all("div ul.column-list li.column-list-item").select{ |e| e.text == "Supplier" }.first.click
first("li.column-list-item", text: "Supplier").click
page.should_not have_selector "th", :text => "SUPPLIER"
page.should have_selector "th", :text => "NAME"
@@ -789,6 +793,9 @@ feature %q{
p = product_supplied
visit '/admin/products/bulk_edit'
first("div.option_tab_titles h6", :text => "Toggle Columns").click
first("li.column-list-item", text: "Available On").click
page.should have_field "product_name", with: p.name
page.should have_select "supplier", selected: s1.name