forked from berkeley-cdss/flextensions
-
Notifications
You must be signed in to change notification settings - Fork 4
Developer Resources
huanger2 edited this page Apr 22, 2025
·
17 revisions
- Setup the following ENV variables in heroku
APP_KEY
REDIRECT URI
CANVAS_CLIENT_ID
CANVAS_URL
RAILS_MASTER_KEY
Redirect uri should have domain-name/auth/callback
- Pushing branch Iter4 to flextensions heroku
heroku login
git remote add golden https://git.heroku.com/flextensions.git
git push golden main
| Test Type | Command |
|---|---|
| RSpec Tests (no a11y) | bundle exec rspec --tag '~a11y' |
| Cucumber Tests (no a11y) | bundle exec cucumber --tags 'not @a11y and not @skip' |
| All Regular Tests | bundle exec rspec --tag '~a11y' && bundle exec cucumber --tags 'not @a11y and not @skip' |
| Accessibility Tests (RSpec) | bundle exec rspec --tag a11y |
| Accessibility Tests (Cucumber) | bundle exec cucumber --tags @a11y |
| All Tests (including a11y) | bundle exec rspec && bundle exec cucumber --tags 'not @skip' |
| Lint Code (RuboCop) | bundle exec rubocop |
| Auto-fix Lint Issues | bundle exec rubocop -A |
| Validate Swagger API | npx @redocly/cli lint app/assets/swagger/swagger.json --extends=minimal |
| Tag | Description |
|---|---|
@javascript |
Tests requiring JS execution in browser (uses Selenium/headless browser), without the tag, it will run in rack, which is exponentially faster to test |
@a11y |
Accessibility tests using axe-core to verify WCAG compliance |
@skip |
Temporarily skipped tests (known failures) |
@wip |
Work In Progress tests still under development |
- Use
~(RSpec) ornot(Cucumber) to exclude tags - Combine tags in Cucumber with
and/or:--tags '@javascript and not @skip' - Run accessibility tests separately (slower)
- Testing convention css selector -
<a class="nav-link testid-username" href="#"> Tashrique </a>
Notice the testid-usernameWe will be using this style in class to grab elements from DOM to test.
Please don't remove any class that starts with testid-