diff --git a/.github/workflows/e2e_lighthouse_performance_acceptance_tests.yml b/.github/workflows/e2e_lighthouse_performance_acceptance_tests.yml
index 3acec5aa6a0b7..08d1cada72a68 100644
--- a/.github/workflows/e2e_lighthouse_performance_acceptance_tests.yml
+++ b/.github/workflows/e2e_lighthouse_performance_acceptance_tests.yml
@@ -312,10 +312,12 @@ jobs:
suite:
- blog-admin-tests/assign-roles-to-users-and-change-tag-properties
- blog-editor-tests/try-to-publish-a-duplicate-blog-post-and-get-blocked
+ - 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-navbar
- - logged-in-user-tests/click-all-buttons-in-about-page
- - logged-in-user-tests/click-all-buttons-in-about-foundation-page
- - logged-in-user-tests/click-all-buttons-in-thanks-for-donating-page
+ - logged-in-user-tests/click-all-links-in-about-oppia-footer
+ - logged-in-user-tests/click-all-links-on-get-started-page
- practice-question-admin-tests/add-and-remove-contribution-rights
- translation-admin-tests/add-translation-rights
- translation-admin-tests/remove-translation-rights
diff --git a/core/templates/base-components/oppia-footer.component.html b/core/templates/base-components/oppia-footer.component.html
index 16a1d7065a880..96109b38dc318 100644
--- a/core/templates/base-components/oppia-footer.component.html
+++ b/core/templates/base-components/oppia-footer.component.html
@@ -36,22 +36,26 @@
{{ 'I18N_FOOTER_NEWSLETTER_HEADING' | translate }}
-
-
-
+
-
-
+
-
-
+
@@ -69,24 +73,28 @@ {{ 'I18N_FOOTER_NEWSLETTER_HEADING' | translate }}
-
{{ 'I18N_PLAYBOOK_HEADING' | translate }}
-
{{ 'I18N_FOOTER_TEACH_PAGE' | translate }}
-
-
{{ 'I18N_FOOTER_CONTACT_US' | translate }}
diff --git a/core/tests/puppeteer-acceptance-tests/puppeteer-testing-utilities/test-constants.ts b/core/tests/puppeteer-acceptance-tests/puppeteer-testing-utilities/test-constants.ts
index b30033924dc03..bfebadf36b213 100644
--- a/core/tests/puppeteer-acceptance-tests/puppeteer-testing-utilities/test-constants.ts
+++ b/core/tests/puppeteer-acceptance-tests/puppeteer-testing-utilities/test-constants.ts
@@ -35,8 +35,10 @@ export default {
CreatorDashboard: 'http://localhost:8181/creator-dashboard',
CreatorDashboardCreateMode:
'http://localhost:8181/creator-dashboard?mode=create',
+ CreatingAnExploration: 'https://oppia.github.io/#/CreatingAnExploration',
Donate: 'http://localhost:8181/donate',
DonateWithThanksModal: 'http://localhost:8181/donate?thanks=',
+ EmbeddingAnExploration: 'https://oppia.github.io/#/EmbeddingAnExploration',
ExternalLink61MillionChildren:
'https://uis.unesco.org/en/news/world-poverty-could-be-cut-half-if-all-adults-completed-secondary-education',
ExternalLinkEvenThoseWhoAreInSchool:
@@ -45,13 +47,17 @@ export default {
'https://uis.unesco.org/en/news/new-report-how-measure-equity-education',
DesktopExternalLinkWatchAVideo:
'https://www.facebook.com/oppiaorg/videos/189487953721583/',
- MobileExternalLinkWatchAVideo:
- 'https://m.facebook.com/oppiaorg/videos/189487953721583/',
+ Electromagnetism: 'https://www.oppia.org/collection/wqCTKpKA0LBe',
+ GetStarted: 'http://localhost:8181/get-started',
Home: 'http://localhost:8181/',
Logout: 'http://localhost:8181/logout',
MathClassroom: 'http://localhost:8181/learn/math',
+ MobileExternalLinkWatchAVideo:
+ 'https://m.facebook.com/oppiaorg/videos/189487953721583/',
Partnerships: 'http://localhost:8181/partnerships',
+ ProgrammingWithCarla: 'https://www.oppia.org/collection/inDXV0w8-p1C',
Volunteer: 'http://localhost:8181/volunteer',
+ WelcomeToOppia: 'https://www.oppia.org/explore/0',
},
Dashboard: {
MainDashboard: '.e2e-test-splash-page',
diff --git a/core/tests/puppeteer-acceptance-tests/spec/logged-in-user-tests/click-all-buttons-in-about-foundation-page.spec.ts b/core/tests/puppeteer-acceptance-tests/spec/logged-in-user-tests/click-all-buttons-on-about-foundation-page.spec.ts
similarity index 100%
rename from core/tests/puppeteer-acceptance-tests/spec/logged-in-user-tests/click-all-buttons-in-about-foundation-page.spec.ts
rename to core/tests/puppeteer-acceptance-tests/spec/logged-in-user-tests/click-all-buttons-on-about-foundation-page.spec.ts
diff --git a/core/tests/puppeteer-acceptance-tests/spec/logged-in-user-tests/click-all-buttons-in-about-page.spec.ts b/core/tests/puppeteer-acceptance-tests/spec/logged-in-user-tests/click-all-buttons-on-about-page.spec.ts
similarity index 100%
rename from core/tests/puppeteer-acceptance-tests/spec/logged-in-user-tests/click-all-buttons-in-about-page.spec.ts
rename to core/tests/puppeteer-acceptance-tests/spec/logged-in-user-tests/click-all-buttons-on-about-page.spec.ts
diff --git a/core/tests/puppeteer-acceptance-tests/spec/logged-in-user-tests/click-all-buttons-in-thanks-for-donating-page.spec.ts b/core/tests/puppeteer-acceptance-tests/spec/logged-in-user-tests/click-all-buttons-on-thanks-for-donating-page.spec.ts
similarity index 100%
rename from core/tests/puppeteer-acceptance-tests/spec/logged-in-user-tests/click-all-buttons-in-thanks-for-donating-page.spec.ts
rename to core/tests/puppeteer-acceptance-tests/spec/logged-in-user-tests/click-all-buttons-on-thanks-for-donating-page.spec.ts
diff --git a/core/tests/puppeteer-acceptance-tests/spec/logged-in-user-tests/click-all-links-in-about-oppia-footer.spec.ts b/core/tests/puppeteer-acceptance-tests/spec/logged-in-user-tests/click-all-links-in-about-oppia-footer.spec.ts
new file mode 100644
index 0000000000000..dae9f9da30e52
--- /dev/null
+++ b/core/tests/puppeteer-acceptance-tests/spec/logged-in-user-tests/click-all-links-in-about-oppia-footer.spec.ts
@@ -0,0 +1,76 @@
+// 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 "About Oppia" 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 = testConstants.DEFAULT_SPEC_TIMEOUT;
+
+describe('Logged-in User', function () {
+ let testUser: LoggedInUser;
+
+ beforeAll(async function () {
+ testUser = await UserFactory.createNewUser(
+ 'testuser',
+ 'testuser@example.com'
+ );
+ }, DEFAULT_SPEC_TIMEOUT);
+
+ beforeEach(async function () {
+ // Navigate to a page that has the oppia footer.
+ await testUser.goto(testConstants.URLs.Volunteer);
+ });
+
+ it(
+ 'should open About page via the footer',
+ async function () {
+ await testUser.navigateToAboutPageViaFooter();
+ },
+ DEFAULT_SPEC_TIMEOUT
+ );
+
+ it(
+ 'should open "About Foundation" page via the footer',
+ async function () {
+ await testUser.navigateToAboutFoundationPageViaFooter();
+ },
+ DEFAULT_SPEC_TIMEOUT
+ );
+
+ it(
+ 'should open "Blog" page via the footer',
+ async function () {
+ await testUser.navigateToBlogPageViaFooter();
+ },
+ DEFAULT_SPEC_TIMEOUT
+ );
+
+ it(
+ 'should open "Forum" page via the footer',
+ async function () {
+ await testUser.navigateToForumPageViaFooter();
+ },
+ DEFAULT_SPEC_TIMEOUT
+ );
+
+ afterAll(async function () {
+ await UserFactory.closeAllBrowsers();
+ });
+});
diff --git a/core/tests/puppeteer-acceptance-tests/spec/logged-in-user-tests/click-all-links-on-get-started-page.spec.ts b/core/tests/puppeteer-acceptance-tests/spec/logged-in-user-tests/click-all-links-on-get-started-page.spec.ts
new file mode 100644
index 0000000000000..cc1f114d0a2a8
--- /dev/null
+++ b/core/tests/puppeteer-acceptance-tests/spec/logged-in-user-tests/click-all-links-on-get-started-page.spec.ts
@@ -0,0 +1,110 @@
+// 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 open all the links on the "Get Started" 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 = testConstants.DEFAULT_SPEC_TIMEOUT;
+
+describe('Logged-in Users', function () {
+ let testUser: LoggedInUser;
+
+ beforeAll(async function () {
+ testUser = await UserFactory.createNewUser(
+ 'testuser',
+ 'testuser@example.com'
+ );
+ }, DEFAULT_SPEC_TIMEOUT);
+
+ it(
+ 'should be able to navigate to the Get Started page using the footer',
+ async function () {
+ await testUser.navigateToAboutFoundationPage();
+ await testUser.navigateToGetStartedPageViaFooter();
+ },
+ DEFAULT_SPEC_TIMEOUT
+ );
+
+ describe('on the Get Started page', function () {
+ beforeEach(async function () {
+ await testUser.navigateToGetStartedPage();
+ }, DEFAULT_SPEC_TIMEOUT);
+
+ it(
+ 'should be able to use the "create one here" link',
+ async function () {
+ await testUser.clickCreateOneHereLinkInGetStartedPage();
+ },
+ DEFAULT_SPEC_TIMEOUT
+ );
+
+ it(
+ 'should be able to use the "Welcome to Oppia" link',
+ async function () {
+ await testUser.clickWelcomeToOppiaLinkInGetStartedPage();
+ },
+ DEFAULT_SPEC_TIMEOUT
+ );
+
+ it(
+ 'should be able to use the "Get Electrified!" link',
+ async function () {
+ await testUser.clickGetElectrifiedLinkInGetStartedPage();
+ },
+ DEFAULT_SPEC_TIMEOUT
+ );
+
+ it(
+ 'should be able to use the "Programming with Carla" link',
+ async function () {
+ await testUser.clickProgrammingWithCarlaLinkInGetStartedPage();
+ },
+ DEFAULT_SPEC_TIMEOUT
+ );
+
+ it(
+ 'should be able to use "in our user documentation" link',
+ async function () {
+ await testUser.clickInOurUserDocumentationLinkInGetStartedPage();
+ },
+ DEFAULT_SPEC_TIMEOUT
+ );
+
+ it(
+ 'should be able to use the "embed it in your own web page" link',
+ async function () {
+ await testUser.clickEmbedItInYourOwnWebPageLinkInGetStartedPage();
+ },
+ DEFAULT_SPEC_TIMEOUT
+ );
+
+ it(
+ 'should be able to use the "discover more ways to get involved" link',
+ async function () {
+ await testUser.clickDiscoverMoreWaysToGetInvolvedLinkInGetStartedPage();
+ },
+ DEFAULT_SPEC_TIMEOUT
+ );
+
+ afterAll(async function () {
+ await UserFactory.closeAllBrowsers();
+ });
+ });
+});
diff --git a/core/tests/puppeteer-acceptance-tests/user-utilities/logged-in-users-utils.ts b/core/tests/puppeteer-acceptance-tests/user-utilities/logged-in-users-utils.ts
index d512043e01b2a..1fc2ce31dbaf2 100644
--- a/core/tests/puppeteer-acceptance-tests/user-utilities/logged-in-users-utils.ts
+++ b/core/tests/puppeteer-acceptance-tests/user-utilities/logged-in-users-utils.ts
@@ -41,6 +41,12 @@ const _420MillionUrl = testConstants.URLs.ExternalLink61MillionChildren;
const thanksForDonatingUrl = testConstants.URLs.DonateWithThanksModal;
const desktopWatchAVideoUrl = testConstants.URLs.DesktopExternalLinkWatchAVideo;
const mobileWatchAVideoUrl = testConstants.URLs.MobileExternalLinkWatchAVideo;
+const getStartedUrl = testConstants.URLs.GetStarted;
+const welcomeToOppiaUrl = testConstants.URLs.WelcomeToOppia;
+const electromagnetismUrl = testConstants.URLs.Electromagnetism;
+const programmingWithCarlaUrl = testConstants.URLs.ProgrammingWithCarla;
+const creatingAnExplorationUrl = testConstants.URLs.CreatingAnExploration;
+const embeddingAnExplorationUrl = testConstants.URLs.EmbeddingAnExploration;
const navbarAboutTab = 'a.e2e-test-navbar-about-menu';
const navbarAboutTabAboutButton = 'a.e2e-test-about-link';
@@ -58,6 +64,12 @@ const navbarGetInvolvedTabContactUsButton =
'a.e2e-test-navbar-get-involved-menu-contact-us-button';
const navbarDonateButton = 'a.e2e-test-navbar-donate-button';
+const footerAboutLink = 'a.e2e-test-footer-about-link';
+const footerAboutFoundationLink = 'a.e2e-test-footer-about-foundation-link';
+const footerBlogLink = 'a.e2e-test-footer-blog-link';
+const footerForumlink = 'a.e2e-test-footer-forum-link';
+const footerGetStartedLink = 'a.e2e-test-get-started-link';
+
const browseOurLessonsButton = '.e2e-test-about-page-browse-our-lessons-button';
const accessAndroidAppButton = '.e2e-test-about-page-access-android-app-button';
const visitClassroomButton = '.e2e-test-about-page-visit-classroom-button';
@@ -133,6 +145,13 @@ export class LoggedInUser extends BaseUser {
]);
}
+ /**
+ * Function to navigate to the Get Started page.
+ */
+ async navigateToGetStartedPage(): Promise {
+ await this.goto(getStartedUrl);
+ }
+
/**
* Function to click a button and check if it opens the expected destination.
*/
@@ -143,23 +162,12 @@ export class LoggedInUser extends BaseUser {
expectedDestinationPageName: string
): Promise {
await Promise.all([this.page.waitForNavigation(), this.clickOn(button)]);
- if (this.page.url() !== expectedDestinationPageUrl) {
- throw new Error(
- 'The ' +
- buttonName +
- ' does not open the ' +
- expectedDestinationPageName +
- ' page!'
- );
- } else {
- showMessage(
- 'The ' +
- buttonName +
- ' opens the ' +
- expectedDestinationPageName +
- ' page.'
- );
- }
+
+ expect(this.page.url())
+ .withContext(
+ `${buttonName} should open the ${expectedDestinationPageName} page`
+ )
+ .toBe(expectedDestinationPageUrl);
}
/**
@@ -727,6 +735,163 @@ export class LoggedInUser extends BaseUser {
);
}
}
+
+ /**
+ * Navigates to the About page using the oppia website footer.
+ */
+ async navigateToAboutPageViaFooter(): Promise {
+ await this.clickButtonToNavigateToNewPage(
+ footerAboutLink,
+ 'About Oppia link in the About Oppia section in the footer',
+ aboutUrl,
+ 'About'
+ );
+ }
+ /**
+ * Navigates to the About Foundation page using the oppia website footer.
+ */
+ async navigateToAboutFoundationPageViaFooter(): Promise {
+ await this.clickButtonToNavigateToNewPage(
+ footerAboutFoundationLink,
+ 'About Foundation link in the About Oppia section in the footer',
+ aboutFoundationUrl,
+ 'About Foundation'
+ );
+ }
+ /**
+ * Navigates to the Blog page using the oppia website footer.
+ */
+ async navigateToBlogPageViaFooter(): Promise {
+ await this.clickButtonToNavigateToNewPage(
+ footerBlogLink,
+ 'Blog link in the About Oppia section in the footer',
+ blogUrl,
+ 'Blog'
+ );
+ }
+
+ /**
+ * Navigates to the Forum page using the oppia website footer.
+ */
+ async navigateToForumPageViaFooter(): Promise {
+ await Promise.all([
+ this.page.waitForNavigation(),
+ await this.clickOn(footerForumlink),
+ ]);
+
+ expect(this.page.url()).toBe('https://groups.google.com/g/oppia');
+ }
+
+ /**
+ * Navigates to the GetStarted page using the oppia website footer.
+ */
+ async navigateToGetStartedPageViaFooter(): Promise {
+ await this.page.waitForSelector(footerGetStartedLink);
+ await this.clickButtonToNavigateToNewPage(
+ footerGetStartedLink,
+ 'About Oppia button in the About Menu on navbar',
+ getStartedUrl,
+ 'Get Started'
+ );
+ }
+
+ /**
+ * Function to click an anchor tag and check if it opens the expected destination
+ * in a new tab. Closes the tab afterwards.
+ */
+ private async clickLinkAnchorToNewTab(
+ anchorInnerText: string,
+ expectedDestinationPageUrl: string
+ ): Promise {
+ await this.page.waitForXPath(`//a[contains(text(),"${anchorInnerText}")]`);
+ const pageTarget = this.page.target();
+ await this.clickOn(anchorInnerText);
+ const newTarget = await this.browserObject.waitForTarget(
+ target => target.opener() === pageTarget
+ );
+ const newTabPage = await newTarget.page();
+ expect(newTabPage).toBeDefined();
+ expect(newTabPage?.url()).toBe(expectedDestinationPageUrl);
+ await newTabPage?.close();
+ }
+
+ /**
+ * Clicks the link with the text "create on here" on the Get Stated page.
+ */
+ async clickCreateOneHereLinkInGetStartedPage(): Promise {
+ await this.page.waitForXPath('//a[contains(text(),"create one here")]');
+ const pageTarget = this.page.target();
+ await this.clickOn('create one here');
+ const newTarget = await this.browserObject.waitForTarget(
+ target => target.opener() === pageTarget
+ );
+ const newTabPage = await newTarget.page();
+ await newTabPage?.waitForNetworkIdle();
+ expect(newTabPage?.url()).toContain(
+ 'https://accounts.google.com/lifecycle/steps/signup/name'
+ );
+ await newTabPage?.close();
+ }
+
+ /**
+ * Clicks the link with the text "Welcome to Oppia" on the Get Stated page.
+ */
+ async clickWelcomeToOppiaLinkInGetStartedPage(): Promise {
+ await this.clickLinkAnchorToNewTab('Welcome to Oppia', welcomeToOppiaUrl);
+ }
+
+ /**
+ * Clicks the link with the text "Get Electrified!" on the Get Stated page.
+ */
+ async clickGetElectrifiedLinkInGetStartedPage(): Promise {
+ await this.clickLinkAnchorToNewTab('Get Electrified!', electromagnetismUrl);
+ }
+
+ /**
+ * Clicks the link with the text "Programming with Carla" on the Get Stated page.
+ */
+ async clickProgrammingWithCarlaLinkInGetStartedPage(): Promise {
+ await this.clickLinkAnchorToNewTab(
+ 'Programming with Carla',
+ programmingWithCarlaUrl
+ );
+ }
+
+ /**
+ * Clicks the link with the text "in our user documentation" on the Get Stated page.
+ */
+ async clickInOurUserDocumentationLinkInGetStartedPage(): Promise {
+ await this.clickLinkAnchorToNewTab(
+ 'in our user documentation',
+ creatingAnExplorationUrl
+ );
+ }
+
+ /**
+ * Clicks the link with the text "embed it in your own web page" on the Get Stated page.
+ */
+ async clickEmbedItInYourOwnWebPageLinkInGetStartedPage(): Promise {
+ await this.clickLinkAnchorToNewTab(
+ 'embed it in your own web page',
+ embeddingAnExplorationUrl
+ );
+ }
+
+ /**
+ * Clicks the link with the text "discover more ways to get involved" on the Get Stated page.
+ */
+ async clickDiscoverMoreWaysToGetInvolvedLinkInGetStartedPage(): Promise {
+ await this.page.waitForXPath(
+ '//a[contains(text(),"discover more ways to get involved")]'
+ );
+
+ await Promise.all([
+ this.page.waitForNavigation(),
+ await this.clickOn('discover more ways to get involved'),
+ ]);
+
+ expect(this.page.url()).toBe(contactUrl);
+ }
}
export let LoggedInUserFactory = (): LoggedInUser => new LoggedInUser();
diff --git a/scripts/common.py b/scripts/common.py
index 3ace6aa720b28..83101d3f55515 100644
--- a/scripts/common.py
+++ b/scripts/common.py
@@ -198,6 +198,7 @@
# Unix.
'/usr/bin/google-chrome',
'/usr/bin/chromium-browser',
+ '/usr/bin/google-chrome-stable',
# Arch Linux.
'/usr/bin/brave',
'/usr/bin/chromium',
@@ -213,10 +214,12 @@
ACCEPTANCE_TESTS_SUITE_NAMES = [
'blog-admin-tests/assign-roles-to-users-and-change-tag-properties',
'blog-editor-tests/try-to-publish-a-duplicate-blog-post-and-get-blocked',
+ '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-navbar',
- 'logged-in-user-tests/click-all-buttons-in-about-page',
- 'logged-in-user-tests/click-all-buttons-in-about-foundation-page',
- 'logged-in-user-tests/click-all-buttons-in-thanks-for-donating-page',
+ 'logged-in-user-tests/click-all-links-in-about-oppia-footer',
+ 'logged-in-user-tests/click-all-links-on-get-started-page',
'practice-question-admin-tests/add-and-remove-contribution-rights',
'translation-admin-tests/add-translation-rights',
'translation-admin-tests/remove-translation-rights'