Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix part of #17712 Add more acceptance tests for logged in users #20126

Merged
merged 86 commits into from
Jun 23, 2024
Merged
Show file tree
Hide file tree
Changes from 50 commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
fdc8b10
Footer navigation logged-in user tests progress
agallop Mar 14, 2024
2efc822
merge develop into static-pages
agallop Mar 18, 2024
39a9be3
Click all buttons on get started page done
agallop Mar 18, 2024
22245ed
logged in users get started page test refactoring
agallop Mar 19, 2024
c159ba0
click all about oppia footer buttons test working
agallop Mar 19, 2024
7a4a117
Lint fixes
agallop Mar 19, 2024
514b16e
Lint fixes
agallop Mar 19, 2024
ff4c099
Lint fixes
agallop Mar 19, 2024
41876ac
null-safety
agallop Mar 19, 2024
d8d4061
Add /usr/bin/google-chrome-stable as possible CHROME_BIN path
agallop Mar 19, 2024
ce8c8ef
click all about oppia footer buttons changes
agallop Mar 19, 2024
9b60f49
Merge branch 'develop' into static-pages
agallop Mar 19, 2024
6c79021
Fix some flakiness for logged in user acceptance tests
agallop Mar 19, 2024
f3a47bf
Merge branch 'static-pages' of https://www.github.com/agallop/oppia i…
agallop Mar 19, 2024
f48f90d
Remove extra space
agallop Mar 22, 2024
6e3861a
Matcher changes for logged-in-users-utils
agallop Mar 22, 2024
bf6e8d6
Swap ` with \' on non-format string
agallop Mar 22, 2024
ba26c45
Swaping a .toContain to a .toBe
agallop Mar 22, 2024
b6da51b
merge develop into static-pages
agallop Mar 27, 2024
10eb873
Rename of some logged in user tests and restructuring of the click al…
agallop Mar 28, 2024
fd6a7c2
Merge branch 'develop' into static-pages
agallop Mar 28, 2024
0795425
Click all links on creator guidelines page acceptance test
agallop Mar 29, 2024
aaefea0
More logged-in user test progress
agallop Mar 29, 2024
b2807b1
Logged in user tests for teach and terms pages
agallop Apr 1, 2024
8dba1b7
logged-in-user-utils constant changes
agallop Apr 1, 2024
3101382
Logged-in users Social icons and privacy page tests
agallop Apr 2, 2024
f9f28de
Fix linter errors
agallop Apr 2, 2024
f6458ae
Last logged-in users test
agallop Apr 3, 2024
87f4788
merge develop into static-pages2
agallop Apr 3, 2024
ddcdfff
remove duplicate member from logged-in-user-utils
agallop Apr 3, 2024
c250c9b
Merge branch 'oppia:develop' into static-pages2
agallop Apr 3, 2024
ef46f2f
logged in user test documentation updates
agallop Apr 3, 2024
52d3a54
fix broken acceptance test, logged-in-user-tests/click-all-links-on-g…
agallop Apr 3, 2024
74b8fd1
Attempt to lower flakiness of following links to social media sites
agallop Apr 5, 2024
71dc60b
Remove extra dash in acceptance suite name
agallop Apr 5, 2024
bd8503f
Fix typos in logged-in-user-tests
agallop Apr 5, 2024
a6d52ac
Merge branch 'develop' into static-pages2
agallop Apr 8, 2024
b6332c8
Footer icon click functions renames
agallop Apr 8, 2024
29a59b6
Merge branch 'develop' into static-pages2
agallop Apr 11, 2024
52555f4
Add missing function documentation
agallop Apr 11, 2024
4c3ac43
Remove some empty lines
agallop Apr 11, 2024
196ff32
Add new test suite
agallop Apr 21, 2024
cacdd28
Merge branch 'develop' into static-pages
agallop Apr 22, 2024
6736b71
move tests into click-all-links-in-teach-learn-footer spec
agallop Apr 22, 2024
164606a
Merge branch 'develop' into static-pages2
agallop Apr 28, 2024
95b8f8a
Rename some logged-in-user-util functions
agallop Apr 29, 2024
e700d90
Merge branch 'develop' into static-pages2
agallop Apr 29, 2024
28adb3d
Merge branch 'develop' into static-pages2
agallop Apr 29, 2024
a3351c9
fix logged-in-user-tests/click-all-buttons-on-teach-page.spec.ts
agallop Apr 29, 2024
26dd549
Merge branch 'develop' into static-pages2
agallop Apr 29, 2024
2243620
Merge branch 'develop' into static-pages2
agallop May 9, 2024
ca4adc4
Add test for Google Play button
agallop May 9, 2024
c42b0bf
Fix typo
agallop May 9, 2024
a963957
Merge branch 'develop' into static-pages2
agallop May 14, 2024
db66722
Renaming symbols and more test reshuffling
agallop May 15, 2024
ec3e95b
move some constants to test-contants.ts
agallop May 15, 2024
f9da120
move some constants to test-contants.ts
agallop May 15, 2024
732e0c5
fix incorrect named symbol
agallop May 16, 2024
20d0bc2
Replace tests that where accidentaly removed when merging
agallop May 16, 2024
10d842c
Add test to click Privacy Policy link on terms page
agallop May 16, 2024
64745ca
More logged in test changes
agallop May 16, 2024
a5ce77d
Merge branch 'develop' into static-pages2
agallop May 23, 2024
117e71d
Merge branch 'develop' into static-pages2
agallop May 25, 2024
fe3887d
Change domain for twitter
agallop May 28, 2024
caba89a
Merge branch 'develop' into static-pages2
agallop Jun 4, 2024
25b69a7
Merge branch 'develop' into static-pages2
agallop Jun 4, 2024
2083045
Fix symbols for logged-out-user tests
agallop Jun 4, 2024
c44f215
minor documentation change ('logged-in' -> 'logged-out')
agallop Jun 4, 2024
e51eb96
Merge branch 'develop' into static-pages2
agallop Jun 4, 2024
cc24a11
Merge branch 'develop' into static-pages2
agallop Jun 7, 2024
d29c3d1
Merge branch 'develop' into static-pages2
agallop Jun 12, 2024
bb157f5
Remove teach page acceptance test on this branch since it exists in d…
agallop Jun 14, 2024
259b411
Merge branch 'develop' into static-pages2
agallop Jun 14, 2024
d933de7
Merge oppia footer tests into one file
agallop Jun 15, 2024
563b5d5
fix linter issues
agallop Jun 15, 2024
df540c9
Merge branch 'develop' into static-pages
agallop Jun 17, 2024
debba48
Fix footer test flake
agallop Jun 17, 2024
b68d23a
uncomment out test
agallop Jun 17, 2024
1723d35
fix acceptance test flakes
agallop Jun 17, 2024
9278745
Merge branch 'develop' into static-pages2
agallop Jun 20, 2024
85adbc3
rename click-all-links-in-terms-page test to click-all-links-on-terms…
agallop Jun 20, 2024
5ef0a85
remove extra function declaration
agallop Jun 20, 2024
252ffe7
Merge branch 'develop' into static-pages2
agallop Jun 21, 2024
1d7ba1f
Merge branch 'develop' into static-pages2
HardikGoyal2003 Jun 21, 2024
5eca30a
Merge branch 'develop' into static-pages2
agallop Jun 22, 2024
938e0bc
Merge branch 'develop' into static-pages2
agallop Jun 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -315,12 +315,19 @@ jobs:
- curriculum-admin-tests/create-and-publish-topics-and-stories
- exploration-editor-tests/load-complete-and-restart-exploration-preview
- exploration-editor-tests/create-exploration-and-change-basic-settings
- logged-in-user-tests/click-all-buttons-on-about-page
- logged-in-user-tests/click-all-buttons-on-about-foundation-page
- logged-in-user-tests/click-all-buttons-on-thanks-for-donating-page
- logged-in-user-tests/click-all-buttons-on-about-page
- logged-in-user-tests/click-all-buttons-on-navbar
- logged-in-user-tests/click-all-buttons-on-teach-page
- logged-in-user-tests/click-all-buttons-on-thanks-for-donating-page
- logged-in-user-tests/click-all-links-in-about-oppia-footer
- logged-in-user-tests/click-all-links-in-teach-learn-footer
- logged-in-user-tests/click-all-links-on-creator-guidelines-page
- logged-in-user-tests/click-all-links-on-get-started-page
- logged-in-user-tests/click-all-links-on-privacy-policy-page
- logged-in-user-tests/click-all-links-on-terms-page
- logged-in-user-tests/click-all-social-icons-in-oppia-footer
- logged-in-user-tests/click-more-links-in-oppia-footer
- practice-question-admin-tests/add-and-remove-contribution-rights
- translation-admin-tests/add-translation-rights
- translation-admin-tests/remove-translation-rights
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h1>Privacy Policy</h1>
mission, Oppia (also "we" or "us") collects some information from its
users to deliver an interactive and engaging experience. This Privacy
Policy describes the types of information we collect from users of the
Oppia website (<a href="https://www.oppia.org">https://www.oppia.org</a>)
Oppia website (<a href="/">https://www.oppia.org</a>)
(the "Site") and how Oppia collects, uses, discloses, and protects that
information. By using the Site or providing Personal Information (as
defined below) to us, you agree to this Privacy Policy.
Expand Down
2 changes: 1 addition & 1 deletion core/templates/pages/terms-page/terms-page.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ <h2>Modifications to These Terms</h2>
from time to time. If we do, we will notify you (and all our registered
Users) by sending an email to our Google Group mailing list (which you may
sign up for
<a href="https://groups.google.com/forum/#!forum/oppia-announce">here</a>).
<a href="https://groups.google.com/g/oppia-announce">here</a>).
Your continued use of the Website, including logging into your account
after such changes, indicates to us that you accept the changes and agree
to be bound by them.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export default {
CreatorDashboardCreateMode:
'http://localhost:8181/creator-dashboard?mode=create',
CreatingAnExploration: 'https://oppia.github.io/#/CreatingAnExploration',
CreatorGuidelines: 'http://localhost:8181/creator-guidelines',
Donate: 'http://localhost:8181/donate',
DonateWithThanksModal: 'http://localhost:8181/donate?thanks=',
EmbeddingAnExploration: 'https://oppia.github.io/#/EmbeddingAnExploration',
Expand All @@ -52,16 +53,31 @@ export default {
Electromagnetism: 'https://www.oppia.org/collection/wqCTKpKA0LBe',
GetStarted: 'http://localhost:8181/get-started',
Home: 'http://localhost:8181/',
LearnerDashboard: 'http://localhost:8181/learner-dashboard',
Logout: 'http://localhost:8181/logout',
MathClassroom: 'http://localhost:8181/learn/math',
MobileExternalLinkWatchAVideo:
'https://m.facebook.com/oppiaorg/videos/189487953721583/',
Partnerships: 'http://localhost:8181/partnerships',
PrivacyPolicy: 'http://localhost:8181/privacy-policy',
TopicAndSkillsDashboard:
'http://localhost:8181/topics-and-skills-dashboard',
ProgrammingWithCarla: 'https://www.oppia.org/collection/inDXV0w8-p1C',
Teach: 'http://localhost:8181/teach',
Terms: 'http://localhost:8181/terms',
Volunteer: 'http://localhost:8181/volunteer',
WelcomeToOppia: 'https://www.oppia.org/explore/0',
GoogleGroups: {
Oppia: 'https://groups.google.com/g/oppia',
OppiaAnnounce: 'https://groups.google.com/g/oppia-announce',
},
GoogleAnalytics: {
PartnerPolicies: 'https://policies.google.com/technologies/partner-sites',
OptOut: 'https://tools.google.com/dlpage/gaoptout',
},
ExternalLink: {
AboutCookies: 'https://allaboutcookies.org/how-to-manage-cookies',
},
},
Dashboard: {
MainDashboard: '.e2e-test-splash-page',
Expand Down Expand Up @@ -95,5 +111,31 @@ export default {
'../images/curriculum-admin-thumbnail.svg'
),
},
OppiaSocials: {
YouTube: {
Domain: 'youtube.com',
Id: 'UC5c1G7BNDCfv1rczcBp9FPw',
},
FaceBook: {
Domain: 'facebook.com',
Id: 'oppiaorg',
},
Instagram: {
Domain: 'instagram.com',
Id: 'oppia.global',
},
Twitter: {
Domain: 'twitter.com',
Id: 'oppiaorg',
},
Github: {
Domain: 'github.com',
Id: 'oppia',
},
LinkedIn: {
Domain: 'linkedin.com',
Id: 'oppia-org',
},
},
DEFAULT_SPEC_TIMEOUT_MSECS: 300000,
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
// Copyright 2024 The Oppia Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS-IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/**
* @fileoverview Acceptance Test for checking if logged-in users
* can click all the buttons on the "Teach" page.
*/

import {UserFactory} from '../../puppeteer-testing-utilities/user-factory';
import {LoggedInUser} from '../../user-utilities/logged-in-users-utils';
import testConstants from '../../puppeteer-testing-utilities/test-constants';

const DEFAULT_SPEC_TIMEOUT_MSECS = testConstants.DEFAULT_SPEC_TIMEOUT_MSECS;

describe('Logged-in Users', function () {
let testUser: LoggedInUser;

beforeAll(async function () {
testUser = await UserFactory.createNewUser(
'testuser',
'testuser@example.com'
);
}, DEFAULT_SPEC_TIMEOUT_MSECS);

beforeEach(async function () {
await testUser.navigateToTeachPage();
}, DEFAULT_SPEC_TIMEOUT_MSECS);

it(
'should be able to use the "Browse our Lessons" button',
async function () {
await testUser.clickBrowseOurLessonsOnTeachPage();
},
DEFAULT_SPEC_TIMEOUT_MSECS
);

it(
'should be able to use the "Access the Android app" button',
async function () {
await testUser.clickAccessTheAndroidAppOnTeachPage();
},
DEFAULT_SPEC_TIMEOUT_MSECS
);

it(
'should be able to use the "VISIT CLASSROOM" button',
async function () {
await testUser.clickVisitClassroomOnTeachPage();
},
DEFAULT_SPEC_TIMEOUT_MSECS
);

it(
'should be able to use the "BROWSE LIBRARY" button',
async function () {
await testUser.clickBrowseLibraryOnTeachPage();
},
DEFAULT_SPEC_TIMEOUT_MSECS
);

it(
'should be able to use the "EXPLORE LESSONS" button',
async function () {
await testUser.clickExploreLessonsOnTeachPage();
},
DEFAULT_SPEC_TIMEOUT_MSECS
);

afterAll(async function () {
await UserFactory.closeAllBrowsers();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -41,31 +41,31 @@ describe('Logged-in User', function () {
it(
'should open About page via the footer',
async function () {
await testUser.navigateToAboutPageViaFooter();
await testUser.clickOnAboutLinkInFooter();
},
DEFAULT_SPEC_TIMEOUT_MSECS
);

it(
'should open "About Foundation" page via the footer',
async function () {
await testUser.navigateToAboutFoundationPageViaFooter();
await testUser.clickOnTheOppiaFoundationLinkInFooter();
},
DEFAULT_SPEC_TIMEOUT_MSECS
);

it(
'should open "Blog" page via the footer',
async function () {
await testUser.navigateToBlogPageViaFooter();
await testUser.clickOnBlogLinkInFooter();
},
DEFAULT_SPEC_TIMEOUT_MSECS
);

it(
'should open "Forum" page via the footer',
async function () {
await testUser.navigateToForumPageViaFooter();
await testUser.clickOnForumLinkInFooter();
},
DEFAULT_SPEC_TIMEOUT_MSECS
);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
// Copyright 2024 The Oppia Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS-IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/**
* @fileoverview Acceptance Test for checking if logged-in users can
* navigate using all the links under the "TEACH/LEARN" footer section.
*/

import {UserFactory} from '../../puppeteer-testing-utilities/user-factory';
import {LoggedInUser} from '../../user-utilities/logged-in-users-utils';
import testConstants from '../../puppeteer-testing-utilities/test-constants';

const DEFAULT_SPEC_TIMEOUT_MSECS = testConstants.DEFAULT_SPEC_TIMEOUT_MSECS;

describe('Logged-in User', function () {
let testUser: LoggedInUser;

beforeAll(async function () {
testUser = await UserFactory.createNewUser(
'testuser',
'testuser@example.com'
);
}, DEFAULT_SPEC_TIMEOUT_MSECS);

beforeEach(async function () {
// Navigate to a page that has the oppia footer.
await testUser.navigateToAboutFoundationPage();
});

it(
'should open "Get Started" page via the footer',
async function () {
await testUser.clickOnGetStartedLinkInFooter();
},
DEFAULT_SPEC_TIMEOUT_MSECS
);

it(
'should open "Creator Guidelines" page via the footer',
async function () {
await testUser.clickOnCreatorGuidelinesLinkinFooter();
},
DEFAULT_SPEC_TIMEOUT_MSECS
);

it(
'should open "Teach" page via the footer',
async function () {
await testUser.clickOnForParentsSlashTeachersLinkInFooter();
},
DEFAULT_SPEC_TIMEOUT_MSECS
);

it(
'should open "Community Library" page via the footer',
async function () {
await testUser.clickOnBrowseTheLibraryLinkInFooter();
},
DEFAULT_SPEC_TIMEOUT_MSECS
);

it(
'should open "Contact" page via the footer',
async function () {
await testUser.clickOnContactUsLinkInFooter();
},
DEFAULT_SPEC_TIMEOUT_MSECS
);

afterAll(async function () {
await UserFactory.closeAllBrowsers();
});
});