-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
) * Footer navigation logged-in user tests progress * Click all buttons on get started page done * logged in users get started page test refactoring * click all about oppia footer buttons test working * Lint fixes * Lint fixes * Lint fixes * null-safety * Add /usr/bin/google-chrome-stable as possible CHROME_BIN path * click all about oppia footer buttons changes * Fix some flakiness for logged in user acceptance tests * Remove extra space * Matcher changes for logged-in-users-utils * Swap ` with \' on non-format string * Swaping a .toContain to a .toBe * Rename of some logged in user tests and restructuring of the click all likns on get started page spec * Click all links on creator guidelines page acceptance test * More logged-in user test progress * Logged in user tests for teach and terms pages * logged-in-user-utils constant changes * Logged-in users Social icons and privacy page tests * Fix linter errors * Last logged-in users test * remove duplicate member from logged-in-user-utils * logged in user test documentation updates * fix broken acceptance test, logged-in-user-tests/click-all-links-on-get-started-page * Attempt to lower flakiness of following links to social media sites * Remove extra dash in acceptance suite name * Fix typos in logged-in-user-tests * Footer icon click functions renames * Add missing function documentation * Remove some empty lines * Add new test suite * move tests into click-all-links-in-teach-learn-footer spec * Rename some logged-in-user-util functions * fix logged-in-user-tests/click-all-buttons-on-teach-page.spec.ts * Add test for Google Play button * Fix typo * Renaming symbols and more test reshuffling * move some constants to test-contants.ts * move some constants to test-contants.ts * fix incorrect named symbol * Replace tests that where accidentaly removed when merging * Add test to click Privacy Policy link on terms page * More logged in test changes * Change domain for twitter * Fix symbols for logged-out-user tests * minor documentation change ('logged-in' -> 'logged-out') * Remove teach page acceptance test on this branch since it exists in develop already * Merge oppia footer tests into one file * fix linter issues * Fix footer test flake * uncomment out test * fix acceptance test flakes * rename click-all-links-in-terms-page test to click-all-links-on-terms-page * remove extra function declaration --------- Co-authored-by: Hardik Goyal <135348086+HardikGoyal2003@users.noreply.github.com>
- Loading branch information
1 parent
6ea9212
commit 58c14ca
Showing
14 changed files
with
803 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
201 changes: 201 additions & 0 deletions
201
.../puppeteer-acceptance-tests/specs/logged-out-user/click-all-links-in-oppia-footer.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,201 @@ | ||
// 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-out users can | ||
* navigate using all the links under the "About Oppia" footer section. | ||
*/ | ||
|
||
import {UserFactory} from '../../utilities/common/user-factory'; | ||
import testConstants from '../../utilities/common/test-constants'; | ||
import {LoggedOutUser} from '../../utilities/user/logged-out-user'; | ||
|
||
const DEFAULT_SPEC_TIMEOUT_MSECS = testConstants.DEFAULT_SPEC_TIMEOUT_MSECS; | ||
|
||
describe('Logged-out Users', function () { | ||
let loggedOutUser: LoggedOutUser; | ||
|
||
beforeAll(async function () { | ||
loggedOutUser = await UserFactory.createLoggedOutUser(); | ||
}, DEFAULT_SPEC_TIMEOUT_MSECS); | ||
|
||
beforeEach(async function () { | ||
// Navigate to a page that has the oppia footer. | ||
await loggedOutUser.navigateToHome(); | ||
}, DEFAULT_SPEC_TIMEOUT_MSECS); | ||
|
||
it( | ||
'should open "Donate" page via the footer', | ||
async function () { | ||
await loggedOutUser.clickOnDonateLinkInFooter(); | ||
}, | ||
DEFAULT_SPEC_TIMEOUT_MSECS | ||
); | ||
|
||
it( | ||
'should open the "Volunteer" page via the footer', | ||
async function () { | ||
await loggedOutUser.clickOnVolunteerLinkInFooter(); | ||
}, | ||
DEFAULT_SPEC_TIMEOUT_MSECS | ||
); | ||
|
||
it( | ||
'should open "About" page via the footer', | ||
async function () { | ||
await loggedOutUser.clickOnAboutLinkInFooter(); | ||
}, | ||
DEFAULT_SPEC_TIMEOUT_MSECS | ||
); | ||
|
||
it( | ||
'should open "About Foundation" page via the footer', | ||
async function () { | ||
await loggedOutUser.clickOnAboutLinkInFooter(); | ||
}, | ||
DEFAULT_SPEC_TIMEOUT_MSECS | ||
); | ||
|
||
it( | ||
'should open "Blog" page via the footer', | ||
async function () { | ||
await loggedOutUser.clickOnBlogLinkInFooter(); | ||
}, | ||
DEFAULT_SPEC_TIMEOUT_MSECS | ||
); | ||
|
||
it( | ||
'should open "Forum" page via the footer', | ||
async function () { | ||
await loggedOutUser.clickOnForumLinkInFooter(); | ||
}, | ||
DEFAULT_SPEC_TIMEOUT_MSECS | ||
); | ||
|
||
it( | ||
'should open "Get Started" page via the footer', | ||
async function () { | ||
await loggedOutUser.clickOnGetStartedLinkInFooter(); | ||
}, | ||
DEFAULT_SPEC_TIMEOUT_MSECS | ||
); | ||
|
||
it( | ||
'should open "Creator Guidelines" page via the footer', | ||
async function () { | ||
await loggedOutUser.clickOnCreatorGuidelinesLinkinFooter(); | ||
}, | ||
DEFAULT_SPEC_TIMEOUT_MSECS | ||
); | ||
|
||
it( | ||
'should open "Teach" page via the footer', | ||
async function () { | ||
await loggedOutUser.clickOnForParentsSlashTeachersLinkInFooter(); | ||
}, | ||
DEFAULT_SPEC_TIMEOUT_MSECS | ||
); | ||
|
||
it( | ||
'should open "Community Library" page via the footer', | ||
async function () { | ||
await loggedOutUser.clickOnBrowseTheLibraryLinkInFooter(); | ||
}, | ||
DEFAULT_SPEC_TIMEOUT_MSECS | ||
); | ||
|
||
it( | ||
'should open "Contact" page via the footer', | ||
async function () { | ||
await loggedOutUser.clickOnContactUsLinkInFooter(); | ||
}, | ||
DEFAULT_SPEC_TIMEOUT_MSECS | ||
); | ||
|
||
it( | ||
'should be able to visit the Oppia YouTube', | ||
async function () { | ||
await loggedOutUser.clickYouTubeIconInFooter(); | ||
}, | ||
DEFAULT_SPEC_TIMEOUT_MSECS | ||
); | ||
|
||
it( | ||
'should be able to visit the Oppia Facebook', | ||
async function () { | ||
await loggedOutUser.clickFacebookIconInFooter(); | ||
}, | ||
DEFAULT_SPEC_TIMEOUT_MSECS | ||
); | ||
|
||
it( | ||
'should be able to visit the Oppia Instagram', | ||
async function () { | ||
await loggedOutUser.clickInstagramIconInFooter(); | ||
}, | ||
DEFAULT_SPEC_TIMEOUT_MSECS | ||
); | ||
|
||
it( | ||
'should be able to visit the Oppia Twitter', | ||
async function () { | ||
await loggedOutUser.clickTwitterIconInFooter(); | ||
}, | ||
DEFAULT_SPEC_TIMEOUT_MSECS | ||
); | ||
|
||
it( | ||
'should be able to visit the Oppia Github', | ||
async function () { | ||
await loggedOutUser.clickGithubIconInFooter(); | ||
}, | ||
DEFAULT_SPEC_TIMEOUT_MSECS | ||
); | ||
|
||
it( | ||
'should be able to visit the Oppia LinkedIn', | ||
async function () { | ||
await loggedOutUser.clickLinkedInIconInFooter(); | ||
}, | ||
DEFAULT_SPEC_TIMEOUT_MSECS | ||
); | ||
|
||
it( | ||
'should be able to visit the Oppia Google Play page', | ||
async function () { | ||
await loggedOutUser.clickGooglePlayButtonInFooter(); | ||
}, | ||
DEFAULT_SPEC_TIMEOUT_MSECS | ||
); | ||
|
||
it( | ||
'should open "Terms of Service" page via the footer', | ||
async function () { | ||
await loggedOutUser.clickOnTermsOfServiceLinkInFooter(); | ||
}, | ||
DEFAULT_SPEC_TIMEOUT_MSECS | ||
); | ||
|
||
it( | ||
'should open "Privacy Policy" page via the footer', | ||
async function () { | ||
await loggedOutUser.clickOnPrivacyPolicyLinkInFooter(); | ||
}, | ||
DEFAULT_SPEC_TIMEOUT_MSECS | ||
); | ||
|
||
afterAll(async function () { | ||
await UserFactory.closeAllBrowsers(); | ||
}); | ||
}); |
75 changes: 75 additions & 0 deletions
75
...acceptance-tests/specs/logged-out-user/click-all-links-on-creator-guidelines-page.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
// 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-out users | ||
* can open all the links on the "Creator Guidelines" page. | ||
*/ | ||
|
||
import {UserFactory} from '../../utilities/common/user-factory'; | ||
import testConstants from '../../utilities/common/test-constants'; | ||
import {LoggedOutUser} from '../../utilities/user/logged-out-user'; | ||
|
||
const DEFAULT_SPEC_TIMEOUT = testConstants.DEFAULT_SPEC_TIMEOUT_MSECS; | ||
|
||
describe('Logged-out Users', function () { | ||
let testUser: LoggedOutUser; | ||
|
||
beforeAll(async function () { | ||
testUser = await UserFactory.createNewUser( | ||
'testuser', | ||
'testuser@example.com' | ||
); | ||
}, DEFAULT_SPEC_TIMEOUT); | ||
|
||
beforeEach(async function () { | ||
await testUser.navigateToCreatorGuidelinesPage(); | ||
}, DEFAULT_SPEC_TIMEOUT); | ||
|
||
it( | ||
'should be able to use the "forum" link', | ||
async function () { | ||
await testUser.clickForumLinkOnCreatorGuidelinesPage(); | ||
}, | ||
DEFAULT_SPEC_TIMEOUT | ||
); | ||
|
||
it( | ||
'should be able to use the "Design Tips" link', | ||
async function () { | ||
await testUser.clickDesignTipsLinkOnCreatorGuidelinesPage(); | ||
}, | ||
DEFAULT_SPEC_TIMEOUT | ||
); | ||
|
||
it( | ||
'should be able to use the "Create an Exploration" link', | ||
async function () { | ||
await testUser.clickCreateAnExplorationLinkOnCreatorGuidelinesPage(); | ||
}, | ||
DEFAULT_SPEC_TIMEOUT | ||
); | ||
|
||
it( | ||
'should be able to use the "Browse our Expectations" link', | ||
async function () { | ||
await testUser.clickBrowseOurExpectationsLinkOnCreatorGuidelinesPage(); | ||
}, | ||
DEFAULT_SPEC_TIMEOUT | ||
); | ||
|
||
afterAll(async function () { | ||
await UserFactory.closeAllBrowsers(); | ||
}); | ||
}); |
Oops, something went wrong.