{"action":"opened","issue":{"url":"https://api.github.com/repos/maxgalbu/nightwatch-custom-commands-assertions/issues/21","repository_url":"https://api.github.com/repos/maxgalbu/nightwatch-custom-commands-assertions","labels_url":"https://api.github.com/repos/maxgalbu/nightwatch-custom-commands-assertions/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/maxgalbu/nightwatch-custom-commands-assertions/issues/21/comments","events_url":"https://api.github.com/repos/maxgalbu/nightwatch-custom-commands-assertions/issues/21/events","html_url":"https://github.com/maxgalbu/nightwatch-custom-commands-assertions/issues/21","id":196990534,"number":21,"title":"FEATURE REQUEST: Allow Sharing of Page Sections","user":{"login":"GrayedFox","id":6493307,"avatar_url":"https://avatars.githubusercontent.com/u/6493307?v=3","gravatar_id":"","url":"https://api.github.com/users/GrayedFox","html_url":"https://github.com/GrayedFox","followers_url":"https://api.github.com/users/GrayedFox/followers","following_url":"https://api.github.com/users/GrayedFox/following{/other_user}","gists_url":"https://api.github.com/users/GrayedFox/gists{/gist_id}","starred_url":"https://api.github.com/users/GrayedFox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrayedFox/subscriptions","organizations_url":"https://api.github.com/users/GrayedFox/orgs","repos_url":"https://api.github.com/users/GrayedFox/repos","events_url":"https://api.github.com/users/GrayedFox/events{/privacy}","received_events_url":"https://api.github.com/users/GrayedFox/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-21T17:35:04Z","updated_at":"2016-12-21T17:35:04Z","closed_at":null,"body":"Hi there,\r\n\r\nUsing the example provided in the docs I am trying to share a nested \"section\" inside of some other sections, which seems to work for elements but not for sections which contain elements.\r\n\r\nI suppose this is more of a feature request, since it isn't explicitly explained in the docs but I was hoping I could share sections the same way one shares elements.\r\n\r\nExample:\r\n```\r\n//myPageObject.js\r\nconst sharedSections = {\r\n  details: {\r\n    selector: '.text-info',\r\n    elements: {\r\n      title: 'h2',\r\n      ourCars: '.car-examples',\r\n      capacity: '.capacity'\r\n    }\r\n  },\r\n  priceBox: {\r\n    selector: '.price-box',\r\n    elements: {\r\n      total: '.price',\r\n      price: '.base_price',\r\n      meetAndGreet: '.airport_fee',\r\n      select: '.btn-continue'\r\n    }\r\n  }\r\n}\r\n\r\nconst sharedElements = {\r\n  image: '.car-image img'\r\n}\r\n\r\nmodule.exports = {\r\n  sections: {\r\n    carClass: {\r\n      commands: [sharedCommands],\r\n      selector: '[ng-controller=\"VehicleSelectController\"]',\r\n      sections: {\r\n        business: {\r\n          selector: '#vehicle-class-business',\r\n          elements: [sharedElements],\r\n          sections: [sharedSections]\r\n        },\r\n        businessVan: {\r\n          selector: '#vehicle-class-van',\r\n          elements: [sharedElements],\r\n          sections: [sharedSections]\r\n        },\r\n        firstClass: {\r\n          selector: '#vehicle-class-first',\r\n          elements: [sharedElements],\r\n          sections: [sharedSections]\r\n        }\r\n      }\r\n    }\r\n  }\r\n}\r\n```"}}
{"actor":{"display_login":"GrayedFox"}}