Pro settings e2e
Tests that require changes from Emi to pass:
- it should update the title and headline (browser tab title currently reads 'Home | Minds')
- it should allow the user to set light theme for posts (activities not always showing up on feed)
- it should allow the user to set dark theme for posts (ditto)
Closes #2273
added scoped labels
mentioned in issue engine#1165 (closed)
added 11 commits
-
0a140e7f...559f9503 - 7 commits from branch
master
- 787abfb4 - Merge branch 'master' of gitlab.com:minds/front into pro-settings-e2e-2273
- c9f80d64 - (e2e): test cleanup
- 4f7db1f1 - Merge branch 'master' of gitlab.com:minds/front into pro-settings-e2e-2273
- fd5beff2 - (e2e): fix footer contains error, skip post theme tests for now
Toggle commit list-
0a140e7f...559f9503 - 7 commits from branch
changed the description
unmarked as a Work In Progress
approved this merge request
added scoped label
- Owner
@omadrid getting merge conflicts here
- Developer
@omadrid I'm unable to test and give approval as credentials for
minds_pro_cypress_tests
are required and the password is set to empty string in the config.Edited by Guy Thouret added 23 commits
-
fd5beff2...6ad11c19 - 22 commits from branch
master
- b06cbc0b - Merge branch 'master' of gitlab.com:minds/front into pro-settings-e2e-2273
-
fd5beff2...6ad11c19 - 22 commits from branch
- Developer
@gthouret Ah, yes. To run the tests I've been entering:
cypress/e2e.sh -h http://localhost:8080 -pu minds_pro_cypress_tests -pp p@ssw0rd -p p@ssw0rd -u minds_pro_cypress_tests
(e.g. If you've created test user minds_pro_cypress_tests with password p@ssw0rd)
p.s. I'm not sure how it's supposed to work for regular testing outside of localhost, but that's what I do to get the tests to run. Maybe @benhayward.ben has the official answer?
- Developer
Only took an hour to get my stack up and running
I'm getting the 'invalid password' error when trying to create a user with that password!!!
- Developer
Oh sorry!! I just replaced the password I was using with a generic one for the example, because mine is TOP SECRET :) You can use whatever password you want as long as it complies with the rules
- Developer
- Developer
p@ssw0rd
has 8 characters, includes upper case, no spaces and even has a special character - Developer
Pretty sure this has been widely reported by users so I'll dig in and see what's up.
- Developer
It actually doesn't have upper case. Why do we enforce that, that's silly.
- Developer
Yep that was it.
- Developer
Also, e2e tests run about 100x faster if you enable
aot
for the build. I should really enable aot by default on our builds. - Developer
Ooh! I like faster!! Does this mean I enter
npm run serve-dev --aot
? - Developer
You have to set an env var to fix the javascript engine's memory manager and manually edit
package.json
to add--aot
to theserve-dev
line.Very slightly longer compile time is the trade off for not feeling like you're wading through treacle every time you load the app.
export NODE_OPTIONS='--max-old-space-size=2048'
(Every time you open a new terminal session unless you add to~/.bashrc
or whatever zsh is using now.)diff --git a/package.json b/package.json index 9908a5a1..08458090 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "build": "ng build --prod", "prebuild-dev": "gulp build.sass --deploy-url=http://localhost/en", "build-dev": "ng build --output-path dist/en --deploy-url=/en/ --watch=true --poll=800", - "serve-dev": "ng serve --host=0.0.0.0 --deploy-url=/en/ --configuration=hmr --hmr --poll=800 --progress", + "serve-dev": "ng serve --host=0.0.0.0 --deploy-url=/en/ --configuration=hmr --hmr --poll=800 --progress --aot", "test": "ng test", "lint": "ng lint", "e2e": "cypress run --debug",
- Developer
Completed in 97.87s - failed across the board.
Does this require a specific backend? I'm running against latest master backend.
- Developer
Latest master should work... You have Pro enabled on the test user, right?
At least one of the tests is expected to fail (unless Emi has already made a change to fix it)
Edited by Olivia Madrid - Developer
Yes I logged in as the test user and it had the pro badge on the channel page - Unless there's more to enabling pro than just setting a
pro_expires
way into the future?!?