Skip to content

Commit

Permalink
VPN-6487: Remove "reset and quit" from dev menu (#9693)
Browse files Browse the repository at this point in the history
* VPN-6487-remove-reset-from-dev-menu

* remove test
  • Loading branch information
mcleinman committed Jun 28, 2024
1 parent 146cd58 commit 30a3417
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 69 deletions.
19 changes: 1 addition & 18 deletions src/ui/screens/getHelp/developerMenu/ViewDeveloperMenu.qml
Original file line number Diff line number Diff line change
Expand Up @@ -275,27 +275,10 @@ MZViewBase {
}
}

MZButton {
id: resetAndQuit
objectName: "resetAndQuitButton"
property int clickNeeded: 5

text: "Reset and Quit"
onClicked: {
if (clickNeeded) {
text = "Reset and Quit (" + clickNeeded + ")";
--clickNeeded;
return;
}

VPN.hardResetAndQuit()
}
}

ColumnLayout {
Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true
Layout.maximumWidth: resetAndQuit.width
Layout.maximumWidth: unstableNetworkExtension.width
Layout.topMargin: MZTheme.theme.vSpacingSmall

MZTextBlock {
Expand Down
3 changes: 1 addition & 2 deletions tests/functional/queries.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,7 @@ const screenGetHelp = {
};

const screenDeveloperMenu = {
SCREEN: new QmlQueryComposer('//developerScreen-flickable'),
RESET_AND_QUIT_BUTTON: new QmlQueryComposer('//resetAndQuitButton'),
SCREEN: new QmlQueryComposer('//developerScreen-flickable')
};

const screenSettings = {
Expand Down
49 changes: 0 additions & 49 deletions tests/functional/testSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -915,55 +915,6 @@ describe('Settings', function() {
await vpn.waitForQuery(queries.screenSettings.USER_PROFILE.visible());
});

it('Checking Developer Menu Reset and Quit', async () => {
// WASM is failing at relaunching the app, so skip this test on WASM
if (this.ctx.wasm) {
return;
}

// magically unlock dev menu
await vpn.setSetting('developerUnlock', 'true');

// navigate to Developer Menu
await getToGetHelpView();
await vpn.waitForQueryAndClick(
queries.screenGetHelp.DEVELOPER_MENU.visible());

// click "reset and quit" 6 times, test will fail if app quits early
await vpn.waitForQuery(
queries.screenDeveloperMenu.RESET_AND_QUIT_BUTTON.visible());
await vpn.scrollToQuery(
queries.screenDeveloperMenu.SCREEN,
queries.screenDeveloperMenu.RESET_AND_QUIT_BUTTON);
await vpn.waitForQueryAndClick(
queries.screenDeveloperMenu.RESET_AND_QUIT_BUTTON.visible());
await vpn.waitForQueryAndClick(
queries.screenDeveloperMenu.RESET_AND_QUIT_BUTTON.visible());
await vpn.waitForQueryAndClick(
queries.screenDeveloperMenu.RESET_AND_QUIT_BUTTON.visible());
await vpn.waitForQueryAndClick(
queries.screenDeveloperMenu.RESET_AND_QUIT_BUTTON.visible());
await vpn.waitForQueryAndClick(
queries.screenDeveloperMenu.RESET_AND_QUIT_BUTTON.visible());
// can't use waitForQueryAndClick for final click because it returns an
// error - as expected, we crashed the app - but that causes test to fail
await vpn.clickOnQueryAndAcceptAnyResults(
queries.screenDeveloperMenu.RESET_AND_QUIT_BUTTON.visible());

// Confirm the app quit
assert.equal(setup.vpnIsInactive(), true);

// relaunch app
await setup.startAndConnect();
await vpn.setSetting('localhostRequestsOnly', 'true');
await vpn.authenticateInApp();
await vpn.setGleanAutomationHeader();

// turn on VPN
await vpn.activateViaToggle();
await vpn.awaitSuccessfulConnection();
});

describe('telemetry in the settings menu', function () {
this.ctx.authenticationNeeded = true;

Expand Down

0 comments on commit 30a3417

Please sign in to comment.