Skip to content

Commit

Permalink
e2e-test: Fixed tests workflow-item & timestamp
Browse files Browse the repository at this point in the history
- After adding an image for a placeholder, the test couldn't find a
  button to click on anymore, so a force command solved the issue.

- In timestamp_spec.js a div couldn't be found because it was nested,
  now the actual list is being forwarded.

- Fixed project_analytics_spec.js
  • Loading branch information
melissaSchmidt0302 committed Mar 19, 2020
1 parent c5c8fc6 commit 125ec1c
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 21 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ node_modules
yarn-error.log
.markdownlint.*
*.code-workspace
e2e-test/debug.log
2 changes: 1 addition & 1 deletion e2e-test/cypress/integration/project_analytics_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ describe("Project Analytics", function() {
// Open dialog
cy.get("[data-test=details-analytics-button]")
.should("be.visible")
.click();
.click({ force: true });
cy.get("[data-test=select-currencies]")
.should("be.visible")
.click();
Expand Down
4 changes: 2 additions & 2 deletions e2e-test/cypress/integration/timestamp_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const standardBudget = [
describe("Timestamps", function() {
before(function() {
cy.login("mstein", "test");
cy.visit(`/projects`);
cy.createProject("p-timestamp", "project timestamp test", standardBudget);
});

Expand All @@ -23,8 +22,9 @@ describe("Timestamps", function() {
.last()
.click();
cy.get("[data-test=assignee-selection]").click();
cy.get("[data-test=assignee-list]")
cy.get("[data-test=assignee-selection]")
.should("be.visible")
.get("[data-test=assignee-list]")
.find("[value=thouse]")
.click()
.get("[data-test=confirmation-dialog-confirm]")
Expand Down
10 changes: 5 additions & 5 deletions frontend/src/pages/Common/EmptyStates.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from "react";

import { withStyles, withTheme } from "@material-ui/core/styles";
import Typography from "@material-ui/core/Typography";
import List from "@material-ui/core/List";
import { CardContent } from "@material-ui/core";
import List from "@material-ui/core/List";
import Paper from "@material-ui/core/Paper";
import { withStyles, withTheme } from "@material-ui/core/styles";
import Typography from "@material-ui/core/Typography";
import React from "react";

import strings from "../../localizeStrings";

const styles = theme => {
Expand Down
13 changes: 6 additions & 7 deletions frontend/src/pages/Nodes/NodeVoting.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import React from "react";

import Button from "@material-ui/core/Button";
import Card from "@material-ui/core/Card";
import CardHeader from "@material-ui/core/CardHeader";
import CardContent from "@material-ui/core/CardContent";

import Typography from "@material-ui/core/Typography";
import CardHeader from "@material-ui/core/CardHeader";
import Divider from "@material-ui/core/Divider";
import List from "@material-ui/core/List";
import ListItem from "@material-ui/core/ListItem";
import ListItemText from "@material-ui/core/ListItemText";
import Divider from "@material-ui/core/Divider";
import Button from "@material-ui/core/Button";
import { withStyles } from "@material-ui/core/styles";
import Typography from "@material-ui/core/Typography";
import React from "react";

import strings from "../../localizeStrings";
import { canApproveNode } from "../../permissions";
import { NewOrganizations as EmptyNewOrganizations, ExistingNodes as EmptyExistingNodes } from "../Common/EmptyStates";
Expand Down
12 changes: 6 additions & 6 deletions frontend/src/pages/Workflows/SubProjectDetails.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
import Avatar from "@material-ui/core/Avatar";
import Button from "@material-ui/core/Button";
import Card from "@material-ui/core/Card";
import IconButton from "@material-ui/core/IconButton";
import Button from "@material-ui/core/Button";
import List from "@material-ui/core/List";
import ListItem from "@material-ui/core/ListItem";
import ListItemText from "@material-ui/core/ListItemText";
import Tooltip from "@material-ui/core/Tooltip";
import Typography from "@material-ui/core/Typography";
import AmountIcon from "@material-ui/icons/AccountBalance";
import Table from "@material-ui/core/Table";
import TableBody from "@material-ui/core/TableBody";
import TableCell from "@material-ui/core/TableCell";
import TableHead from "@material-ui/core/TableHead";
import TableRow from "@material-ui/core/TableRow";
import Tooltip from "@material-ui/core/Tooltip";
import Typography from "@material-ui/core/Typography";
import AmountIcon from "@material-ui/icons/AccountBalance";
import BarChartIcon from "@material-ui/icons/BarChart";
import DoneIcon from "@material-ui/icons/Check";
import DateIcon from "@material-ui/icons/DateRange";
import AssigneeIcon from "@material-ui/icons/Group";
import BarChartIcon from "@material-ui/icons/BarChart";
import _isUndefined from "lodash/isUndefined";
import React from "react";

import { statusIconMapping, statusMapping, toAmountString, unixTsToString } from "../../helper.js";
import strings from "../../localizeStrings";
import SubProjectAssigneeContainer from "./SubProjectAssigneeContainer";
import SubProjectAnalyticsDialog from "../Analytics/SubProjectAnalyticsDialog";
import { SubprojectBudget as EmptySubprojectBudget } from "../Common/EmptyStates";
import SubProjectAssigneeContainer from "./SubProjectAssigneeContainer";

const styles = {
container: {
Expand Down
1 change: 1 addition & 0 deletions frontend/src/pages/Workflows/WorkflowList.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import EditIcon from "@material-ui/icons/Edit";
import _isEmpty from "lodash/isEmpty";
import React from "react";
import { SortableContainer } from "react-sortable-hoc";

import { canReorderWorkflowItems } from "../../permissions.js";
import { RedactedWorkflowItem, WorkflowItem } from "./WorkflowItem";

Expand Down

0 comments on commit 125ec1c

Please sign in to comment.