Skip to content

Commit

Permalink
[GSoC'23] - M1.4.2 - migrating local tests under docker (oppia#18775)
Browse files Browse the repository at this point in the history
* migrating some tests to work under docker

* migrating local tests

* reverting extra changes

* reverting changes

* fixed mypy checks

* added backend associate tests in makefile

* added make command for installing node

* lighthouse tests under docker

* migrated e2e tests

* cleaning up + fixing Makefile

* fixed karma report coverage

* checking prod mode on CI

* prod mode action of docker

* prod mode action of docker

* fixing backend tests

* pushing local changes

* fixed backend tests + cleanup for the PR

* fixed mypy checks + cleanup for the PR

* fixed mypy checks + cleanup for the PR

* cleanup for the PR

* cleanup for the PR + fixing e2e tests node issue

* fix node env in docker

* backend tests

* fixed run-devserver

* fixed run-devserver

* fixed run-devserver

* fixed global node env issue

* changes terminal UI changes

* fixed lints

* fixed backend tests

* fixed lints

* fixed backend tests

* fixed prod mode + lint checks on docker

* fixed prod mode + lint checks on docker

* fixed prod mode

* fixed backend associate tests for Windows users

* fixing node issue for Windows in docker:

* added missing semicolon

* enhance install_node in makefile

* added copyright in the new .py script

* fixed lints

* fixed makefile

* pointed chrome version in docker container

* changed make command name

* resolving PR comments

* address review comments

* fixed lints

* Update run_mypy_checks.py

* adding backend tests for the python script

* resolving PR comments

* Delete mock_app.yaml

* Delete mock_app_dev.yaml

* reverting wrong change

* fixed lints

* fixed lints

* addressed review comments

* fixed build.py backend test

* fixed CI tests

* fixed webpack prod config

* fixed acceptance tests url error
  • Loading branch information
Shivkant-Chauhan authored Oct 21, 2023
1 parent 282c1eb commit f50e600
Show file tree
Hide file tree
Showing 42 changed files with 485 additions and 172 deletions.
2 changes: 1 addition & 1 deletion .lighthouserc-1.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ module.exports = {
'assertions': baseConfig['basePerformanceAssertions']
},
{
'matchingUrlPattern': '^http://127.0.0.1:8181/blog-dashboard$',
'matchingUrlPattern': '^http://localhost:8181/blog-dashboard$',
'assertions': baseConfig['basePerformanceAssertions']
},
{
Expand Down
28 changes: 14 additions & 14 deletions .lighthouserc-accessibility-1.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,85 +28,85 @@ module.exports = {
'assert': {
'assertMatrix': [
{
'matchingUrlPattern': '^http://127.0.0.1:8181/$',
'matchingUrlPattern': '^http://localhost:8181/$',
'assertions': {
'categories:accessibility': ['error', {'minScore': 1}]
}
},
{
'matchingUrlPattern': '^http://127.0.0.1:8181/about$',
'matchingUrlPattern': '^http://localhost:8181/about$',
'assertions': {
'categories:accessibility': ['error', {'minScore': 0.98}]
}
},
{
'matchingUrlPattern': '^http://127.0.0.1:8181/admin$',
'matchingUrlPattern': '^http://localhost:8181/admin$',
'assertions': {
'categories:accessibility': ['error', {'minScore': 1}]
}
},
{
'matchingUrlPattern': '^http://127.0.0.1:8181/blog-dashboard$',
'matchingUrlPattern': '^http://localhost:8181/blog-dashboard$',
'assertions': {
'categories:accessibility': ['error', {'minScore': 0.98}]
}
},
{
'matchingUrlPattern': '^http://127.0.0.1:8181/community-library$',
'matchingUrlPattern': '^http://localhost:8181/community-library$',
'assertions': {
'categories:accessibility': ['error', {'minScore': 0.98}]
}
},
{
'matchingUrlPattern': '^http://127.0.0.1:8181/contact$',
'matchingUrlPattern': '^http://localhost:8181/contact$',
'assertions': {
'categories:accessibility': ['error', {'minScore': 0.98}]
}
},
{
'matchingUrlPattern': '^http://127.0.0.1:8181/contributor-dashboard$',
'matchingUrlPattern': '^http://localhost:8181/contributor-dashboard$',
'assertions': {
'categories:accessibility': ['error', {'minScore': 1}]
}
},
{
'matchingUrlPattern': '^http://127.0.0.1:8181/creator-dashboard$',
'matchingUrlPattern': '^http://localhost:8181/creator-dashboard$',
'assertions': {
'categories:accessibility': ['error', {'minScore': 1}]
}
},
{
'matchingUrlPattern': '^http://127.0.0.1:8181/delete-account$',
'matchingUrlPattern': '^http://localhost:8181/delete-account$',
'assertions': {
'categories:accessibility': ['error', {'minScore': 0.98}]
}
},
{
'matchingUrlPattern': '^http://127.0.0.1:8181/donate$',
'matchingUrlPattern': '^http://localhost:8181/donate$',
'assertions': {
'categories:accessibility': ['error', {'minScore': 0.98}]
}
},
{
'matchingUrlPattern': '^http://127.0.0.1:8181/emailDashboard$',
'matchingUrlPattern': '^http://localhost:8181/emailDashboard$',
'assertions': {
'categories:accessibility': ['error', {'minScore': 1}]
}
},
{
'matchingUrlPattern': '^http://127.0.0.1:8181/get-started$',
'matchingUrlPattern': '^http://localhost:8181/get-started$',
'assertions': {
'categories:accessibility': ['error', {'minScore': 0.98}]
}
},
{
'matchingUrlPattern': '^http://127.0.0.1:8181/learner-dashboard$',
'matchingUrlPattern': '^http://localhost:8181/learner-dashboard$',
'assertions': {
'categories:accessibility': ['error', {'minScore': 1}]
}
},
{
'matchingUrlPattern': '^http://127.0.0.1:8181/moderator$',
'matchingUrlPattern': '^http://localhost:8181/moderator$',
'assertions': {
'categories:accessibility': ['error', {'minScore': 0.98}]
}
Expand Down
32 changes: 16 additions & 16 deletions .lighthouserc-accessibility-2.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,97 +28,97 @@ module.exports = {
'assert': {
'assertMatrix': [
{
'matchingUrlPattern': '^http://127.0.0.1:8181/preferences$',
'matchingUrlPattern': '^http://localhost:8181/preferences$',
'assertions': {
'categories:accessibility': ['error', {'minScore': 1}]
}
},
{
'matchingUrlPattern': '^http://127.0.0.1:8181/privacy-policy$',
'matchingUrlPattern': '^http://localhost:8181/privacy-policy$',
'assertions': {
'categories:accessibility': ['error', {'minScore': 0.98}]
}
},
{
'matchingUrlPattern': '^http://127.0.0.1:8181/profile/username1$',
'matchingUrlPattern': '^http://localhost:8181/profile/username1$',
'assertions': {
'categories:accessibility': ['error', {'minScore': 1}]
}
},
{
'matchingUrlPattern': '^http://127.0.0.1:8181/signup?return_url=%2F$',
'matchingUrlPattern': '^http://localhost:8181/signup?return_url=%2F$',
'assertions': {
'categories:accessibility': ['error', {'minScore': 1}]
}
},
{
'matchingUrlPattern': '^http://127.0.0.1:8181/teach$',
'matchingUrlPattern': '^http://localhost:8181/teach$',
'assertions': {
'categories:accessibility': ['error', {'minScore': 1}]
}
},
{
'matchingUrlPattern': '^http://127.0.0.1:8181/topics-and-skills-dashboard$',
'matchingUrlPattern': '^http://localhost:8181/topics-and-skills-dashboard$',
'assertions': {
'categories:accessibility': ['error', {'minScore': 0.9}]
}
},
{
'matchingUrlPattern': '^http://127.0.0.1:8181/terms$',
'matchingUrlPattern': '^http://localhost:8181/terms$',
'assertions': {
'categories:accessibility': ['error', {'minScore': 0.98}]
}
},
{
'matchingUrlPattern': '^http://127.0.0.1:8181/thanks$',
'matchingUrlPattern': '^http://localhost:8181/thanks$',
'assertions': {
'categories:accessibility': ['error', {'minScore': 1}]
}
},
{
'matchingUrlPattern': '^http://127.0.0.1:8181/volunteer$',
'matchingUrlPattern': '^http://localhost:8181/volunteer$',
'assertions': {
'categories:accessibility': ['error', {'minScore': 0.9}]
}
},
{
'matchingUrlPattern': '^http://127.0.0.1:8181/learn/staging/dummy-topic-one/story',
'matchingUrlPattern': '^http://localhost:8181/learn/staging/dummy-topic-one/story',
'assertions': {
'categories:accessibility': ['error', {'minScore': 1}]
}
},
{
'matchingUrlPattern': '^http://127.0.0.1:8181/learn/staging/dummy-topic-one/story/help-jamie-win-arcade',
'matchingUrlPattern': '^http://localhost:8181/learn/staging/dummy-topic-one/story/help-jamie-win-arcade',
'assertions': {
'categories:accessibility': ['error', {'minScore': 1}]
}
},
{
'matchingUrlPattern': '^http://127.0.0.1:8181/learn/math',
'matchingUrlPattern': '^http://localhost:8181/learn/math',
'assertions': {
'categories:accessibility': ['error', {'minScore': 1}]
}
},
{
'matchingUrlPattern': '^http://127.0.0.1:8181/create/.*$',
'matchingUrlPattern': '^http://localhost:8181/create/.*$',
'assertions': {
'categories:accessibility': ['error', {'minScore': 0.91}]
}
},
{
'matchingUrlPattern': '^http://127.0.0.1:8181/topic_editor/.*$',
'matchingUrlPattern': '^http://localhost:8181/topic_editor/.*$',
'assertions': {
'categories:accessibility': ['error', {'minScore': 1}]
}
},
{
'matchingUrlPattern': '^http://127.0.0.1:8181/skill_editor/.*$',
'matchingUrlPattern': '^http://localhost:8181/skill_editor/.*$',
'assertions': {
'categories:accessibility': ['error', {'minScore': 0.91}]
}
},
{
'matchingUrlPattern': '^http://127.0.0.1:8181/story_editor/.*$',
'matchingUrlPattern': '^http://localhost:8181/story_editor/.*$',
'assertions': {
'categories:accessibility': ['error', {'minScore': 0.84}]
}
Expand Down
66 changes: 33 additions & 33 deletions .lighthouserc-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,41 +21,41 @@ module.exports = {
puppeteerScript: 'puppeteer-login-script.js',
urlShards: {
1: [
'http://127.0.0.1:8181/',
'http://127.0.0.1:8181/about',
'http://127.0.0.1:8181/about-foundation',
'http://127.0.0.1:8181/admin',
'http://127.0.0.1:8181/blog-dashboard',
'http://127.0.0.1:8181/community-library',
'http://127.0.0.1:8181/contact',
'http://127.0.0.1:8181/contributor-dashboard',
'http://127.0.0.1:8181/creator-dashboard',
'http://127.0.0.1:8181/creator-guidelines',
'http://127.0.0.1:8181/delete-account',
'http://127.0.0.1:8181/donate',
'http://127.0.0.1:8181/emaildashboard',
'http://127.0.0.1:8181/get-started',
'http://127.0.0.1:8181/learner-dashboard',
'http://127.0.0.1:8181/license',
'http://127.0.0.1:8181/moderator',
'http://localhost:8181/',
'http://localhost:8181/about',
'http://localhost:8181/about-foundation',
'http://localhost:8181/admin',
'http://localhost:8181/blog-dashboard',
'http://localhost:8181/community-library',
'http://localhost:8181/contact',
'http://localhost:8181/contributor-dashboard',
'http://localhost:8181/creator-dashboard',
'http://localhost:8181/creator-guidelines',
'http://localhost:8181/delete-account',
'http://localhost:8181/donate',
'http://localhost:8181/emaildashboard',
'http://localhost:8181/get-started',
'http://localhost:8181/learner-dashboard',
'http://localhost:8181/license',
'http://localhost:8181/moderator',
],
2: [
'http://127.0.0.1:8181/preferences',
'http://127.0.0.1:8181/privacy-policy',
'http://127.0.0.1:8181/profile/username1',
'http://127.0.0.1:8181/signup?return_url=%2F',
'http://127.0.0.1:8181/teach',
'http://127.0.0.1:8181/topics-and-skills-dashboard',
'http://127.0.0.1:8181/terms',
'http://127.0.0.1:8181/thanks',
'http://127.0.0.1:8181/volunteer',
'http://127.0.0.1:8181/learn/staging/dummy-topic-one/story',
'http://127.0.0.1:8181/learn/staging/dummy-topic-one/story/help-jamie-win-arcade',
'http://127.0.0.1:8181/learn/math',
`http://127.0.0.1:8181/create/${process.env.exploration_id}`,
`http://127.0.0.1:8181/topic_editor/${process.env.topic_id}`,
`http://127.0.0.1:8181/skill_editor/${process.env.skill_id}`,
`http://127.0.0.1:8181/story_editor/${process.env.story_id}`
'http://localhost:8181/preferences',
'http://localhost:8181/privacy-policy',
'http://localhost:8181/profile/username1',
'http://localhost:8181/signup?return_url=%2F',
'http://localhost:8181/teach',
'http://localhost:8181/topics-and-skills-dashboard',
'http://localhost:8181/terms',
'http://localhost:8181/thanks',
'http://localhost:8181/volunteer',
'http://localhost:8181/learn/staging/dummy-topic-one/story',
'http://localhost:8181/learn/staging/dummy-topic-one/story/help-jamie-win-arcade',
'http://localhost:8181/learn/math',
`http://localhost:8181/create/${process.env.exploration_id}`,
`http://localhost:8181/topic_editor/${process.env.topic_id}`,
`http://localhost:8181/skill_editor/${process.env.skill_id}`,
`http://localhost:8181/story_editor/${process.env.story_id}`
]
},
basePerformanceAssertMatrix: {
Expand Down
Loading

0 comments on commit f50e600

Please sign in to comment.