mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 17:43:48 +01:00
fix infiltration
This commit is contained in:
parent
9552ae3ef1
commit
bb4de3f62c
73
cypress/integration/naviguation.spec.ts
Normal file
73
cypress/integration/naviguation.spec.ts
Normal file
@ -0,0 +1,73 @@
|
||||
export {};
|
||||
|
||||
describe("netscript", () => {
|
||||
it("Do naviguation", () => {
|
||||
cy.findByRole("button", { name: "SKIP TUTORIAL" }).click();
|
||||
cy.findByText("Got it!").click();
|
||||
|
||||
cy.findByText("Dev").click();
|
||||
cy.findByText(/Source-Files/i).click();
|
||||
cy.findByLabelText(/all-sf-3/i).click();
|
||||
cy.findByText(/Experience/i).click();
|
||||
cy.findByText(/Tons of exp/i).click();
|
||||
cy.findByText(/General/i).click();
|
||||
cy.findByText(/Hack w0/i).click();
|
||||
cy.findByText(/SEMPOOL INVALID/i);
|
||||
cy.findByText(/Many decades/i, { timeout: 15000 });
|
||||
cy.findByLabelText("enter-bitnode-1").click();
|
||||
cy.findByText(/Enter BN1.2/i).click();
|
||||
|
||||
cy.get("body").type("{esc}");
|
||||
|
||||
cy.findByText("Dev").click();
|
||||
cy.findByText(/Experience/i).click();
|
||||
cy.findByText(/Tons of exp/i).click();
|
||||
|
||||
cy.findByText("Create Script").click();
|
||||
cy.findByText(/Script name:/i);
|
||||
|
||||
cy.findByText("Active Scripts").click();
|
||||
cy.findByText(/Total online production of/i);
|
||||
|
||||
cy.findByText("Create Program").click();
|
||||
cy.findByText(/This page displays/i);
|
||||
|
||||
cy.findByText("Stats").click();
|
||||
cy.findByText(/Current City:/i);
|
||||
|
||||
cy.findByText("Factions").click();
|
||||
cy.findByText(/Lists all/i);
|
||||
|
||||
cy.findByText("Augmentations").click();
|
||||
cy.findByText(/Purchased Augmentations/i);
|
||||
|
||||
cy.findByText("Hacknet").click();
|
||||
cy.findByText(/The Hacknet is a global/i);
|
||||
|
||||
cy.findByText("Sleeves").click();
|
||||
cy.findByText(/Duplicate Sleeves are MK/i);
|
||||
|
||||
cy.findByText("City").click();
|
||||
cy.findByText(/Sector-12/i);
|
||||
cy.findByLabelText("The Slums").click();
|
||||
cy.findByText("City").click();
|
||||
cy.findByLabelText("Powerhouse Gym").click();
|
||||
cy.findByText("City").click();
|
||||
cy.findByLabelText("MegaCorp").click();
|
||||
|
||||
cy.findByText("Travel").click();
|
||||
cy.findByText(/Travel Agency/i);
|
||||
|
||||
cy.findByText("Stock Market").click();
|
||||
cy.findByText(/ECorp/i);
|
||||
|
||||
cy.findByText("Milestones").click();
|
||||
cy.findByText(/don't reward you for/i);
|
||||
|
||||
cy.findByText("Tutorial").click();
|
||||
cy.findByText(/AKA Links to/i);
|
||||
|
||||
cy.findByText("Options").click();
|
||||
cy.findByText(/Netscript exec time/i);
|
||||
});
|
||||
});
|
@ -44,7 +44,11 @@ function BitNodePortal(props: IPortalProps): React.ReactElement {
|
||||
}
|
||||
|
||||
return (
|
||||
<a className={`bitnode ${cssClass} tooltip`} onClick={openPortalPopup}>
|
||||
<button
|
||||
className={`bitnode ${cssClass} tooltip`}
|
||||
aria-label={`enter-bitnode-${bitNode.number.toString()}`}
|
||||
onClick={openPortalPopup}
|
||||
>
|
||||
<strong>O</strong>
|
||||
<span className="tooltiptext">
|
||||
<strong>
|
||||
@ -56,7 +60,7 @@ function BitNodePortal(props: IPortalProps): React.ReactElement {
|
||||
{bitNode.desc}
|
||||
<br />
|
||||
</span>
|
||||
</a>
|
||||
</button>
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -119,10 +119,10 @@ export function Factions(props: IProps): React.ReactElement {
|
||||
value={faction}
|
||||
startAdornment={
|
||||
<>
|
||||
<IconButton onClick={receiveAllInvites} size="large">
|
||||
<IconButton onClick={receiveAllInvites} size="large" arial-label="receive-all-invitation">
|
||||
<ReplyAllIcon />
|
||||
</IconButton>
|
||||
<IconButton onClick={receiveInvite} size="large">
|
||||
<IconButton onClick={receiveInvite} size="large" arial-label="receive-one-invitation">
|
||||
<ReplyIcon />
|
||||
</IconButton>
|
||||
</>
|
||||
|
@ -72,10 +72,18 @@ export function SourceFiles(props: IProps): React.ReactElement {
|
||||
</td>
|
||||
<td>
|
||||
<ButtonGroup>
|
||||
<Button onClick={setAllSF(0)}>0</Button>
|
||||
<Button onClick={setAllSF(1)}>1</Button>
|
||||
<Button onClick={setAllSF(2)}>2</Button>
|
||||
<Button onClick={setAllSF(3)}>3</Button>
|
||||
<Button aria-label="all-sf-0" onClick={setAllSF(0)}>
|
||||
0
|
||||
</Button>
|
||||
<Button aria-label="all-sf-1" onClick={setAllSF(1)}>
|
||||
1
|
||||
</Button>
|
||||
<Button aria-label="all-sf-2" onClick={setAllSF(2)}>
|
||||
2
|
||||
</Button>
|
||||
<Button aria-label="all-sf-3" onClick={setAllSF(3)}>
|
||||
3
|
||||
</Button>
|
||||
</ButtonGroup>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -48,11 +48,12 @@ function coloredArrow(difficulty: number): JSX.Element {
|
||||
}
|
||||
|
||||
export function Intro(props: IProps): React.ReactElement {
|
||||
console.log(props);
|
||||
return (
|
||||
<>
|
||||
<Grid container spacing={3}>
|
||||
<Grid item xs={10}>
|
||||
<h1>Infiltrating {props.Location}</h1>
|
||||
<h1>Infiltrating {props.Location.name}</h1>
|
||||
</Grid>
|
||||
<Grid item xs={10}>
|
||||
<h2>Maximum level: {props.MaxLevel}</h2>
|
||||
|
@ -35,6 +35,7 @@ function LocationLetter(location: Location): React.ReactElement {
|
||||
if (!location) return <span>*</span>;
|
||||
return (
|
||||
<span
|
||||
aria-label={location.name}
|
||||
key={location.name}
|
||||
className="tooltip"
|
||||
style={{
|
||||
|
@ -114,6 +114,7 @@ export function SlumsLocation(): React.ReactElement {
|
||||
return (
|
||||
<div>
|
||||
<AutoupdatingStdButton
|
||||
label={`Shoplift (${numeralWrapper.formatPercentage(shopliftChance)} chance of success)`}
|
||||
intervalTime={5e3}
|
||||
onClick={shoplift}
|
||||
style={{ display: "block" }}
|
||||
@ -121,6 +122,7 @@ export function SlumsLocation(): React.ReactElement {
|
||||
tooltip={"Attempt to shoplift from a low-end retailer"}
|
||||
/>
|
||||
<AutoupdatingStdButton
|
||||
label={`Rob store (${numeralWrapper.formatPercentage(robStoreChance)} chance of success)`}
|
||||
intervalTime={5e3}
|
||||
onClick={robStore}
|
||||
style={{ display: "block" }}
|
||||
@ -128,6 +130,7 @@ export function SlumsLocation(): React.ReactElement {
|
||||
tooltip={"Attempt to commit armed robbery on a high-end store"}
|
||||
/>
|
||||
<AutoupdatingStdButton
|
||||
label={`Mug someone (${numeralWrapper.formatPercentage(mugChance)} chance of success)`}
|
||||
intervalTime={5e3}
|
||||
onClick={mug}
|
||||
style={{ display: "block" }}
|
||||
@ -135,6 +138,7 @@ export function SlumsLocation(): React.ReactElement {
|
||||
tooltip={"Attempt to mug a random person on the street"}
|
||||
/>
|
||||
<AutoupdatingStdButton
|
||||
label={`Larceny (${numeralWrapper.formatPercentage(larcenyChance)} chance of success)`}
|
||||
intervalTime={5e3}
|
||||
onClick={larceny}
|
||||
style={{ display: "block" }}
|
||||
@ -142,6 +146,7 @@ export function SlumsLocation(): React.ReactElement {
|
||||
tooltip={"Attempt to rob property from someone's house"}
|
||||
/>
|
||||
<AutoupdatingStdButton
|
||||
label={`Deal Drugs (${numeralWrapper.formatPercentage(drugsChance)} chance of success)`}
|
||||
intervalTime={5e3}
|
||||
onClick={dealDrugs}
|
||||
style={{ display: "block" }}
|
||||
@ -149,6 +154,7 @@ export function SlumsLocation(): React.ReactElement {
|
||||
tooltip={"Attempt to deal drugs"}
|
||||
/>
|
||||
<AutoupdatingStdButton
|
||||
label={`Bond Forgery (${numeralWrapper.formatPercentage(bondChance)} chance of success)`}
|
||||
intervalTime={5e3}
|
||||
onClick={bondForgery}
|
||||
style={{ display: "block" }}
|
||||
@ -156,6 +162,7 @@ export function SlumsLocation(): React.ReactElement {
|
||||
tooltip={"Attempt to forge corporate bonds"}
|
||||
/>
|
||||
<AutoupdatingStdButton
|
||||
label={`Traffick illegal Arms (${numeralWrapper.formatPercentage(armsChance)} chance of success)`}
|
||||
intervalTime={5e3}
|
||||
onClick={traffickArms}
|
||||
style={{ display: "block" }}
|
||||
@ -163,6 +170,7 @@ export function SlumsLocation(): React.ReactElement {
|
||||
tooltip={"Attempt to smuggle illegal arms into the city"}
|
||||
/>
|
||||
<AutoupdatingStdButton
|
||||
label={`Homicide (${numeralWrapper.formatPercentage(homicideChance)} chance of success)`}
|
||||
intervalTime={5e3}
|
||||
onClick={homicide}
|
||||
style={{ display: "block" }}
|
||||
@ -170,6 +178,7 @@ export function SlumsLocation(): React.ReactElement {
|
||||
tooltip={"Attempt to murder a random person on the street"}
|
||||
/>
|
||||
<AutoupdatingStdButton
|
||||
label={`Grand theft Auto (${numeralWrapper.formatPercentage(gtaChance)} chance of success)`}
|
||||
intervalTime={5e3}
|
||||
onClick={grandTheftAuto}
|
||||
style={{ display: "block" }}
|
||||
@ -177,6 +186,7 @@ export function SlumsLocation(): React.ReactElement {
|
||||
tooltip={"Attempt to commit grand theft auto"}
|
||||
/>
|
||||
<AutoupdatingStdButton
|
||||
label={`Kidnap and Ransom (${numeralWrapper.formatPercentage(kidnapChance)} chance of success)`}
|
||||
intervalTime={5e3}
|
||||
onClick={kidnap}
|
||||
style={{ display: "block" }}
|
||||
@ -184,6 +194,7 @@ export function SlumsLocation(): React.ReactElement {
|
||||
tooltip={"Attempt to kidnap and ransom a high-profile-target"}
|
||||
/>
|
||||
<AutoupdatingStdButton
|
||||
label={`Assassinate (${numeralWrapper.formatPercentage(assassinateChance)} chance of success)`}
|
||||
intervalTime={5e3}
|
||||
onClick={assassinate}
|
||||
style={{ display: "block" }}
|
||||
@ -191,6 +202,7 @@ export function SlumsLocation(): React.ReactElement {
|
||||
tooltip={"Attempt to assassinate a high-profile target"}
|
||||
/>
|
||||
<AutoupdatingStdButton
|
||||
label={`Heist (${numeralWrapper.formatPercentage(heistChance)} chance of success)`}
|
||||
intervalTime={5e3}
|
||||
onClick={heist}
|
||||
style={{ display: "block" }}
|
||||
|
@ -7,6 +7,7 @@
|
||||
import * as React from "react";
|
||||
|
||||
interface IProps {
|
||||
label?: string;
|
||||
disabled?: boolean;
|
||||
intervalTime?: number;
|
||||
onClick?: (e: React.MouseEvent<HTMLElement>) => any;
|
||||
@ -65,7 +66,12 @@ export class AutoupdatingStdButton extends React.Component<IProps, IState> {
|
||||
};
|
||||
|
||||
return (
|
||||
<button className={className} onClick={this.props.onClick} style={this.props.style}>
|
||||
<button
|
||||
aria-label={this.props.label || ""}
|
||||
className={className}
|
||||
onClick={this.props.onClick}
|
||||
style={this.props.style}
|
||||
>
|
||||
{this.props.text}
|
||||
{hasTooltip && <span className={"tooltiptext"} dangerouslySetInnerHTML={tooltipMarkup}></span>}
|
||||
</button>
|
||||
|
@ -57,7 +57,7 @@ module.exports = (env, argv) => {
|
||||
$: "jquery",
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
title: "Bitburner" + (isDevelopment ? " - development" : ""),
|
||||
title: "Bitburner",
|
||||
template: "src/index.html",
|
||||
favicon: "favicon.ico",
|
||||
googleAnalytics: {
|
||||
|
Loading…
Reference in New Issue
Block a user