public void TestTestCaseDirectoryDoesNotExists()
        {
            var testCaseFileAndFolderUtils = new TestCaseFileAndFolderUtils(5001, UnitTestTestDataRoot);
            var actual = testCaseFileAndFolderUtils.TestCaseDirectory;

            StfAssert.IsNull("TestCaseDirectory does not exists", actual);
        }
Пример #2
0
        public void Tc003()
        {
            WrapTrackShell.Login();
            WrapTrackShell.Logout();

            // And the result....
            var me = WrapTrackShell.Me();

            StfAssert.IsNull("me", me);
        }
Пример #3
0
        /// <summary>
        /// The helper get clean file content no reference files.
        /// </summary>
        /// <param name="testStep">
        /// The test step.
        /// </param>
        /// <param name="inputFilename">
        /// The input filename.
        /// </param>
        private void HelperGetCleanFileContentNoReferenceFiles(string testStep, string inputFilename)
        {
            var content = stfTestUtils.FileUtils.GetCleanFileContent(inputFilename);

            StfAssert.IsNull(testStep, content);
        }
Пример #4
0
        public void Tc028()
        {
            // User #1: Add a wrap
            var collection = GetCurrentUserCollection();

            // Add a wrap
            var wrapToGo   = collection.GetRandomWrap();
            var wtId       = wrapToGo.WtId;
            var wtApi      = Get <IWtApi>();
            var wrapInfo   = wtApi.WrapInfoByTrackId(wtId);
            var internalId = wrapInfo.InternalId;

            WrapTrackShell.Logout();

            // user #2 want the new wrap
            var anotherUser = GetAnotherUser(WrapTrackShell);

            // TODO: pw should not be hardcoded
            WrapTrackShell.Login(anotherUser, "wraptrack4ever");

            // Move to the new wrap
            var desiredWrap = WrapTrackShell.GetToWrap(internalId);

            desiredWrap.AskFor();
            WrapTrackShell.Logout();

            // User #1: Don't want to pass on
            WrapTrackShell.Login(); // Default user
            WrapTrackShell.Me();

            // navigate to the news page - and then to request page
            WrapTrackShell.WebAdapter.ButtonClickById("nav_home");
            WrapTrackShell.WebAdapter.ButtonClickById("navRequests");

            var testNoRequests = WrapTrackShell.WebAdapter.FindElement(By.Id("textNoRequests"));
            var respons        = testNoRequests.Displayed;

            StfAssert.IsFalse("Dont want to hear 'no pending requests'", respons);

            // On actual page: Find button Decline
            var xPath  = $"//a[text()='{wtId}']/../../../../../..//button[@id='butDeclineReq']";
            var retVal = WrapTrackShell.WebAdapter.Click(By.XPath(xPath));

            if (!retVal)
            {
                StfAssert.IsFalse("Decline button not found", true);
            }

            // Find the ''yes'Im-sure'
            var xPath2  = $"//a[text()='{wtId}']/../../../../../..//button[@id='butDoDecline']";
            var retVal2 = WrapTrackShell.WebAdapter.Click(By.XPath(xPath2));

            // Click to accept the request
            if (!retVal2)
            {
                StfAssert.IsFalse("Do-decline button not found", true);
            }

            // Assert: The link to <wtId> is gone (request handled)
            Wait(TimeSpan.FromSeconds(1));
            var xPath3  = $"//a[text()='{wtId}']";
            var retVal3 = WrapTrackShell.WebAdapter.FindElement(By.XPath(xPath3));

            StfAssert.IsNull("Reqest is gone", retVal3);

            // Assert: User#2 not new owner
            var validationTarget = Get <IWtApi>();
            var wrapInfoAfter    = validationTarget.WrapInfoByTrackId(wtId);
            var newOwnerName     = wrapInfoAfter.OwnerName;

            StfAssert.AreNotEqual("User #2 is not new owner", newOwnerName, anotherUser);
        }