Skip to content

add acceptance test for changing contents of Firstrunwizard#105

Merged
dpakach merged 1 commit into
owncloud:masterfrom
bhawanaprasain:contentchanger
May 8, 2019
Merged

add acceptance test for changing contents of Firstrunwizard#105
dpakach merged 1 commit into
owncloud:masterfrom
bhawanaprasain:contentchanger

Conversation

@bhawanaprasain

@bhawanaprasain bhawanaprasain commented May 6, 2019

Copy link
Copy Markdown
Contributor

This code allows administrator to change the default popup message of firstrunwizard and revert the popup message back to default message .

@individual-it

Copy link
Copy Markdown
Member

needs owncloud/core#35151 to be merged

Comment thread tests/acceptance/features/bootstrap/WebUIFirstrunwizardContext.php Outdated
Comment thread tests/acceptance/features/bootstrap/WebUIFirstrunwizardContext.php Outdated
Comment thread tests/acceptance/features/bootstrap/WebUIFirstrunwizardContext.php
Comment thread tests/acceptance/features/lib/FirstrunwizardPage.php Outdated
*
* @param $expectedMessage
*
* @Throws Exception

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @Throws Exception
* @throws Exception

}

/**
* Returns the message from firstrunwizard at heading

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Returns the message from firstrunwizard at heading
* Returns the message from firstrunwizard at heading

private $firstrunwizardPage;

/**
* @var PathofWizardFileFromServerRoot

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think this is required

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same goes for following variable declerations.

Comment thread tests/acceptance/features/lib/FirstrunwizardPage.php Outdated
@@ -0,0 +1,24 @@
@webUI @insulated @disablePreviews
Feature: default message from firstrunwizard is displayed after changing default popup message of firstrunwizard and reverting it back

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Feature: default message from firstrunwizard is displayed after changing default popup message of firstrunwizard and reverting it back
Feature: Customize firstrunwizard popup

@webUI @insulated @disablePreviews
Feature: default message from firstrunwizard is displayed after changing default popup message of firstrunwizard and reverting it back
As an administrator
I want to check if firstrunwizard displays default message on popup after changing the default message and reverting it

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
I want to check if firstrunwizard displays default message on popup after changing the default message and reverting it
I want to customize firstrunwizard popup message

Feature: default message from firstrunwizard is displayed after changing default popup message of firstrunwizard and reverting it back
As an administrator
I want to check if firstrunwizard displays default message on popup after changing the default message and reverting it
So that I can manipulate and send popup message from firstrunwizard to new users

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
So that I can manipulate and send popup message from firstrunwizard to new users
So that I can send message from firstrunwizard to all new users

@codecov

codecov Bot commented May 7, 2019

Copy link
Copy Markdown

Codecov Report

Merging #105 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #105   +/-   ##
=========================================
  Coverage     28.07%   28.07%           
  Complexity       16       16           
=========================================
  Files             9        9           
  Lines           114      114           
=========================================
  Hits             32       32           
  Misses           82       82

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3c30ccc...8833aa4. Read the comment docs.

@codecov

codecov Bot commented May 7, 2019

Copy link
Copy Markdown

Codecov Report

Merging #105 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #105   +/-   ##
=========================================
  Coverage     28.07%   28.07%           
  Complexity       16       16           
=========================================
  Files             9        9           
  Lines           114      114           
=========================================
  Hits             32       32           
  Misses           82       82

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3c30ccc...b28478b. Read the comment docs.

Comment thread tests/acceptance/features/bootstrap/WebUIFirstrunwizardContext.php
Comment thread tests/acceptance/features/bootstrap/WebUIFirstrunwizardContext.php Outdated
private $pathOfWizardFileFromServerRoot = "/apps/firstrunwizard/templates/wizard.php";

/**
* @var FileContent

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @var FileContent
* @var string


/**
* @Then the user should not see the firstrunwizard popup message
* @Then the user should see the firstrunwizard popup message in general settings page

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 Then steps on same function?

}

/**
* @When the user clicks :arg1 button

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$arg1 never used

@bhawanaprasain
bhawanaprasain force-pushed the contentchanger branch 2 times, most recently from 914f5fa to 60c4c8b Compare May 7, 2019 09:06
$headingMessage = $this->firstRunWizardPage->getHeadingMessage();

PHPUnit\Framework\Assert::assertSame(
$expectedMessage, $headingMessage, "Firstrunwizard was expected to show $expectedMessage but showed $headingMessage."

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too long, please separate into multiple lines.

@bhawanaprasain
bhawanaprasain force-pushed the contentchanger branch 2 times, most recently from 0b9fa8a to 50579a5 Compare May 8, 2019 03:38

@paurakhsharma paurakhsharma left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

protected $firstrunwizardPopupXpath = "//*[@id='firstrunwizard']";

protected $headingMessageXpath = "//*[@id='firstrunwizard']/h1";
protected $firstRunWizardXpath = "//*[@id='firstrunwizard']";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
protected $firstRunWizardXpath = "//*[@id='firstrunwizard']";
protected $firstRunWizardXpath = "//*[@id='firstrunwizard']";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe, fix this in another PR.

@dpakach
dpakach merged commit ab8c2b8 into owncloud:master May 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants