From 60e18a28b76529ded4a63c16e6376150d2d7e1b3 Mon Sep 17 00:00:00 2001 From: rahat2134 Date: Tue, 23 Apr 2024 22:07:30 +0530 Subject: [PATCH 01/20] saveDraft spec --- ...ighthouse_performance_acceptance_tests.yml | 3 +- ...ft-publish-and-discard-the-changes.spec.ts | 86 +++++++++++++++++++ .../exploration-editor-utils.ts | 35 ++++++-- scripts/common.py | 1 + 4 files changed, 119 insertions(+), 6 deletions(-) create mode 100644 core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/savedraft-publish-and-discard-the-changes.spec.ts diff --git a/.github/workflows/e2e_lighthouse_performance_acceptance_tests.yml b/.github/workflows/e2e_lighthouse_performance_acceptance_tests.yml index 156bd394d817..056f66ebaec7 100644 --- a/.github/workflows/e2e_lighthouse_performance_acceptance_tests.yml +++ b/.github/workflows/e2e_lighthouse_performance_acceptance_tests.yml @@ -312,8 +312,9 @@ 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 - - exploration-editor-tests/load-complete-and-restart-exploration-preview - exploration-editor-tests/create-exploration-and-change-basic-settings + - exploration-editor-tests/load-complete-and-restart-exploration-preview + - exploration-editor-tests/savedraft-publish-and-discard-the-changes - 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 diff --git a/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/savedraft-publish-and-discard-the-changes.spec.ts b/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/savedraft-publish-and-discard-the-changes.spec.ts new file mode 100644 index 000000000000..db2697eeffc7 --- /dev/null +++ b/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/savedraft-publish-and-discard-the-changes.spec.ts @@ -0,0 +1,86 @@ +// 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 Exploration Creator and Exploration Manager + */ + +import {showMessage} from '../../puppeteer-testing-utilities/show-message-utils'; +import testConstants from '../../puppeteer-testing-utilities/test-constants'; +import {UserFactory} from '../../puppeteer-testing-utilities/user-factory'; +import {ExplorationEditor} from '../../user-utilities/exploration-editor-utils'; + +const DEFAULT_SPEC_TIMEOUT_MSECS = testConstants.DEFAULT_SPEC_TIMEOUT_MSECS; +enum INTERACTION_TYPES { + END_EXPLORATION = 'End Exploration', +} + +describe('Exploration Creator', function () { + let explorationEditor: ExplorationEditor; + let explorationVisitor: ExplorationEditor; + let explorationId: string | null; + beforeAll(async function () { + explorationEditor = await UserFactory.createNewUser( + 'explorationEditor', + 'exploration_editor@example.com' + ); + showMessage('explorationEditor is signed up successfully.'); + + explorationVisitor = await UserFactory.createNewUser( + 'explorationVisitor', + 'exploration_visitor@example.com' + ); + showMessage('explorationVisitor is signed up successfully.'); + }, DEFAULT_SPEC_TIMEOUT_MSECS); + + it( + 'should draft, discard and publish the changes', + async function () { + await explorationEditor.navigateToCreatorDashboardPage(); + await explorationEditor.navigateToExplorationEditorPage(); + await explorationEditor.dismissWelcomeModal(); + + await explorationEditor.createExplorationWithMinimumContent( + 'Exploration intro text', + INTERACTION_TYPES.END_EXPLORATION + ); + + await explorationEditor.saveExplorationDraft(); + explorationId = await explorationEditor.publishExplorationWithContent( + 'Old Title', + 'OppiaAcceptanceTestsCheck', + 'Algebra' + ); + + await explorationEditor.navigateToSettingsTab(); + + await explorationEditor.updateTitleTo('New Title'); + await explorationEditor.discardCurrentChanges(); + await explorationEditor.expectTitleToBe('Old Title'); + + await explorationEditor.updateTitleTo('New Title'); + await explorationEditor.saveExplorationDraft(); + await explorationEditor.expectTitleToBe('New Title'); + + await explorationVisitor.expectExplorationToBeAccessibleByUrl( + explorationId + ); + }, + DEFAULT_SPEC_TIMEOUT_MSECS + ); + + afterAll(async function () { + await UserFactory.closeAllBrowsers(); + }); +}); diff --git a/core/tests/puppeteer-acceptance-tests/user-utilities/exploration-editor-utils.ts b/core/tests/puppeteer-acceptance-tests/user-utilities/exploration-editor-utils.ts index 2761db5ef169..d660b2f70d2c 100644 --- a/core/tests/puppeteer-acceptance-tests/user-utilities/exploration-editor-utils.ts +++ b/core/tests/puppeteer-acceptance-tests/user-utilities/exploration-editor-utils.ts @@ -34,6 +34,7 @@ const saveChangesButton = 'button.e2e-test-save-changes'; // Settings Tab elements. const settingsTab = 'a.e2e-test-exploration-settings-tab'; const addTitleBar = 'input#explorationTitle'; +const explorationTitleSelector = '.e2e-test-exploration-title-input'; const addGoalInputBox = '.e2e-test-exploration-objective-input'; const categoryDropdown = 'mat-select.e2e-test-exploration-category-dropdown'; const languageUpdateDropdown = @@ -150,8 +151,14 @@ export class ExplorationEditor extends BaseUser { */ async navigateToSettingsTab(): Promise { if (this.isViewportAtMobileWidth()) { - await this.page.waitForSelector(mobileOptionsButton, {visible: true}); - await this.clickOn(mobileOptionsButton); + const element = await this.page.$(mobileNavbarDropdown); + // If the element is not present, it means the mobile navigation bar is not expanded. + // The option to settings tab appears only in the mobile view after clicking on the mobile options button, + // which expands the mobile navigation bar. + if (!element) { + await this.page.waitForSelector(mobileOptionsButton, {visible: true}); + await this.clickOn(mobileOptionsButton); + } await this.clickOn(mobileNavbarDropdown); await this.clickOn(mobileSettingsBar); @@ -262,9 +269,26 @@ export class ExplorationEditor extends BaseUser { * Deletes the previous written title and updates the new title. */ async updateTitleTo(title: string): Promise { + await this.page.waitForSelector(explorationTitleSelector); + const titleInput = await this.page.$(explorationTitleSelector); + const oldTitle = await this.page.evaluate(input => input.value, titleInput); await this.clearAllTextFrom(addTitleBar); await this.type(addTitleBar, title); await this.page.keyboard.press('Tab'); + if (oldTitle !== title) { + if (this.isViewportAtMobileWidth()) { + // Navbar text is hidden in mobile view port due to less screen so there is no visible + // change in UI after we update the input bar. Hence we need to explicitly wait for 2 sec. + await this.page.waitForTimeout(2000); + } else { + await this.page.waitForSelector('span.e2e-test-autosave-indicator', { + visible: true, + }); + await this.page.waitForSelector('span.e2e-test-autosave-indicator', { + hidden: true, + }); + } + } showMessage(`Title has been updated to ${title}`); } @@ -272,8 +296,8 @@ export class ExplorationEditor extends BaseUser { * Matches the expected title with current title. */ async expectTitleToBe(expectedTitle: string): Promise { - await this.page.waitForSelector('.e2e-test-exploration-title-input'); - const titleInput = await this.page.$('.e2e-test-exploration-title-input'); + await this.page.waitForSelector(explorationTitleSelector); + const titleInput = await this.page.$(explorationTitleSelector); const currentTitle = await this.page.evaluate( input => input.value, titleInput @@ -650,8 +674,9 @@ export class ExplorationEditor extends BaseUser { }); await Promise.all([ this.clickOn(confirmDiscardButton), - this.page.waitForNavigation(), + this.page.waitForNavigation({waitUntil: 'networkidle0'}), ]); + await this.page.waitForFunction('document.readyState === "complete"'); if (this.isViewportAtMobileWidth()) { await this.clickOn(mobileOptionsButton); await this.clickOn(basicSettingsDropdown); diff --git a/scripts/common.py b/scripts/common.py index 6db9a35ce66d..769eedf6cad8 100644 --- a/scripts/common.py +++ b/scripts/common.py @@ -216,6 +216,7 @@ 'blog-editor-tests/try-to-publish-a-duplicate-blog-post-and-get-blocked', 'exploration-editor-tests/create-exploration-and-change-basic-settings', 'exploration-editor-tests/load-complete-and-restart-exploration-preview', + 'exploration-editor-tests/savedraft-publish-and-discard-the-changes', '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', From 35fd53481ee3e096b71308c2821535a2dbb5f891 Mon Sep 17 00:00:00 2001 From: rahat2134 Date: Tue, 23 Apr 2024 22:27:43 +0530 Subject: [PATCH 02/20] change --- .../create-exploration-and-change-basic-settings.spec.ts | 2 +- .../savedraft-publish-and-discard-the-changes.spec.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/create-exploration-and-change-basic-settings.spec.ts b/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/create-exploration-and-change-basic-settings.spec.ts index ddc986bd9578..ba750f02f59a 100644 --- a/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/create-exploration-and-change-basic-settings.spec.ts +++ b/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/create-exploration-and-change-basic-settings.spec.ts @@ -13,7 +13,7 @@ // limitations under the License. /** - * @fileoverview Acceptance Test for Exploration Creator and Exploration Manager + * @fileoverview Acceptance Test for settings tab in exploration editor. */ import {ConsoleReporter} from '../../puppeteer-testing-utilities/console-reporter'; diff --git a/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/savedraft-publish-and-discard-the-changes.spec.ts b/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/savedraft-publish-and-discard-the-changes.spec.ts index db2697eeffc7..9bbaad0a1e53 100644 --- a/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/savedraft-publish-and-discard-the-changes.spec.ts +++ b/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/savedraft-publish-and-discard-the-changes.spec.ts @@ -13,7 +13,7 @@ // limitations under the License. /** - * @fileoverview Acceptance Test for Exploration Creator and Exploration Manager + * @fileoverview Acceptance Test for savedraft, publish and discard the changes. */ import {showMessage} from '../../puppeteer-testing-utilities/show-message-utils'; From 8acdeb17e43eb2d99052f9d313b61f1b9c107dd3 Mon Sep 17 00:00:00 2001 From: rahat2134 Date: Tue, 23 Apr 2024 23:11:12 +0530 Subject: [PATCH 03/20] change --- .../user-utilities/exploration-editor-utils.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/tests/puppeteer-acceptance-tests/user-utilities/exploration-editor-utils.ts b/core/tests/puppeteer-acceptance-tests/user-utilities/exploration-editor-utils.ts index d660b2f70d2c..ed8340174e1d 100644 --- a/core/tests/puppeteer-acceptance-tests/user-utilities/exploration-editor-utils.ts +++ b/core/tests/puppeteer-acceptance-tests/user-utilities/exploration-editor-utils.ts @@ -275,10 +275,13 @@ export class ExplorationEditor extends BaseUser { await this.clearAllTextFrom(addTitleBar); await this.type(addTitleBar, title); await this.page.keyboard.press('Tab'); + // Auto save pop up bar is visible only when current input is different from + // old input. if (oldTitle !== title) { if (this.isViewportAtMobileWidth()) { // Navbar text is hidden in mobile view port due to less screen so there is no visible - // change in UI after we update the input bar. Hence we need to explicitly wait for 2 sec. + // change in the UI (specially Auto save pop up bar) after we update the input bar. + // Hence we need to explicitly wait for 2 seconds. await this.page.waitForTimeout(2000); } else { await this.page.waitForSelector('span.e2e-test-autosave-indicator', { From e892a7470841ab611abefeec3e12f5c70a05fa3f Mon Sep 17 00:00:00 2001 From: rahat2134 Date: Wed, 24 Apr 2024 00:38:12 +0530 Subject: [PATCH 04/20] change --- .../e2e_lighthouse_performance_acceptance_tests.yml | 2 +- ...=> save-draft-publish-and-discard-the-changes.spec.ts} | 8 ++++---- scripts/common.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) rename core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/{savedraft-publish-and-discard-the-changes.spec.ts => save-draft-publish-and-discard-the-changes.spec.ts} (100%) diff --git a/.github/workflows/e2e_lighthouse_performance_acceptance_tests.yml b/.github/workflows/e2e_lighthouse_performance_acceptance_tests.yml index 056f66ebaec7..e740bba0d5e0 100644 --- a/.github/workflows/e2e_lighthouse_performance_acceptance_tests.yml +++ b/.github/workflows/e2e_lighthouse_performance_acceptance_tests.yml @@ -314,7 +314,7 @@ jobs: - blog-editor-tests/try-to-publish-a-duplicate-blog-post-and-get-blocked - exploration-editor-tests/create-exploration-and-change-basic-settings - exploration-editor-tests/load-complete-and-restart-exploration-preview - - exploration-editor-tests/savedraft-publish-and-discard-the-changes + - exploration-editor-tests/save-draft-publish-and-discard-the-changes - 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 diff --git a/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/savedraft-publish-and-discard-the-changes.spec.ts b/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/save-draft-publish-and-discard-the-changes.spec.ts similarity index 100% rename from core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/savedraft-publish-and-discard-the-changes.spec.ts rename to core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/save-draft-publish-and-discard-the-changes.spec.ts index 9bbaad0a1e53..30b0842a361e 100644 --- a/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/savedraft-publish-and-discard-the-changes.spec.ts +++ b/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/save-draft-publish-and-discard-the-changes.spec.ts @@ -63,6 +63,10 @@ describe('Exploration Creator', function () { 'Algebra' ); + await explorationVisitor.expectExplorationToBeAccessibleByUrl( + explorationId + ); + await explorationEditor.navigateToSettingsTab(); await explorationEditor.updateTitleTo('New Title'); @@ -72,10 +76,6 @@ describe('Exploration Creator', function () { await explorationEditor.updateTitleTo('New Title'); await explorationEditor.saveExplorationDraft(); await explorationEditor.expectTitleToBe('New Title'); - - await explorationVisitor.expectExplorationToBeAccessibleByUrl( - explorationId - ); }, DEFAULT_SPEC_TIMEOUT_MSECS ); diff --git a/scripts/common.py b/scripts/common.py index 769eedf6cad8..1605fefa63d1 100644 --- a/scripts/common.py +++ b/scripts/common.py @@ -216,7 +216,7 @@ 'blog-editor-tests/try-to-publish-a-duplicate-blog-post-and-get-blocked', 'exploration-editor-tests/create-exploration-and-change-basic-settings', 'exploration-editor-tests/load-complete-and-restart-exploration-preview', - 'exploration-editor-tests/savedraft-publish-and-discard-the-changes', + 'exploration-editor-tests/save-draft-publish-and-discard-the-changes', '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', From d129dd7180a1eed90c266e0ab5e304c2275fe048 Mon Sep 17 00:00:00 2001 From: rahat2134 Date: Wed, 24 Apr 2024 17:55:18 +0530 Subject: [PATCH 05/20] changes --- .../puppeteer-utils.ts | 12 ++++++++++++ ...-exploration-and-change-basic-settings.spec.ts | 2 +- ...-draft-publish-and-discard-the-changes.spec.ts | 4 ++-- ...add-voiceover-artist-to-an-exploration.spec.ts | 8 ++++---- .../user-utilities/exploration-editor-utils.ts | 15 +++++---------- 5 files changed, 24 insertions(+), 17 deletions(-) diff --git a/core/tests/puppeteer-acceptance-tests/puppeteer-testing-utilities/puppeteer-utils.ts b/core/tests/puppeteer-acceptance-tests/puppeteer-testing-utilities/puppeteer-utils.ts index 5911bcaadd1e..e992516a019e 100644 --- a/core/tests/puppeteer-acceptance-tests/puppeteer-testing-utilities/puppeteer-utils.ts +++ b/core/tests/puppeteer-acceptance-tests/puppeteer-testing-utilities/puppeteer-utils.ts @@ -145,6 +145,18 @@ export class BaseUser { await this.page.reload({waitUntil: ['networkidle0', 'domcontentloaded']}); } + /** + * This function Waits for the autosave indicator to appear and then disappear. + */ + async waitForAutosaveIndicator(): Promise { + await this.page.waitForSelector('span.e2e-test-autosave-indicator', { + visible: true, + }); + await this.page.waitForSelector('span.e2e-test-autosave-indicator', { + hidden: true, + }); + } + /** * This function waits for an element to be clickable either by its CSS selector or * by the ElementHandle. diff --git a/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/create-exploration-and-change-basic-settings.spec.ts b/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/create-exploration-and-change-basic-settings.spec.ts index ba750f02f59a..38835b4ed02e 100644 --- a/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/create-exploration-and-change-basic-settings.spec.ts +++ b/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/create-exploration-and-change-basic-settings.spec.ts @@ -100,7 +100,7 @@ describe('Exploration Creator', function () { await explorationEditor.dismissWelcomeModal(); - await explorationEditor.createExplorationWithMinimumContent( + await explorationEditor.createMinimalExploration( 'Exploration intro text', INTERACTION_TYPES.END_EXPLORATION ); diff --git a/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/save-draft-publish-and-discard-the-changes.spec.ts b/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/save-draft-publish-and-discard-the-changes.spec.ts index 30b0842a361e..61f6d49e8dfd 100644 --- a/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/save-draft-publish-and-discard-the-changes.spec.ts +++ b/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/save-draft-publish-and-discard-the-changes.spec.ts @@ -51,13 +51,13 @@ describe('Exploration Creator', function () { await explorationEditor.navigateToExplorationEditorPage(); await explorationEditor.dismissWelcomeModal(); - await explorationEditor.createExplorationWithMinimumContent( + await explorationEditor.createMinimalExploration( 'Exploration intro text', INTERACTION_TYPES.END_EXPLORATION ); await explorationEditor.saveExplorationDraft(); - explorationId = await explorationEditor.publishExplorationWithContent( + explorationId = await explorationEditor.publishExplorationWithMetadata( 'Old Title', 'OppiaAcceptanceTestsCheck', 'Algebra' diff --git a/core/tests/puppeteer-acceptance-tests/spec/voiceover-admin-tests/add-voiceover-artist-to-an-exploration.spec.ts b/core/tests/puppeteer-acceptance-tests/spec/voiceover-admin-tests/add-voiceover-artist-to-an-exploration.spec.ts index 33bd534c3bc4..0f8f641d4b14 100644 --- a/core/tests/puppeteer-acceptance-tests/spec/voiceover-admin-tests/add-voiceover-artist-to-an-exploration.spec.ts +++ b/core/tests/puppeteer-acceptance-tests/spec/voiceover-admin-tests/add-voiceover-artist-to-an-exploration.spec.ts @@ -67,12 +67,12 @@ describe('Voiceover Admin', function () { await explorationEditor.navigateToExplorationEditorPage(); await explorationEditor.dismissWelcomeModal(); - await explorationEditor.createExplorationWithMinimumContent( + await explorationEditor.createMinimalExploration( 'Exploration one', INTERACTION_TYPES.END_EXPLORATION ); await explorationEditor.saveExplorationDraft(); - explorationId = await explorationEditor.publishExplorationWithContent( + explorationId = await explorationEditor.publishExplorationWithMetadata( 'Exploration one', 'Exploration one', 'Algebra' @@ -107,12 +107,12 @@ describe('Voiceover Admin', function () { await explorationEditor.navigateToCreatorDashboardPage(); await explorationEditor.navigateToExplorationEditorPage(); - await explorationEditor.createExplorationWithMinimumContent( + await explorationEditor.createMinimalExploration( 'Exploration two', INTERACTION_TYPES.END_EXPLORATION ); await explorationEditor.saveExplorationDraft(); - explorationId = await explorationEditor.publishExplorationWithContent( + explorationId = await explorationEditor.publishExplorationWithMetadata( 'Exploration one', 'Exploration one', 'Algebra' diff --git a/core/tests/puppeteer-acceptance-tests/user-utilities/exploration-editor-utils.ts b/core/tests/puppeteer-acceptance-tests/user-utilities/exploration-editor-utils.ts index ed8340174e1d..e25f26cf04dc 100644 --- a/core/tests/puppeteer-acceptance-tests/user-utilities/exploration-editor-utils.ts +++ b/core/tests/puppeteer-acceptance-tests/user-utilities/exploration-editor-utils.ts @@ -136,7 +136,7 @@ export class ExplorationEditor extends BaseUser { * @param content - content of the exploration * @param interaction - the interaction to be added to the exploration */ - async createExplorationWithMinimumContent( + async createMinimalExploration( content: string, interaction: string ): Promise { @@ -183,7 +183,7 @@ export class ExplorationEditor extends BaseUser { * @param {string} goal - The goal of the exploration. * @param {string} category - The category of the exploration. */ - async publishExplorationWithContent( + async publishExplorationWithMetadata( title: string, goal: string, category: string @@ -272,11 +272,11 @@ export class ExplorationEditor extends BaseUser { await this.page.waitForSelector(explorationTitleSelector); const titleInput = await this.page.$(explorationTitleSelector); const oldTitle = await this.page.evaluate(input => input.value, titleInput); + await this.clearAllTextFrom(addTitleBar); await this.type(addTitleBar, title); await this.page.keyboard.press('Tab'); - // Auto save pop up bar is visible only when current input is different from - // old input. + if (oldTitle !== title) { if (this.isViewportAtMobileWidth()) { // Navbar text is hidden in mobile view port due to less screen so there is no visible @@ -284,12 +284,7 @@ export class ExplorationEditor extends BaseUser { // Hence we need to explicitly wait for 2 seconds. await this.page.waitForTimeout(2000); } else { - await this.page.waitForSelector('span.e2e-test-autosave-indicator', { - visible: true, - }); - await this.page.waitForSelector('span.e2e-test-autosave-indicator', { - hidden: true, - }); + await this.waitForAutosaveIndicator(); } } showMessage(`Title has been updated to ${title}`); From 5679fba53ba7c8b736e16eeb7ae2782dce9d3854 Mon Sep 17 00:00:00 2001 From: rahat2134 Date: Wed, 24 Apr 2024 18:04:54 +0530 Subject: [PATCH 06/20] changes --- .../save-draft-publish-and-discard-the-changes.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/save-draft-publish-and-discard-the-changes.spec.ts b/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/save-draft-publish-and-discard-the-changes.spec.ts index 61f6d49e8dfd..f219ed28a56a 100644 --- a/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/save-draft-publish-and-discard-the-changes.spec.ts +++ b/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/save-draft-publish-and-discard-the-changes.spec.ts @@ -13,7 +13,7 @@ // limitations under the License. /** - * @fileoverview Acceptance Test for savedraft, publish and discard the changes. + * @fileoverview Acceptance Test for saving drafts, publishing, and discarding changes. */ import {showMessage} from '../../puppeteer-testing-utilities/show-message-utils'; From 87e718a7c01023d35a8e6a5a98b5080f2401cade Mon Sep 17 00:00:00 2001 From: rahat2134 Date: Wed, 24 Apr 2024 18:08:38 +0530 Subject: [PATCH 07/20] changes --- ...ate-exploration-and-change-basic-settings.spec.ts | 12 ++++++------ ...ave-draft-publish-and-discard-the-changes.spec.ts | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/create-exploration-and-change-basic-settings.spec.ts b/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/create-exploration-and-change-basic-settings.spec.ts index 38835b4ed02e..4448d854bfa4 100644 --- a/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/create-exploration-and-change-basic-settings.spec.ts +++ b/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/create-exploration-and-change-basic-settings.spec.ts @@ -53,41 +53,41 @@ describe('Exploration Creator', function () { 'explorationEditor', 'exploration_editor@example.com' ); - showMessage('explorationEditor is signed up successfully.'); + showMessage('explorationEditor has signed up successfully.'); voiceoverAdmin = await UserFactory.createNewUser( 'voiceoverAdm', 'voiceover_admin@example.com', [ROLES.VOICEOVER_ADMIN] ); - showMessage('Voiceover admin is signed up successfully.'); + showMessage('Voiceover admin has signed up successfully.'); curriculumAdmin = await UserFactory.createNewUser( 'curriculumAdm', 'curriculum_admin@example.com', [ROLES.CURRICULUM_ADMIN] ); - showMessage('Curriculum admin is signed up successfully.'); + showMessage('Curriculum admin has signed up successfully.'); const guestUser1 = await UserFactory.createNewUser( 'guestUser1', 'guest_user1@example.com' ); - showMessage('guestUser1 is signed up successfully.'); + showMessage('guestUser1 has signed up successfully.'); await guestUser1.closeBrowser(); const guestUser2 = await UserFactory.createNewUser( 'guestUser2', 'guest_user2@example.com' ); - showMessage('guestUser2 is signed up successfully.'); + showMessage('guestUser2 has signed up successfully.'); await guestUser2.closeBrowser(); const guestUser3 = await UserFactory.createNewUser( 'guestUser3', 'guest_user3@example.com' ); - showMessage('guestUser3 is signed up successfully.'); + showMessage('guestUser3 has signed up successfully.'); await guestUser3.closeBrowser(); }, DEFAULT_SPEC_TIMEOUT_MSECS); diff --git a/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/save-draft-publish-and-discard-the-changes.spec.ts b/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/save-draft-publish-and-discard-the-changes.spec.ts index f219ed28a56a..da2b558301c6 100644 --- a/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/save-draft-publish-and-discard-the-changes.spec.ts +++ b/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/save-draft-publish-and-discard-the-changes.spec.ts @@ -35,13 +35,13 @@ describe('Exploration Creator', function () { 'explorationEditor', 'exploration_editor@example.com' ); - showMessage('explorationEditor is signed up successfully.'); + showMessage('explorationEditor has signed up successfully.'); explorationVisitor = await UserFactory.createNewUser( 'explorationVisitor', 'exploration_visitor@example.com' ); - showMessage('explorationVisitor is signed up successfully.'); + showMessage('explorationVisitor has signed up successfully.'); }, DEFAULT_SPEC_TIMEOUT_MSECS); it( From db6208382cb7ff12b8bcd4927b44949549ba17b0 Mon Sep 17 00:00:00 2001 From: rahat2134 Date: Wed, 24 Apr 2024 23:20:00 +0530 Subject: [PATCH 08/20] changes --- .../user-utilities/logged-in-users-utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 1fc2ce31dbaf..98c1304c8220 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 @@ -715,7 +715,7 @@ export class LoggedInUser extends BaseUser { /** * Function to click the dismiss button in the Thanks for Donating page, * and check if the Thanks for Donating popup disappears - * and if the Donate page is shown + * and if the Donate page is shown. */ async clickDismissButtonInThanksForDonatingPage(): Promise { await this.clickOn(dismissButton); From ee7a5ac88159c304a7b04e81af8ef2e4a8e1b598 Mon Sep 17 00:00:00 2001 From: rahat2134 Date: Fri, 26 Apr 2024 22:30:15 +0530 Subject: [PATCH 09/20] changes-> waitForPageToFullyLoad,... --- .../puppeteer-utils.ts | 54 ++++++++++++++----- ...loration-and-change-basic-settings.spec.ts | 11 +++- ...ft-publish-and-discard-the-changes.spec.ts | 6 ++- .../user-utilities/curriculum-admin-utils.ts | 4 +- .../exploration-editor-utils.ts | 51 ++++++------------ .../user-utilities/voiceover-admin-utils.ts | 2 +- 6 files changed, 76 insertions(+), 52 deletions(-) diff --git a/core/tests/puppeteer-acceptance-tests/puppeteer-testing-utilities/puppeteer-utils.ts b/core/tests/puppeteer-acceptance-tests/puppeteer-testing-utilities/puppeteer-utils.ts index e992516a019e..20f7a010708d 100644 --- a/core/tests/puppeteer-acceptance-tests/puppeteer-testing-utilities/puppeteer-utils.ts +++ b/core/tests/puppeteer-acceptance-tests/puppeteer-testing-utilities/puppeteer-utils.ts @@ -20,8 +20,10 @@ import puppeteer, {Page, Browser, Viewport, ElementHandle} from 'puppeteer'; import testConstants from './test-constants'; import isElementClickable from '../functions/is-element-clickable'; import {ConsoleReporter} from './console-reporter'; +import {showMessage} from './show-message-utils'; const VIEWPORT_WIDTH_BREAKPOINTS = testConstants.ViewportWidthBreakpoints; +const baseURL = testConstants.URLs.BaseURL; const LABEL_FOR_SUBMIT_BUTTON = 'Submit and start contributing'; /** We accept the empty message because this is what is sent on @@ -145,18 +147,6 @@ export class BaseUser { await this.page.reload({waitUntil: ['networkidle0', 'domcontentloaded']}); } - /** - * This function Waits for the autosave indicator to appear and then disappear. - */ - async waitForAutosaveIndicator(): Promise { - await this.page.waitForSelector('span.e2e-test-autosave-indicator', { - visible: true, - }); - await this.page.waitForSelector('span.e2e-test-autosave-indicator', { - hidden: true, - }); - } - /** * This function waits for an element to be clickable either by its CSS selector or * by the ElementHandle. @@ -301,6 +291,46 @@ export class BaseUser { getCurrentUrlWithoutParameters(): string { return this.page.url().split('?')[0]; } + + /** + * This function checks the exploration accessibility with help of explorationID. + */ + async expectExplorationToBeAccessibleByUrl( + explorationId: string | null + ): Promise { + if (!explorationId) { + throw new Error('ExplorationId is null'); + } + const explorationUrlAfterPublished = `${baseURL}/create/${explorationId}#/gui/Introduction`; + try { + await this.page.goto(explorationUrlAfterPublished); + showMessage('Exploration is accessible with the URL, i.e. published.'); + } catch (error) { + throw new Error('The exploration is not public.'); + } + } + + async expectExplorationToBeNotAccessibleByUrl( + explorationId: string | null + ): Promise { + if (!explorationId) { + throw new Error('ExplorationId is null'); + } + const explorationUrlAfterPublished = `${baseURL}/create/${explorationId}#/gui/Introduction`; + try { + await this.page.goto(explorationUrlAfterPublished); + throw new Error('The exploration is still public.'); + } catch (error) { + showMessage('The exploration is not accessible with the URL.'); + } + } + + /** + * Waits for the page to fully load by checking the document's ready state. + */ + async waitForPageToFullyLoad(): Promise { + await this.page.waitForFunction('document.readyState === "complete"'); + } } export const BaseUserFactory = (): BaseUser => new BaseUser(); diff --git a/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/create-exploration-and-change-basic-settings.spec.ts b/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/create-exploration-and-change-basic-settings.spec.ts index 4448d854bfa4..ac0eee031e38 100644 --- a/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/create-exploration-and-change-basic-settings.spec.ts +++ b/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/create-exploration-and-change-basic-settings.spec.ts @@ -22,6 +22,7 @@ import testConstants from '../../puppeteer-testing-utilities/test-constants'; import {UserFactory} from '../../puppeteer-testing-utilities/user-factory'; import {CurriculumAdmin} from '../../user-utilities/curriculum-admin-utils'; import {ExplorationEditor} from '../../user-utilities/exploration-editor-utils'; +import {LoggedInUser} from '../../user-utilities/logged-in-users-utils'; import {VoiceoverAdmin} from '../../user-utilities/voiceover-admin-utils'; const DEFAULT_SPEC_TIMEOUT_MSECS = testConstants.DEFAULT_SPEC_TIMEOUT_MSECS; @@ -40,12 +41,14 @@ ConsoleReporter.setConsoleErrorsToIgnore([ /Error: Could not find the resource http:\/\/localhost:8181\/explorehandler\/features\/[a-zA-Z0-9]+\.?/, /Could not find the resource http:\/\/localhost:8181\/createhandler\/permissions\/[a-zA-Z0-9]+\.?/, /http:\/\/localhost:8181\/build\/webpack_bundles\/exploration_editor\.[a-f0-9]+\.bundle\.js/, + /http:\/\/localhost:8181\/create\/[a-zA-Z0-9]+#\/gui\/Introduction Failed to load resource: the server responded with a status of 404 \(Not Found\)/, ]); describe('Exploration Creator', function () { let explorationEditor: ExplorationEditor; let voiceoverAdmin: VoiceoverAdmin; let curriculumAdmin: CurriculumAdmin; + let explorationVisitor: LoggedInUser; let explorationId: string | null; beforeAll(async function () { @@ -55,6 +58,12 @@ describe('Exploration Creator', function () { ); showMessage('explorationEditor has signed up successfully.'); + explorationVisitor = await UserFactory.createNewUser( + 'explorationVisitor', + 'exploration_visitor@example.com' + ); + showMessage('explorationVisitor has signed up successfully.'); + voiceoverAdmin = await UserFactory.createNewUser( 'voiceoverAdm', 'voiceover_admin@example.com', @@ -157,7 +166,7 @@ describe('Exploration Creator', function () { await curriculumAdmin.openExplorationControlDropdown(); await curriculumAdmin.deleteExplorationPermanently(); - await explorationEditor.expectExplorationToBeNotAccessibleByUrl( + await explorationVisitor.expectExplorationToBeNotAccessibleByUrl( explorationId ); }, diff --git a/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/save-draft-publish-and-discard-the-changes.spec.ts b/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/save-draft-publish-and-discard-the-changes.spec.ts index da2b558301c6..b2f3f38bf358 100644 --- a/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/save-draft-publish-and-discard-the-changes.spec.ts +++ b/core/tests/puppeteer-acceptance-tests/spec/exploration-editor-tests/save-draft-publish-and-discard-the-changes.spec.ts @@ -20,6 +20,7 @@ import {showMessage} from '../../puppeteer-testing-utilities/show-message-utils' import testConstants from '../../puppeteer-testing-utilities/test-constants'; import {UserFactory} from '../../puppeteer-testing-utilities/user-factory'; import {ExplorationEditor} from '../../user-utilities/exploration-editor-utils'; +import {LoggedInUser} from '../../user-utilities/logged-in-users-utils'; const DEFAULT_SPEC_TIMEOUT_MSECS = testConstants.DEFAULT_SPEC_TIMEOUT_MSECS; enum INTERACTION_TYPES { @@ -28,8 +29,9 @@ enum INTERACTION_TYPES { describe('Exploration Creator', function () { let explorationEditor: ExplorationEditor; - let explorationVisitor: ExplorationEditor; + let explorationVisitor: LoggedInUser; let explorationId: string | null; + beforeAll(async function () { explorationEditor = await UserFactory.createNewUser( 'explorationEditor', @@ -59,7 +61,7 @@ describe('Exploration Creator', function () { await explorationEditor.saveExplorationDraft(); explorationId = await explorationEditor.publishExplorationWithMetadata( 'Old Title', - 'OppiaAcceptanceTestsCheck', + 'This is the goal of exploration.', 'Algebra' ); diff --git a/core/tests/puppeteer-acceptance-tests/user-utilities/curriculum-admin-utils.ts b/core/tests/puppeteer-acceptance-tests/user-utilities/curriculum-admin-utils.ts index a745144845eb..342ce9feec77 100644 --- a/core/tests/puppeteer-acceptance-tests/user-utilities/curriculum-admin-utils.ts +++ b/core/tests/puppeteer-acceptance-tests/user-utilities/curriculum-admin-utils.ts @@ -57,7 +57,7 @@ export class CurriculumAdmin extends BaseUser { * Function to navigate to exploration settings tab */ async navigateToExplorationSettingsTab(): Promise { - await this.page.waitForFunction('document.readyState === "complete"'); + await this.waitForPageToFullyLoad(); if (this.isViewportAtMobileWidth()) { await this.clickOn(mobileNavToggelbutton); await this.clickOn(mobileOptionsDropdown); @@ -73,7 +73,7 @@ export class CurriculumAdmin extends BaseUser { * Note: This action requires Curriculum Admin role. */ async deleteExplorationPermanently(): Promise { - await this.page.waitForFunction('document.readyState === "complete"'); + await this.waitForPageToFullyLoad(); await this.clickOn(deleteExplorationButton); await this.clickOn(confirmDeletionButton); } diff --git a/core/tests/puppeteer-acceptance-tests/user-utilities/exploration-editor-utils.ts b/core/tests/puppeteer-acceptance-tests/user-utilities/exploration-editor-utils.ts index e25f26cf04dc..6ae15f49de2f 100644 --- a/core/tests/puppeteer-acceptance-tests/user-utilities/exploration-editor-utils.ts +++ b/core/tests/puppeteer-acceptance-tests/user-utilities/exploration-editor-utils.ts @@ -21,7 +21,6 @@ import testConstants from '../puppeteer-testing-utilities/test-constants'; import {showMessage} from '../puppeteer-testing-utilities/show-message-utils'; import {error} from 'console'; -const baseURL = testConstants.URLs.BaseURL; const creatorDashboardPage = testConstants.URLs.CreatorDashboard; const createExplorationButton = 'button.e2e-test-create-new-exploration-button'; @@ -238,7 +237,7 @@ export class ExplorationEditor extends BaseUser { * @param {string} content - The content to be added to the card. */ async updateCardContent(content: string): Promise { - await this.page.waitForFunction('document.readyState === "complete"'); + await this.waitForPageToFullyLoad(); await this.page.waitForSelector(stateEditSelector, { visible: true, }); @@ -277,6 +276,8 @@ export class ExplorationEditor extends BaseUser { await this.type(addTitleBar, title); await this.page.keyboard.press('Tab'); + // Auto save pop up bar is visible only when current input is different from + // old input. if (oldTitle !== title) { if (this.isViewportAtMobileWidth()) { // Navbar text is hidden in mobile view port due to less screen so there is no visible @@ -308,6 +309,18 @@ export class ExplorationEditor extends BaseUser { } } + /** + * This function Waits for the autosave indicator to appear and then disappear. + */ + async waitForAutosaveIndicator(): Promise { + await this.page.waitForSelector('span.e2e-test-autosave-indicator', { + visible: true, + }); + await this.page.waitForSelector('span.e2e-test-autosave-indicator', { + hidden: true, + }); + } + /** * Clears previous goal and adds a new goal in the exploration. */ @@ -503,7 +516,7 @@ export class ExplorationEditor extends BaseUser { await this.clickOn(addRoleDropdown); await this.clickOn(collaboratorRoleOption); await this.clickOn(saveRoleButton); - showMessage(`${username} has been added as collaboratorRoleOption.`); + showMessage(`${username} has been added as collaboratorRole.`); } /** @@ -623,36 +636,6 @@ export class ExplorationEditor extends BaseUser { return explorationId; } - async expectExplorationToBeAccessibleByUrl( - explorationId: string | null - ): Promise { - if (!explorationId) { - throw new Error('ExplorationId is null'); - } - const explorationUrlAfterPublished = `${baseURL}/create/${explorationId}#/gui/Introduction`; - try { - await this.page.goto(explorationUrlAfterPublished); - showMessage('Exploration is accessible with the URL, i.e. published.'); - } catch (error) { - throw new Error('The exploration is not public.'); - } - } - - async expectExplorationToBeNotAccessibleByUrl( - explorationId: string | null - ): Promise { - if (!explorationId) { - throw new Error('ExplorationId is null'); - } - const explorationUrlAfterPublished = `${baseURL}/create/${explorationId}#/gui/Introduction`; - try { - await this.page.goto(explorationUrlAfterPublished); - throw new Error('The exploration is still public.'); - } catch (error) { - showMessage('The exploration is not accessible with the URL.'); - } - } - /** * Discards the current changes. */ @@ -674,7 +657,7 @@ export class ExplorationEditor extends BaseUser { this.clickOn(confirmDiscardButton), this.page.waitForNavigation({waitUntil: 'networkidle0'}), ]); - await this.page.waitForFunction('document.readyState === "complete"'); + await this.waitForPageToFullyLoad(); if (this.isViewportAtMobileWidth()) { await this.clickOn(mobileOptionsButton); await this.clickOn(basicSettingsDropdown); diff --git a/core/tests/puppeteer-acceptance-tests/user-utilities/voiceover-admin-utils.ts b/core/tests/puppeteer-acceptance-tests/user-utilities/voiceover-admin-utils.ts index a8ed99bcd392..8c3c1e12d305 100644 --- a/core/tests/puppeteer-acceptance-tests/user-utilities/voiceover-admin-utils.ts +++ b/core/tests/puppeteer-acceptance-tests/user-utilities/voiceover-admin-utils.ts @@ -49,7 +49,7 @@ export class VoiceoverAdmin extends BaseUser { * Function to navigate to exploration settings tab. */ async navigateToExplorationSettingsTab(): Promise { - await this.page.waitForFunction('document.readyState === "complete"'); + await this.waitForPageToFullyLoad(); if (this.isViewportAtMobileWidth()) { await this.clickOn(mobileNavToggelbutton); await this.clickOn(mobileOptionsDropdown); From 92c6bda8103356ce599e35a5c62b1592efd113d3 Mon Sep 17 00:00:00 2001 From: rahat2134 Date: Sat, 27 Apr 2024 14:47:37 +0530 Subject: [PATCH 10/20] correct function name in new PR --- .../create-and-publish-topics-and-stories.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/tests/puppeteer-acceptance-tests/spec/curriculum-admin-tests/create-and-publish-topics-and-stories.spec.ts b/core/tests/puppeteer-acceptance-tests/spec/curriculum-admin-tests/create-and-publish-topics-and-stories.spec.ts index c6ff865c1d34..108a9ec03ff7 100644 --- a/core/tests/puppeteer-acceptance-tests/spec/curriculum-admin-tests/create-and-publish-topics-and-stories.spec.ts +++ b/core/tests/puppeteer-acceptance-tests/spec/curriculum-admin-tests/create-and-publish-topics-and-stories.spec.ts @@ -42,12 +42,12 @@ describe('Curriculum Admin', function () { await curriculumAdmin.navigateToCreatorDashboardPage(); await curriculumAdmin.navigateToExplorationEditorPage(); await curriculumAdmin.dismissWelcomeModal(); - await curriculumAdmin.createExplorationWithMinimumContent( + await curriculumAdmin.createMinimalExploration( 'Test Exploration', 'End Exploration' ); await curriculumAdmin.saveExplorationDraft(); - explorationId = await curriculumAdmin.publishExplorationWithContent( + explorationId = await curriculumAdmin.publishExplorationWithMetadata( 'Test Exploration Title 1', 'Test Exploration Goal', 'Algebra' From c03be5534ffce73b568477a0ae4b7f6d10ef1503 Mon Sep 17 00:00:00 2001 From: rahat2134 Date: Wed, 8 May 2024 23:16:34 +0530 Subject: [PATCH 11/20] removed timeout --- .../user-utilities/exploration-editor-utils.ts | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/core/tests/puppeteer-acceptance-tests/user-utilities/exploration-editor-utils.ts b/core/tests/puppeteer-acceptance-tests/user-utilities/exploration-editor-utils.ts index 6ae15f49de2f..aa1212edf61e 100644 --- a/core/tests/puppeteer-acceptance-tests/user-utilities/exploration-editor-utils.ts +++ b/core/tests/puppeteer-acceptance-tests/user-utilities/exploration-editor-utils.ts @@ -268,26 +268,10 @@ export class ExplorationEditor extends BaseUser { * Deletes the previous written title and updates the new title. */ async updateTitleTo(title: string): Promise { - await this.page.waitForSelector(explorationTitleSelector); - const titleInput = await this.page.$(explorationTitleSelector); - const oldTitle = await this.page.evaluate(input => input.value, titleInput); - await this.clearAllTextFrom(addTitleBar); await this.type(addTitleBar, title); await this.page.keyboard.press('Tab'); - // Auto save pop up bar is visible only when current input is different from - // old input. - if (oldTitle !== title) { - if (this.isViewportAtMobileWidth()) { - // Navbar text is hidden in mobile view port due to less screen so there is no visible - // change in the UI (specially Auto save pop up bar) after we update the input bar. - // Hence we need to explicitly wait for 2 seconds. - await this.page.waitForTimeout(2000); - } else { - await this.waitForAutosaveIndicator(); - } - } showMessage(`Title has been updated to ${title}`); } From e99c3a017e9d766b8ea3f7185243c564a9b65542 Mon Sep 17 00:00:00 2001 From: rahat2134 Date: Thu, 23 May 2024 02:06:44 +0530 Subject: [PATCH 12/20] div -> button --- .../editor-navigation/editor-navigation.component.html | 10 ++-------- .../user-utilities/exploration-editor-utils.ts | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/core/templates/pages/exploration-editor-page/editor-navigation/editor-navigation.component.html b/core/templates/pages/exploration-editor-page/editor-navigation/editor-navigation.component.html index 7eaee2b1c130..30fa79d797b4 100644 --- a/core/templates/pages/exploration-editor-page/editor-navigation/editor-navigation.component.html +++ b/core/templates/pages/exploration-editor-page/editor-navigation/editor-navigation.component.html @@ -119,11 +119,10 @@