Beispiel #1
0
        public void editFirstMovieGetTest()
        {
            adminLogin();
            filmsPage.adminClickEditInRow(1);
            editFilmPage = new EditFilmPage(driver);
            string movieName = editFilmPage.getFilmName();

            Assert.AreEqual("A Ghost Story", movieName);
        }
Beispiel #2
0
        public void editFirstMovieAndThenReturnTheOriginalName()
        {
            adminLogin();
            filmsPage.adminClickEditInRow(1);
            editFilmPage = new EditFilmPage(driver);
            editFilmPage.enterName("A GGhost Story");
            editFilmPage.clickSubmit();
            string firstMovieName = filmsPage.getFilmName(1);

            Assert.AreEqual("A GGhost Story", firstMovieName);

            filmsPage.adminClickEditInRow(1);
            editFilmPage.enterName("A Ghost Story");
            editFilmPage.clickSubmit();
        }
Beispiel #3
0
        public void editFirstMovieFailingTest()
        {
            adminLogin();
            filmsPage.adminClickEditInRow(1);
            editFilmPage = new EditFilmPage(driver);
            editFilmPage.emptyNameField();
            editFilmPage.emptyUrlField();
            editFilmPage.emptyGenreField();
            editFilmPage.emptyDirectorField();
            editFilmPage.emptyReleaseDateField();
            editFilmPage.emptyShortDescriptionField();
            editFilmPage.emptyStarsField();
            editFilmPage.clickSubmit();

            //check if the proper error messages are displayed
            Assert.AreEqual("The Name field is required.", editFilmPage.getNameErrorMessage());
            Assert.AreEqual("The Image field is required.", editFilmPage.getUrlErrorMessage());
            Assert.AreEqual("The Genre field is required.", editFilmPage.getGenreErrorMessage());
            Assert.AreEqual("The Director field is required.", editFilmPage.getDirectorErrorMessage());
            Assert.AreEqual("The Release Date field is required.", editFilmPage.getReleaseDateErrorMessage());
            Assert.AreEqual("The Short Description field is required.", editFilmPage.getShortDescriptionErrorMessage());
            Assert.AreEqual("The Stars field is required.", editFilmPage.getStarsErrorMessage());
        }