{"id":20471247,"url":"https://github.com/tawk/tawk-wordpress","last_synced_at":"2025-10-06T23:52:50.511Z","repository":{"id":23493357,"uuid":"26858693","full_name":"tawk/tawk-wordpress","owner":"tawk","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-09T07:24:53.000Z","size":969,"stargazers_count":27,"open_issues_count":3,"forks_count":18,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-09T08:30:00.444Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tawk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"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":"2014-11-19T11:39:19.000Z","updated_at":"2025-04-09T07:21:58.000Z","dependencies_parsed_at":"2025-03-21T15:17:14.757Z","dependency_job_id":null,"html_url":"https://github.com/tawk/tawk-wordpress","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tawk%2Ftawk-wordpress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tawk%2Ftawk-wordpress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tawk%2Ftawk-wordpress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tawk%2Ftawk-wordpress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tawk","download_url":"https://codeload.github.com/tawk/tawk-wordpress/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248703195,"owners_count":21148117,"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-15T14:15:32.953Z","updated_at":"2025-10-06T23:52:50.433Z","avatar_url":"https://github.com/tawk.png","language":"PHP","readme":"# Tests\n\n## Test setup and configuration\n\n### Building package to test\n\nRun `composer run build` to build both dev and prod dependencies.\n\nRun `composer run package` to build the tawk.to plugin zip file that will be tested.\n\n### Setting up docker environment\n\nDocker-compose is used for test dependency setup and is required to run these tests\n\n#### Configuring docker environment\n\nEnvironment variables used in the `docker-compose.yml` file can be found in `.env` file.\n\n| Environment Variable | Description | Default Value |\n|---|---|---|\n| WORDPRESS_DB_HOST | MySQL Service DB Host | db:3306 |\n| WORDPRESS_DB_NAME | MySQL Service DB Name | wordpress |\n| WORDPRESS_DB_USER | MySQL Service DB User | wordpress |\n| WORDPRESS_DB_PASSWORD | MySQL Service DB Password | wordpress |\n| WORDPRESS_DB_ROOT_PASSWORD | MySQL Service DB Root Password | somewordpress |\n| WEB_HOST | WordPress Web Host | wordpress |\n| WORDPRESS_DEBUG | WordPress Debug Mode | 1 |\n| WORDPRESS_ADMIN_USER | WordPress Admin User | admin |\n| WORDPRESS_ADMIN_PASSWORD | WordPress Admin Password | admin |\n| WORDPRESS_ADMIN_EMAIL | WordPress Admin Email | admin@example.com |\n| SELENIUM_BROWSER | Selenium Server Browser Type | chrome |\n| SELENIUM_PORT | Selenium Server Port | 4444 |\n\n#### Wordpress and WooCommerce setup\n\nDocker environment is setup up to automatically populate test data\nThis is done by `wordpress-cli` service in compose file\n\nFor more details on setup, see \u003cinsert script file here\u003e setup script\n\n#### Running the test environment\n\nTo run docker environment for testing this repository, start docker compose file found in `/tests/docker/docker-compose.yml`\n\nExample (assuming from root of repository)\n\n```sh\ndocker-compose -f ./tests/docker/docker-compose.yml up -d\n```\n\nEnvironment is ready when `wordpress-cli` successfully exists.\nTo monitor its status, you can tail it's logs using `docker logs -f wordpress-cli`\n\n### Configuring local test environment\n\nThese are the environment variables needed to run the selenium tests locally using composer script\n\n| Environment Variable | Description | Required |\n|---|---|---|\n| TAWK_PROPERTY_ID | Property Id | Yes |\n| TAWK_WIDGET_ID | Widget Id | Yes |\n| TAWK_USERNAME | tawk.to account username | Yes |\n| TAWK_PASSWORD | tawk.to account password | Yes |\n| WEB_HOST | Wordpress web hostname | Yes |\n| WEB_PORT | Wordpress web port | No |\n| SELENIUM_BROWSER | Browser type (chrome, firefox, edge) | Yes |\n| SELENIUM_HOST | Selenium host | Yes |\n| SELENIUM_PORT | Selenium port | No |\n\n#### Command Sample\n```\nTAWK_PROPERTY_ID=\u003cTAWK_PROPERTY_ID\u003e \\\nTAWK_WIDGET_ID=\u003cTAWK_WIDGET_ID\u003e \\\nTAWK_USERNAME=\u003cTAWK_USERNAME\u003e \\\nTAWK_PASSWORD=\u003cTAWK_PASSWORD\u003e \\\nWEB_HOST=wordpress \\\nSELENIUM_BROWSER=chrome \\\nSELENIUM_HOST=localhost \\\nSELENIUM_PORT=4444 \\\ncomposer run test\n```\n\n#### Storing local environments in a file for easy reference\n\nTo simplify testing, you can place your environment configuration in a `.env.local` file.\n\nExample contents:\n```\nexport TAWK_PROPERTY_ID='\u003cTAWK_PROPERTY_ID\u003e'\nexport TAWK_WIDGET_ID='\u003cTAWK_WIDGET_ID\u003e'\nexport TAWK_USERNAME='\u003cTAWK_USERNAME\u003e'\nexport TAWK_PASSWORD='\u003cTAWK_PASSWORD\u003e'\nexport WEB_HOST='wordpress'\nexport SELENIUM_BROWSER='chrome'\nexport SELENIUM_HOST='localhost'\nexport SELENIUM_PORT='4444'\n```\n\nAnd simply run\n\n`source .env.local \u0026\u0026 composer run test`\n\n## Debugging the test environment/Developing\n\nEnsure you have this line in your `/etc/hosts`\n```\n127.0.0.1 \u003cWEB_HOST\u003e\n```\n\nThen go to `http://\u003cWEB_HOST\u003e/wp-admin` and login with `WORDPRESS_ADMIN_USER` \u0026 `WORDPRESS_ADMIN_PASSWORD`\n\n## Running Tests on Github Actions\n\nThis repository is set up to use Github Actions to perform automated testing.\n\nTo use actions in this repository, the following secrets need to be configured:\n\n| Secret | Description |\n|---|---|\n| TAWK_PROPERTY_ID | Property Id |\n| TAWK_WIDGET_ID | Widget Id |\n| TAWK_USERNAME | tawk.to account username |\n| TAWK_PASSWORD | tawk.to account password |\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftawk%2Ftawk-wordpress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftawk%2Ftawk-wordpress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftawk%2Ftawk-wordpress/lists"}