mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
* Remove all occurrences of ExperimentalTimezone in /server
This removes all uses of ExperimentalTimezone and makes all conditions using this setting being either removed (== false) or always used (== true)
* Remove timezone parameter for getChannelMemberByGroup
As timezone is always enabled this function no longer has a second parameter. The endpoint will always be called with includeTimezones set to true
* Remove all uses of ExperimentalTimezone in webapp
All conditions dependent of this are adjusted to always be true if experimentalTimezone should be true and vice versa
* Change all tests checking for correct usage of ExperimentalTimezone
As this parameter is no longer used, the tests which check for correct behaviour of this is no longer needed
* Fix type errors
Tests regarding types does now pass
'npm run check-types' will run successfully
* fix lint issues
Fix all current lint errors and now lint test goes through
* Fix test regarding profile popover
enableTimezone now is gone and all profile_popover.test.tsx can run successfully.
Added state.entities.users.profiles[] as it before threw an error without it.
* Fix tests where "April 1 2019" was changed to "April 01 2019"
Now it will show "April 1 2019" and "timeZone" will only show if its other than empty ("").
* Fix test where date was set to NaN
Now date will show correctly and will not be NaN
* fix minor test case that failed before
* fix linting in server
* Delete tests that are not valid with timeZoneEnabled removed
tests in advanced_create_comment and advanced_create_post had timeZoneEnabled
set to false as default. The tests that use this are now changed to once which are meant to have timeZoneEnabled set to true.
Adjust jest function in advanced_create_post to get correct stacktrace
* Parameter deleted
isTimeZoneEnabled is always true and therefore the parameter can be deleted
* adjust to prettier standard
* Remove all occurrences of ExperimentalTimezone in /server
This removes all uses of ExperimentalTimezone and makes all conditions using this setting being either removed (== false) or always used (== true)
* Remove timezone parameter for getChannelMemberByGroup
As timezone is always enabled this function no longer has a second parameter. The endpoint will always be called with includeTimezones set to true
* Remove all uses of ExperimentalTimezone in webapp
All conditions dependent of this are adjusted to always be true if experimentalTimezone should be true and vice versa
* Change all tests checking for correct usage of ExperimentalTimezone
As this parameter is no longer used, the tests which check for correct behaviour of this is no longer needed
* Fix type errors
Tests regarding types does now pass
'npm run check-types' will run successfully
* fix lint issues
Fix all current lint errors and now lint test goes through
* Fix test regarding profile popover
enableTimezone now is gone and all profile_popover.test.tsx can run successfully.
Added state.entities.users.profiles[] as it before threw an error without it.
* Fix tests where "April 1 2019" was changed to "April 01 2019"
Now it will show "April 1 2019" and "timeZone" will only show if its other than empty ("").
* Fix test where date was set to NaN
Now date will show correctly and will not be NaN
* fix minor test case that failed before
* fix linting in server
* Delete tests that are not valid with timeZoneEnabled removed
tests in advanced_create_comment and advanced_create_post had timeZoneEnabled
set to false as default. The tests that use this are now changed to once which are meant to have timeZoneEnabled set to true.
Adjust jest function in advanced_create_post to get correct stacktrace
* Parameter deleted
isTimeZoneEnabled is always true and therefore the parameter can be deleted
* adjust to prettier standard
---------
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
Local development
1. Start local server in a separate terminal.
# Typically run the local server with:
cd server && make run
# Or build and distribute webapp including channels and playbooks
# so that their product URLs do not rely on Webpack dev server.
# Especially important when running test inside the Playwright's docker container.
cd webapp && make dist
cd server && make run-server
2. Install dependencies and run the test.
Note: If you're using Node.js version 18 and above, you may need to set NODE_OPTIONS='--no-experimental-fetch'.
# Install npm packages
npm i
# Install browser binaries as prompted if Playwright is just installed or updated
# See https://playwright.dev/docs/browsers
npx playwright install
# Run specific test of all projects -- chrome, firefox, iphone and ipad.
# See https://playwright.dev/docs/test-cli.
npm run test -- login
# Run specific test of a project
npm run test -- login --project=chrome
# Or run all tests
npm run test
3. Inspect test results at /test-results folder when something failed unexpectedly.
Updating screenshots is strictly via Playwright's docker container for consistency
1. Run docker container using latest focal version
Change to root directory, run docker container
docker run -it --rm -v "$(pwd):/mattermost/" --ipc=host mcr.microsoft.com/playwright:v1.38.1-jammy /bin/bash
2. Inside the docker container
export NODE_OPTIONS='--no-experimental-fetch'
export PW_BASE_URL=http://host.docker.internal:8065
export PW_HEADLESS=true
cd mattermost/e2e-tests/playwright
# Install npm packages. Use "npm ci" to match the automated environment
npm ci
# Run specific test. See https://playwright.dev/docs/test-cli.
npm run test -- login --project=chrome
# Or run all tests
npm run test
# Update snapshots
npm run test -- login --update-snapshots
Page/Component Object Model
See https://playwright.dev/docs/test-pom.
Page and component abstractions are located at ./support/ui. It should be first class before writing a spec file so that any future change in DOM structure will be done in one place only. No static UI text and fixed locator should be written in the spec file.