{"id":19773954,"url":"https://github.com/badoo/mobileautomationsampleproject","last_synced_at":"2025-04-30T18:32:34.079Z","repository":{"id":56528318,"uuid":"309345759","full_name":"badoo/MobileAutomationSampleProject","owner":"badoo","description":"A sample project to demonstrate best practices for a mobile automation using Cucumber framework","archived":false,"fork":false,"pushed_at":"2020-11-03T19:14:54.000Z","size":16,"stargazers_count":7,"open_issues_count":0,"forks_count":3,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-25T17:01:35.923Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/badoo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-02T11:11:59.000Z","updated_at":"2025-02-16T08:11:08.000Z","dependencies_parsed_at":"2022-08-15T20:20:53.282Z","dependency_job_id":null,"html_url":"https://github.com/badoo/MobileAutomationSampleProject","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badoo%2FMobileAutomationSampleProject","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badoo%2FMobileAutomationSampleProject/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badoo%2FMobileAutomationSampleProject/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badoo%2FMobileAutomationSampleProject/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/badoo","download_url":"https://codeload.github.com/badoo/MobileAutomationSampleProject/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251761302,"owners_count":21639586,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T05:11:37.219Z","updated_at":"2025-04-30T18:32:33.857Z","avatar_url":"https://github.com/badoo.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sample Project\n\nThe sample project demonstrates the best practices to reuse on mobile automation project on Ruby with Cucumber framework.\n\nYou can find each practice by keywords like: 'Good Practice' or 'Bad Practice'.\nFor example: \n\nBad Practice #1\n\n```ruby\n# INFO: Bad Practice\n# Example #1 - verification logic is moved to the Page\nAnd(/^(.+) should have missed Video call message from \"(.+)\"$/) do |user, chat_companion_name|\n  persona_with(role: user) do\n    Pages::ChatPage.new.await.verify_missed_video_call(name: chat_companion_name)\n  end\nend\n```\n\nvs\n\nGood Practice #1\n\n```ruby\n# INFO: Good Practice\n# Example #1 - verification logic is moved to the step\nAnd(/^(.+) should have missed Video call message from \"(.+)\"$/) do |user, chat_companion_name|\n  persona_with(role: user) do\n    chat_page = Pages::ChatPage.new.await\n\n    # Check #1: Verify missed Video call message text\n    expected = ExpectedData.missed_video_call(name: chat_companion_name)\n    actual   = chat_page.video_call_message_text\n    Assertions.assert_equal(expected, actual, \"Missed video call message is incorrect\")\n\n    # Check #2: Verify missed Video call button\n    expected = ExpectedData::CALL_BACK_BUTTON\n    actual   = chat_page.call_back_button_text\n    Assertions.assert_equal(expected, actual, \"Call back button text is incorrect\")\n  end\nend\n```\n\n## Best Practices: Quick References\n\n1.1. Keep verification logic in steps: \n\n* verification logic in steps - steps/chat_steps.rb:53\n* keep page methods simple - your_app/component/chat/conversation/message/video_message.rb:10\n\n1.2. Create components:\n\n* video message chat component - your_app/component/chat/conversation/message/video_message.rb:11\n\n1.3. Create generic steps\n\n* generic page await - steps/generic_steps.rb:21\n* generic go back action - steps/generic_steps.rb:29\n\n1.4. Verify all possible states:\n\n* loader should not appear - steps/chat_steps.rb:35\n\n1.5. Create ensured preconditions\n\n* ensure location service is off - your_app/page/system_settings_page.rb:20\n* ensure all chat messages received - steps/chat_steps.rb:23\n \n1.6. Create reusable and stable steps:\n\n* create simple steps to reuse it in many cases - steps/chat_steps.rb:84\n* create complex steps and ensure state transition inside - steps/chat_steps.rb:119\n\n1.7. Verify optional elements:\n\n* verify optional titles and buttons - your_app/page/abstract_alert_page.rb:10\n\n## Environment Requisites\n\n1.1. Install RVM:\n```\ncurl -sSL https://get.rvm.io | bash -s stable\n```\nto start using RVM you need to run `source ~/.rvm/scripts/rvm`\n\n1.2. Install Ruby:\n```\nrvm install ruby-2.6.3\n```\n1.3. Install Bundler Gem to manage Gem dependencies:\n```\ngem install bundler\n```\n\n1.4. Install Gem dependencies from Gemfile:\n```\nbundle install\n```\n\n## Usage\n\nFor running tests cases, please use command: \n```\nbundle exec cucumber -p sample_project\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadoo%2Fmobileautomationsampleproject","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbadoo%2Fmobileautomationsampleproject","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadoo%2Fmobileautomationsampleproject/lists"}