{"id":16536853,"url":"https://github.com/startrug/cafetownsend.protractortests","last_synced_at":"2026-06-07T08:31:44.632Z","repository":{"id":113212753,"uuid":"272229213","full_name":"startrug/CafeTownsend.ProtractorTests","owner":"startrug","description":"Simple Protractor e2e tests project for Angular app http://cafetownsend-angular-rails.herokuapp.com/","archived":false,"fork":false,"pushed_at":"2020-09-13T16:45:09.000Z","size":288,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-14T03:52:01.702Z","etag":null,"topics":["allure-report","automated-testing","e2e-testing","e2e-tests","jasmine-framework","javascript","js","protractor","protractor-e2e-test","protractor-tests"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/startrug.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-14T15:26:21.000Z","updated_at":"2020-09-13T16:45:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"5a6bb5ff-5e73-4669-afb4-da85f37d0504","html_url":"https://github.com/startrug/CafeTownsend.ProtractorTests","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/startrug%2FCafeTownsend.ProtractorTests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/startrug%2FCafeTownsend.ProtractorTests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/startrug%2FCafeTownsend.ProtractorTests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/startrug%2FCafeTownsend.ProtractorTests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/startrug","download_url":"https://codeload.github.com/startrug/CafeTownsend.ProtractorTests/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241717126,"owners_count":20008323,"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":["allure-report","automated-testing","e2e-testing","e2e-tests","jasmine-framework","javascript","js","protractor","protractor-e2e-test","protractor-tests"],"created_at":"2024-10-11T18:33:44.087Z","updated_at":"2026-06-07T08:31:44.146Z","avatar_url":"https://github.com/startrug.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Last commit](https://img.shields.io/github/last-commit/startrug/CafeTownsend.ProtractorTests?color=9cf\u0026logo=git)\n![GitHub top language](https://img.shields.io/github/languages/top/startrug/CafeTownsend.ProtractorTests?color=blue)\n\n# Protractor e2e tests training project\n\nThis is my first automated testing project using JS and Protractor framework. I prepared some test scenarios for Angular app availaible here: [cafetownsend-angular-rails.herokuapp.com](http://cafetownsend-angular-rails.herokuapp.com).\nBy this project, I wanted to get essential knowledge about Protractor framework and its capabilities.\n\n## Project structure\n- [configuration](configuration) - there is only one file in that directory [conf.js](configuration/conf.js), but is possible to add another configuration file, eg. for CI integration\n- [data](data) - in that directory you can find data sets for tests. I prepared 3 files: [employees.json](data/employees.json), [page_info.json](data/page_info.json) and [users.json](data/users.json) for suitable data. It's possible to use data stored in JSON file in simple way, for example:\n```\nlet employees = require('../data/employees.json')\n```\nif you want to import all data from file - in this case [employees.json](data/employees.json), or:\n```\nlet admin = require('../data/users.json').admin;\n```\nif you want to import only selected part of data - in this case admin credentials from [users.json](data/users.json)\nNow, you have access to imported data sets, for example:\n```\nthis.logInAsAdmin = function() {\n        this.get();\n        this.enterUserName(admin.name);\n        this.enterUserPassword(admin.password);\n        submitForm();\n    }\n  };\n  ```\n  Notice: the code above is a part of [login_form.js](page_objects/login_form.js). Go to this file for more details.\n\n- [helpers](helpers) - in this directory I stored reusable parts of code to avoid its duplication. There are some methods using in many places, so I decided to place them in [common_methods.js](helpers/common_methods.js). You can import all common methods or one of them and assign it to variable like in examples:\nexample of import all common methods and using one of them\n```\nlet commonActions = require('../helpers/common_methods.js');\nexpect(commonActions.isSubmitButtonDisabled()).toEqual('true');\n```\nexample of import selected method and using it\n```\nlet createEmployeeFullName = require('../helpers/common_methods').createEmployeeFullName;\nlet fullName = createEmployeeFullName(employeeToDelete.firstName, employeeToDelete.lastName);\n```\n- [page_objects](page_objects) - page objects into which the has been divided. Some instructions for basic usage Page Object pattern in Protractor you can find here: [protractortest.org/#/page-objects](https://www.protractortest.org/#/page-objects)\n- [tests](tests) -  sets of tests for main functionalities of application. Tests have been divided for 5 specs:\n  - logging in to app:\n    - [login_spec.js](tests/login_spec.js),\n  - functionalities of employees list and forms (add \u0026 edit forms have the same input fields):\n    - [employees_spec.js](tests/employees_spec.js),\n    - [add_employee_spec.js](tests/add_employee_spec.js),\n    - [edit_employee_spec.js](tests/edit_employee_spec.js),\n    - [delete_employee_spec.js](tests/delete_employee_spec.js)\n\n## Project features\n- framework follows page object pattern\n- data-driven tests - test data is loading from json files (see: [Project structure](README.md#Project-structure))\n- easy to generating and attractive reports in Allure with screenshots and nice charts\n\n## Getting started\nBasic informations about Protractor setup, configuration and writing first test are availaible here: [protractor.org](https://www.protractortest.org/#/)\n\n## Running tests\nFor run all tests just open command line in [configuration](configuration) directory and type command:\n```\nprotractor conf.js\n```\nIf you want to run specific suites of tests you can use command:\n```\nprotractor conf.js --suite login,add\n```\nYou can also run specific files containing tests by using command:\n```\nprotractor conf.js --specs ../tests/add_employee_spec.js, ../tests/delete_employee_spec.js\n```\nRemember not to use spaces between comma and name of suite or file!\n\n## Generating reports\nAfter tests run allure-results directory should be saved in main project catalog. For genereting Allure report just open command line in main project directory and use command:\n```\nallure serve\n```\nReport will be generated in few seconds and opened in your default browser.\n\nThe tests report might look like this:\n![Allure report screenshot](https://github.com/startrug/CafeTownsend.ProtractorTests/blob/master/readme_screenshots/sample_report.png?raw=true)\n\n## What's next?\nThis simple, training project is still developing. I want to add more scenarios and test cases and refactor a bit existing code and maybe modify project structure :blush:\nEDIT: After many changes, fixes and code refactoring, I decided to leave this project in current state. Maybe I'll back to that with new ideas when I'll learn more about tests automation using JavaScript.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstartrug%2Fcafetownsend.protractortests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstartrug%2Fcafetownsend.protractortests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstartrug%2Fcafetownsend.protractortests/lists"}